Event notifications do not work

Forum for questions and support relating to the 1.29.x releases only.
farsight
Posts: 1
Joined: Mon Jan 15, 2018 3:05 pm

Re: Event notifications do not work

Post by farsight »

Simpler wrote: Sun Nov 20, 2016 7:59 pm I just run into this same problem after upgrading from 1.29.0 to 1.30.0 on Linux Mint 17.2 (based on Ubuntu 14.04).

I've been beating my head against a wall all day trying to figure this out until I ran across this post.

The message that I was getting in the logs with ZoneMinder 1.30.0 was:
Can't send email: SMTP Failed to connect to mail server: Connection refused at /usr/bin/zmfilter.pl line 918.

After I edited line 918 from

Code: Select all

            $mail->send();
to

Code: Select all

            $mail->send('sendmail','/usr/sbin/ssmtp',$Config{ZM_EMAIL_ADDRESS});
and restarting zoneminder, I was miraculously able to get notifications.

The wiki at https://wiki.zoneminder.com/How_to_get_ ... Zoneminder says that this is no longer needed with 1.30.0, but this is incorrect.

Thank you so much for posting this.
Thankyou SOOOOO MUCH! I've spent hours banging my head against the wall over this. This quick replacement of code saved my life. I am running version 1.30.4

Also, CHECKING THE BOX ON, for this part in the wiki, also helped a lot, wiki is a little confusing. SSMTP_MAIL = ON!

Image
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Event notifications do not work

Post by knight-of-ni »

@farsight It looks like you tried to attach a screenshot, but I am not able to see it.

Take a look at the block of code here:
https://github.com/ZoneMinder/zoneminde ... pl.in#L799

If you've enabled SSMTP_MAIL under options and the path to your binary is set correctly (SSMTP_PATH), then zoneminder will in fact use the ssmtp binary the way you want it to. If you are running 1.30.4, there is no need to edit the perl source code.

If it can't find the ssmtp binary, then zoneminder will fall back to the old method $mail->send().
You can verify this by turning on debug. Zoneminder will complain in the logs if something isn't right and tell you it is falling back to the former method.

Indeed this is case if you look at the screenshots posted earlier in this thread, the SSMTP_PATH field has been left empty.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
Locked