CentOS - mail archive (bcc)
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
- add to the
/etc/postfix/main.cf
always_bcc = backup@localhost
- 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
- add to the
/etc/postfix/main.cf
recipient_bcc_maps = hash:/etc/postfix/recipient_bcc
sender_bcc_maps = hash:/etc/postfix/sender_bcc
- execute
touch /etc/postfix/sender_bcc
touch /etc/postfix/recipient_bcc
- edit
sender_bcc
/recipient_bcc
in format:
user1 archive@localhost
user2 archive@localhost
user3 archive@localhost
- execute to create or update
sender_bcc.db
andrecipient_bcc.db
postmap /etc/postfix/recipient_bcc
postmap /etc/postfix/sender_bcc
- restart postfix
/etc/init.d/postfix restart