filter outgoing email
I have looked but must be missing something. How can I create an outgoing filter for all emails in our domain.
Eg I might want a filter for all outgoing emails from "@ourdomain.com" to "@importantcustomer.com" to send a copy to "email@example.com". That way if firstname.lastname@example.org or email@example.com sends an email to firstname.lastname@example.org then everyone on the list for internal-crm can see what the latest communications with the important customer are.
(I have managed to set up a simple filter for eg email@example.com to send a copy of anything incoming from the important customer to a different mailbox or list, but I can't seem to do this with outgoing emails.)
Thanks in advance!
@jasonh We don't have this feature for outgoing emails. I guess we need email rules for outbound mail which Cloudron currently does not have. There's only rules for inbound mails via sieve.
Out of curiosity, have you done this with other email setups? If so, can you point me to what products implement this feature, so I can look into it further.
@girish I gather one can do this through postfix configuration.
I have to admit we haven't done this ourselves. It is one of the reasons we actually want to transition to something like Cloudron or poste.io or mailcow or similar so we can actually control such things.
The email setup in Cloudron is really nice and so I think will take a lot less maintenance going forward.
I gather that this can be done in postfix. Here are some relevant links:
- How to BCC all outgoing mail from one local mailbox to the other one in the same domain
In the end we would also like to get this going with Mailman. The problem with just distribution lists is often I will want to send a message to someone and cc a distribution list and then if that person is on the distribution list they will receive it twice. Eg consider sending a message to firstname.lastname@example.org cc: email@example.com. Then jim will get the message twice. With Mailman we can stop this from happening and also have an archive of firstname.lastname@example.org, etc.
@jasonh Ah got it. It looks like adding sender_bcc/recipient_bcc is quite doable. Cloudron uses haraka internally and not postfix and this feature is not available out of the box. We will look into adding this. I will reach out to you by email to double check some of the finer details.