I'm throwing in
mail/ssmtp as a very lightweight replacement for sendmail.
If all you want is to get local mails out, e.g. through your regular mailserver or a mail relay in your local network, ssmtp makes it dead-simple. It also supports TLS/STARTTLS and user/password login on the remote MTA, so you can just hand out regular mail accounts on your mailserver for your servers and don't have to configure a "half open relay" by whitelisting IPs or something similar.
For a "regular" mailserver I always reverted to Postfix - it's extremely flexible, rock-solid and (if properly laid out) the config is very maintenance-friendly and readable. It's also extremely robust and battle-tested - with a sensible rule/milter order it can withstand huge spam attacks even on very small VPS without any problem. I usually only recognize there was something going on when receiving my weekly statistics and there were several (tens of) thousands rejected emails
I've tested a bit with OpenSMTPd for my private mailserver, but IMHO it really lacks the flexibility of postfix and documentation on how to use milters is extremely scarce (or even non-existent). After hours of digging you might find out that they changed the API a while ago and did'nt yet fixed a new one, so milters won't work until the API is stable again...
So for a production server OpenSMTPd was a no-go for me - although the configuration syntax is very nice as it basically resembles PF config language which makes it very easy to read and enables you to build somewhat complex rule dependencies by making "fall through" rules and order them as needed. Although this may make the overall layout of the config file a bit messy. Especially after the recent change to 2-line syntax and when the milter-API is fixed I'll definately have another look at it as it might be a viable alternative to Postfix.
Thanks. Only Sendmail is used to receive system functions such as messages sent by periodic. The other is for the usual mail service.
Can't use the same port. This is probably a problem.
You usually don't run two MTAs on the same system. All (?) MTAs have some kind of sendmail-compatibility, so local delivery can still be done through a sendmail-imitating interface. Usually you just update the /etc/mail/mailer.conf to point to the binary of the MTA (or its sendmail-counterpart) and you're done.
At least ssmtpd gives you all the instructions after installation (from packages):
Code:
To replace sendmail with ssmtp type "make replace" or change
your /etc/mail/mailer.conf to:
sendmail /usr/local/sbin/ssmtp
send-mail /usr/local/sbin/ssmtp
mailq /usr/local/sbin/ssmtp
newaliases /usr/local/sbin/ssmtp
hoststat /usr/bin/true
purgestat /usr/bin/true