Postfix EmailBackup method:
The BCC function of postfix can send all emails in the Postfix queue to the specified mailbox according to the specified rules.
Postfix has three BCC parameters:
①. Always_bcc: Back up all Postfix emails to the specified email address;
② Sender_bcc_maps: the Postfix email that contains the recipient in the map file is assigned to the specified mailbox;
③ Recipient_bcc_maps: the Postfix email that contains the recipient in the map file is assigned to the specified mailbox.
1. Use the Postfix of recipient_bcc_maps and sender_bcc_maps
# Vi/etc/Postfix/Main. Cf # Add the following two lines
Recipient_bcc_maps = hash:/etc/Postfix/recipient_bcc
Sender_bcc_maps = hash:/etc/Postfix/sender_bcc
# Cat sender_bcc
[Email protected] [email protected]
# Cat recipient_bcc
[Email protected] [email protected]
# Postmap/etc/Postfix/sender_bcc
# Postmap/etc/Postfix/recipient_bcc
#/Etc/init. d/Postfix reload
2. How to Use always_bcc Postfix
# Vi/etc/Postfix/Main. Cf # Add the following line
Always_bcc = [email protected]
#/Etc/init. d/Postfix reload
Note: If the BBC Bounce Message is returned, the Postfix email will be returned to the sender.
Postfix backup method