Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop-in replacement for sendmail / ssmtp #37

Open
svenfoo opened this issue Feb 10, 2021 · 5 comments
Open

Drop-in replacement for sendmail / ssmtp #37

svenfoo opened this issue Feb 10, 2021 · 5 comments

Comments

@svenfoo
Copy link

svenfoo commented Feb 10, 2021

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.

@muquit
Copy link
Owner

muquit commented Feb 11, 2021

A script would be much easier to support this feature. I will give it a shot when get some time.
Thanks.

@svenfoo
Copy link
Author

svenfoo commented Feb 11, 2021

Thanks for considering my suggestion. In the meantime I found that esmtp provides what I need. I still consider it a good idea to add something similar to mailsend-go though.

@gmile
Copy link

gmile commented Apr 21, 2021

@svenfoo out of curiosity, have you considered using msmtp? https://marlam.de/msmtp/

@muquit
Copy link
Owner

muquit commented Apr 21, 2021

Do you mean to support msmtp's configuration for mailsend-go?

@gmile
Copy link

gmile commented Apr 22, 2021

@muquit (in case your question was directed to me) not really, sorry for not being clear. After stumbling upon this GH issue, I did a quick search for other smtp clients out there, found & read about msmtp, and thought it matches @svenfoo's requirements of having a sendmail-compatible tool that'd be based on a config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants