On 9/24/2012 5:19 PM, Jeroen van Aart wrote: > I would like to know what is the simplest way to do the following: > > Assuming my server is an MTA for domain example.net with local > delivery to mostly virtual users. Virtual user addresses look like > [email protected]. These users often get emails from the > example.org domain. > > Email received only from [email protected] by one specific virtual > user with address [email protected] needs to be BCC'ed or > forwarded to [email protected]. The email for example.com is not > handled by me. >
To add a bcc: address for a specific sender+recipient combination, you could use a restriction class that checks for that condition and then returns the BCC access table action. This works nicely for a small number of conditions, but quickly gets awkward if you have lots of sender+recipient combos to check. documentation: http://www.postfix.org/RESTRICTION_CLASS_README.html http://www.postfix.org/access.5.html A more flexible and scalable approach is to use an external policy service. You could probably convince postfwd to do this without much effort, or use it as a starting point for your own creation. http://www.postfix.org/SMTPD_POLICY_README.html http://www.postfix.org/addon.html#policy -- Noel Jones
