Monitorix
Monitorix copied to clipboard
Ability to use other than sendmail mechanism for sending e-mails
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.