mailsend-go icon indicating copy to clipboard operation
mailsend-go copied to clipboard

Drop-in replacement for sendmail / ssmtp

Open svenfoo opened this issue 3 years ago • 5 comments

I am administering a UNIX system and I'd like it to be able to send mails from cron jobs. Of course I could install a full-fledged MTA, but I'd like to keep things simple. ssmtp seems to be the recommended solution, but I found that it doesn't implement SASL properly and the Postfix server on the other side won't accept mails from ssmtp. Since ssmtp seems unmaintained I started looking for alternatives and came across mailsend-go. I've tested it with my Postfix server and it seems to work nicely.

Unfortunately I can not just use mailsend-go as a drop-in replacement for sendmail, the way that ssmtp allows it. Thus I would like to suggest this as a feature. The mailsend-go binary could provide a sendmail-compatible mode that is activated when called as sendmail. It would then read some configuration like the SMTP server, port, credentials, etc. from a config file and accept the mail the way that sendmail accepts it, with To:, From: Subject:, ... headers followed by the mail body. That way it could be invoked by cron or other system tools that expect a sendmail compatible MTA.

Is that a reasonable feature request? Would there be interest in adding such a feature to mailsend-go? I imagine that it could either be implemented in mailsend-go directly, or there could be a wrapper script that provides the sendmail interface and adapts it to the existing mailsend-go command-line interface.

svenfoo avatar Feb 10 '21 14:02 svenfoo