I have been thinking about different ways to handle an issue on my new server build, and was interested in hearing opinions on others who might have done something similar.
Basically, I want my new home server to be able to have outgoing email capability so it can send various status reports and logs to my phone. I have been looking at different ways to go about this and a few solutions have come up.
Obviously I don't want to run a full sendmail daemon to simply send the occasional email from a single account. I understand that I can run sendmail in a mode where outgoing mail is queued and is occasionally sent out via a cron job. This sounded reasonable at first, but it means that any messages the server wanted to send me would have to sit in limbo until the next cron interval. Even if I was running a rather aggressive cron job (say, every 5 minutes), there are still situations in which I would want the message to be sent as quickly as possible (UPS triggered, hardware overheat, etc). Is there a method by which sendmail can instantly send an outgoing email without having to run the full daemon?
The other option I have been looking at are small SMTP clients, like
msmtp. I was thinking I could simply make up a GMail account for the server, configure it in msmtp, and just use that. Aside from relying on an outside mail server/account, is there any downside to this method? It seems like this would be the easiest, and certainly the least taxing on resources. I know there are a few applications available that perform this function, is there a better one I should be checking out?
Any opinions on which direction I should take this? Is there another method I am overlooking? It probably goes without saying, but whatever method I go with needs to be easily scriptable.