SSMTP and a couple similar projects are simplified replacements for behemoths sendmail, postfix or exim. It forwards all the mail it receives to a real SMTP server.
That's exactly what I need--almost. I have one additional requirement. I run cron jobs that send me email. I could tell cron to send email to my external address, but that adds an unnecessary dependency on the internet.
I want to be able to inspect mail sent to the SMTP port. If the 'to' address is of the form "user@example.com", it should be passed on to the external server. But if it's of the form "user@machine", then it's probably from cron (or maybe some other program) and I want it passed to maildrop for delivery on this machine.
So I just need a hook in SSMTP to catch the local stuff.
Is there already such a program anwhere?