Q: Server side rule to BCC all mail from sender
The subject nearly says it all
I would like to set up a server side rule so that every message coming from my user joshua@example.com blind carbon copies vic@example.com immediately upon sending
Can this be done through a GUI or some other fairly transparent command? If not, what witchcraft will be required to do this simply?
thanks
Mac mini, OS X El Capitan (10.11.3), Server 5.0.15
Posted on Feb 5, 2016 9:28 AM
True that OS X uses postfix, and you'll find plenty of documentation on the topic.
But....... Most tutorials will have you running the wrong binaries (not those compiled for OS X Server app) and editing config files OS X Server doesn't use.
Best to use directions specific to OS X Server.
OS X Server: How to setup sender_bcc_maps
1. Create the text file which stores the sender bcc maps.
Use whatever method you prefer to create this file. Here is an example using pico in Terminal
sudo pico /Library/Server/Mail/Config/postfix/sender_bcc
The file may contain one more more maps with one or more spaces in between the sender and bcc_map.
It should like this:
sender@example.com bcc@example.com anothersender@example.com bcc@example.com
When done, use ctrl-x to exit and hit y to save
2. 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
3. Tell postfix where to find your new sender_bcc file
sudo /Applications/Server.app/Contents/ServerRoot/usr/sbin/postconf -e sender_bcc_maps=hash:/Library/Server/Mail/Config/postfix/sender_bcc
4. Reload postfix
sudo /Applications/Server.app/Contents/ServerRoot/usr/sbin/postfix reload
That should do it.
Posted on Feb 8, 2016 10:52 AM