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

Ability to use other than sendmail mechanism for sending e-mails #323

Open
jose1711 opened this issue Apr 14, 2021 · 0 comments
Open

Ability to use other than sendmail mechanism for sending e-mails #323

jose1711 opened this issue Apr 14, 2021 · 0 comments

Comments

@jose1711
Copy link
Contributor

As mentioned at https://metacpan.org/pod/MIME::Lite#send MIME::Lite module provides a way to specify alternative to sendmail command for relaying the outgoing e-mails. For simplicity of configuration I tend to install msmtp on all my desktop systems. That works fine if the machine is always online but this of course may not be always true.

One of the solutions is a shell script that stores undelivered e-mail to a folder which you're supposed to regularly flush. For this to work I need to patch emailreports.pm as follows:

MIME::Lite->send('sendmail', '/usr/local/bin/msmtpq -t -oi -oem');

Thus instead of sendmail an msmtpq script is called which does some tests and finally relays the e-mail to msmtp. If unsuccessful it puts the message into outgoing queue where it waits for another connection attempt.

It would be great if monitorix gives me a chance to configure alternative sendmail program using configuration directive so that I would not need to patch it manually after each update.

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

1 participant