email with ssmtp

Forum for questions and support relating to the 1.28.x releases only.
Locked
henryco
Posts: 13
Joined: Sun Jun 15, 2014 2:10 pm

email with ssmtp

Post by henryco »

Hello ,
i have successfully tested ssmtp with the mail command line option (i get the messages).
and configured zoneminder as explained in the wiki to send messages through ssmtp.
(i'm on zm 1.28)

Everything seems all right in the Log when emails are triggered on alarms, e.g i get
info messages :

2017-01-21 09:16:30.877610 zmfilter 16667 INF Notification email sent zmfilter.pl
2017-01-21 09:16:30.875550 zmfilter 16667 INF Sending notification email 'zm_alert' zmfilter.pl
2017-01-21 09:16:30.873060 zmfilter 16667 INF Creating notification email zmfilter.pl

however i don't receive any message !

I'm wondering what else could i do to debug what is being done by ssmtp , when this perl
command occurs?
$mail->send('sendmail','/usr/sbin/ssmtp',$Config{ZM_EMAIL_ADDRESS});

thank you in advance for any advices and comments
henryco
Posts: 13
Joined: Sun Jun 15, 2014 2:10 pm

Re: email with ssmtp

Post by henryco »

I tried $mail->send('sendmail -v ','/usr/sbin/ssmtp',$Config{ZM_EMAIL_ADDRESS});
and zm does not like it :
However though it complains that sendmail -v is an Unknown send method it will eventually say INF Notification email sent !!! how can this be?
henryco
Posts: 13
Joined: Sun Jun 15, 2014 2:10 pm

Re: email with ssmtp

Post by henryco »

So i tried restarting zm:
then i got this message
Jan 21 11:21:25 localhost sSMTP[424]: /etc/ssmtp/ssmtp.conf not found
at the first time an alarm is triggered ... however all the subsequent alarms will not complain any more and i will get INF Notification email sent, as if everything was all right ?

so i'm suspecting that it was actually not able to read ssmtp.conf at any time ...(!?)
henryco
Posts: 13
Joined: Sun Jun 15, 2014 2:10 pm

Re: email with ssmtp

Post by henryco »

Fixed one thing : file revaliases could not be accessed because of wrong chmod...
now i have really no more error messages in Logs , even after restaring zm,

... but i still receive no email !

i tried a reverse alias for user apache because it is the owner of process zmfilter but it does not work better: i still get Notification email sent but no message is received
henryco
Posts: 13
Joined: Sun Jun 15, 2014 2:10 pm

Re: email with ssmtp

Post by henryco »

What is the actual user that sends email through ssmtp ? is it root ? apache?, www-data ?
how could i know ?
Locked