What's the best mail server to run on a Linux web server for local delivery and delivery of e-mail generated by scripts? I found this old Ask HN (http://news.ycombinator.com/item?id=240713), but the responses were less than helpful.
I was recently bitten by a supposedly-simple Exim configuration that hasn't been changed in years. My VPS host recently made some datacenter changes, but failed to mention the requirement to change the name servers in /etc/resolv.conf. Since Exim couldn't deliver mail in the face of total DNS failure, and the web server continued to function, I didn't find out about the problem for quite a while. Exim was intended to be using an external SMTP server strictly as a relay for external mail, but instead was sending all mail, including local mail to root and postmaster, through the external server.
The result? Messages from my sites' contact forms (and the resulting delivery failure messages) were discarded rather than winding up in /var/spool/mail/. How did I find out? Google Analytics was showing hits to my contact forms, but I wasn't getting any e-mail.
I've fixed the DNS problem for now, but I don't want to keep using this fail-deadly setup. All I need is something that will forward mail from PHP and Ruby scripts to an external SMTP server, and deliver mail for local users into /var/spool/mail/ or similar. I don't need to receive SMTP, I don't need any custom routing, etc. I don't want to have to manage a full-blown e-mail server. Is there nothing simpler than Postfix, Exim, and Qmail?
For yet another point of view, how about using external SMTP server directly? You are sending messages as follows:
but this is easier to setup: