How-to use Postfix BCC
If you for some reasons don't want use built-in mail archive system. (for example remote mail backup)

  • If you need to archive all mail (inbound and outbound) - use "always_bcc"

1. add to the /etc/postfix/main.cf

always_bcc = backup@localhost

2. restart postfix

/etc/init.d/postfix restart
  • If you need to archive mail from few mail accounts - use "recipient_bcc_maps" and "sender_bcc_maps"

1. add to the /etc/postfix/main.cf

recipient_bcc_maps = hash:/etc/postfix/recipient_bcc
sender_bcc_maps = hash:/etc/postfix/sender_bcc

2. execute

touch /etc/postfix/sender_bcc
touch /etc/postfix/recipient_bcc

3. edit sender_bcc / recipient_bcc in format:

user1 archive@localhost
user2 archive@localhost
user3 archive@localhost

4. execute to create or update sender_bcc.db and recipient_bcc.db

postmap /etc/postfix/recipient_bcc
postmap /etc/postfix/sender_bcc

5. restart postfix

 /etc/init.d/postfix restart