How to copy (bcc) all mail from specific senders to another address
Sender BCC Maps allow you to specify one or more senders along with a bcc_recipient
address.
When an incoming or outgoing message matches sender_bcc_maps
, the message is BCCd to the specified address
A few examples
- BCC all mail sent from a fax or copier to a Fax/Copier archive
- Bob wants all mail he sends from his 3 company addresses copied to his AOL account
- Audit mail from a specific address
Create the sender_bcc
file
Here is how I would create the file using pico.
note: when done editing with pico, hit ctrl-x
to exit and y
to save
sudo pico /Library/Server/Mail/Config/postfix/sender_bcc
Then you can start entering the following:
# sender-address [space(s)] bcc-address
sender@example.com archive@example.com
anothersender@example.com archive@example.com
Alternatively you can use a plain text editor of your choice.
Run postmap anytime you edit the sender_bcc file
sudo /Applications/Server.app/Contents/ServerRoot/usr/sbin/postmap /Library/Server/Mail/Config/postfix/sender_bcc
Tell postfix where to find your new sender_bcc file then reload postfix
sudo /Applications/Server.app/Contents/ServerRoot/usr/sbin/postconf -e sender_bcc_maps=hash:/Library/Server/Mail/Config/postfix/sender_bcc
sudo /Applications/Server.app/Contents/ServerRoot/usr/sbin/postfix reload
To disable sender_bcc_maps
sudo /Applications/Server.app/Contents/ServerRoot/usr/sbin/postconf -e sender_bcc_maps=
sudo /Applications/Server.app/Contents/ServerRoot/usr/sbin/postfix reload
Leave a Reply
Want to join the discussion?Feel free to contribute!