postfix & recipient bcc aka Automatic BCC recipients

I am supporting a greek company with two linux servers.
These two linux boxes have a lot of services,
including a mail server and they are set upped as active/passive.

In the past week they lost their internet adsl connection.
This is a true and horrible story, but for that i’ll write another post in near future.
So without an internet connection there werent a lot of things i’ve could do.

Thanks to Santa Claus i had predict this problem and i have installed a linux vps server outside of the company as a backup mx/mail server to queue all the undelivered mail.

From the company, i ‘ve been asked if i could keep all the mails in queue and also provide a copy to a gmail account. After google searching about postfix rewrite and re-queue i ‘ve came to automatic recipient bcc.

In my /etc/postfix/ (or you can use postconf) i added this line:

recipient_bcc_maps = regexp:/etc/postfix/recipient_bcc_maps

If you are a careful reader then you have noticed that i wrote regexp for my recipient map file.
And the reason is that i wanted to combine all the mails that came to the backup mx server.

This is my /etc/postfix/recipient_bcc_maps:


Of course i had to reload postfix in the vps and send a test email to verify that the blind copy for all the domain is working.

If you want to re-queue all the mails then you have to do something like this:

postsuper -r ALL

PS: As the Journey have said: Don’t Stop Believing …. in Santa Claus
Have a nice holiday :)

  1. Avatar di infl00p infl00p

    Thursday, December 23, 2010 - 19:50:54

    I’d like to add a note regarding the keeping of a copy (BCC add). It is illegal to read any user e-mail even if it’s your company. From the time you provide an e-mail service, you are considered a provider and the users privacy is protected by law.
    The employees must sign an agreement with the company if the management or admins intent to read emails.
    Exceptions for e-mail copy are backup and technical troubleshooting.