I have an OSX mail server set up on Mavericks (10.9.2 I believe). I'm trying to set up a few addresses that should do nothing but forward to external gmail addresses. For example, let's say I want user@example.com to forward to myname@gmail.com. If I just try to specify myname@gmail.com as the forwarding address in server.app, it doesn't work.
Oddly, internal forwarding works. For example, say I have example.com and example2.com set up on my mail server. I can successfully forward from example.com to example2.com, but not to any external domain. Any suggestions?
Best Answer
In my experience this applies to Mavericks (10.9) and Yosemite (10.10) the same way that Apple says to do it for Mountain Lion.
https://support.apple.com/en-ca/HT5032
Additionally or alternatively, there is also a configuration file at /etc/aliases, /etc/postfix/aliases, and/or /Library/Server/Mail/Config/postfix/aliases which can be edited (using
sudo
) and in the area "# Put your local aliases here." you could put the line:If you want a copy to stay in the local mailbox of user you could use:
If you want copies to go to additional accounts, they are separated by commas.
This can be used for email addresses that do not have accounts on the machine such as webmaster or postmaster.
After saving the file, one needs to run the command:
I have done this for Mavericks Server for local email addresses, recently tested it for Yosemite Server and found that it works for external address too.
Note that individual aliases can also be added for particular users in Server.app.
Also of possible use are the notes kept by "magnusviri" about managing postfix on OS X Server (3.1.2) on Mavericks 10.9.4 - there is disussion about the different locations of configuration files between /etc, /etc/postfix, and/or /Library/Server/Mail/Config/postfix/ Only one of these three locations will be being used by your setup, so editing the "wrong" files will have no effect on the system's behaviour.
http://www.magnusviri.com/OS_X_Server/os-x-server-postfix.html