Lightweight configuration to send email
I've installed Server on a computer in my home network. I'd like to support programmatic mailing from PHP code (my particular use case is a MediaWiki installation in my Web space), shell scripts, and similar APIs. I am not interested in receiving mail, nor in sending mail on behalf of clients.
What is the simplest/best practice way to accomplish this? Possibilities:
- Turn on Mail (postfix), limit access to Private Networks. Possibly overkill, but it mostly works. I had some success in tests, but messages sent to some addresses did not arrive -- I worry about other servers rejecting the messages because this isn't a first-class mail server (for example, it doesn't have a registered domain name)
- Turn on Mail as above, add the ISP relay option pointing to my usual ISP SMTP server (where I point my mail client). My initial attempts to do this didn't work (authentication issues), but I could experiment more... Don't know if this makes other servers more likely to trust me.
- Add some settings in /Library/Server/Web/Config/php/php.ini. Of course, that only addresses the PHP use case, and duplicating the settings in a handful of different places is not ideal. Not sure if I need to use authentication here, and it seems like PHP's mail() function doesn't support it. Also, some docs indicate that these SMTP customization features are Windows only?
Appreciate any suggestions.
Mac mini, OS X Yosemite (10.10.1)