Trouble shooting email notification

Forum for questions and support relating to the 1.31.x releases only.
Locked
bbolin
Posts: 9
Joined: Wed Jul 11, 2018 3:10 pm

Trouble shooting email notification

Post by bbolin »

Hello All,

Trying to get email notification working with filters. Installed postfix and have it pointing to an internal smart host. Email tests on the Zoneminder hosts work from the command line. I've also tried NEW_MAIL_MODULES without success

mail -stest realUser@realDomain.com

And it works fine. I've tried to configure the options settings in zm for mail to either localhost or the smarthost on the network. I can see these in /var/log/syslog
~
Jul 16 12:43:46 oc2 zmfilter_9[2033]: INF [Creating notification email]
Jul 16 12:43:46 oc2 zmfilter_9[2033]: INF [Creating notification email]
Jul 16 12:43:46 oc2 zmfilter_9[2033]: INF [Creating notification email]
Jul 16 12:43:46 oc2 zmfilter_9[2033]: INF [Creating notification email]
Jul 16 12:43:46 oc2 zmfilter_9[2033]: INF [Creating notification email]
Jul 16 12:43:46 oc2 zmfilter_9[2033]: INF [Creating notification email]
Jul 16 12:43:46 oc2 zmfilter_9[2033]: INF [Creating notification email]

But nothing ever gets sent to the smarthost

zm 1.31.44
ubuntu 16.04

Thanks
bbolin
Posts: 9
Joined: Wed Jul 11, 2018 3:10 pm

Re: Trouble shooting email notification

Post by bbolin »

Fixed

Needed to install

apt install libnet-smtp-server-perl
alabamatoy
Posts: 349
Joined: Sun Jun 05, 2016 2:53 pm

Re: Trouble shooting email notification

Post by alabamatoy »

bbolin wrote: Mon Jul 16, 2018 6:21 pm apt install libnet-smtp-server-perl
Not sure of what your machine is doing beyond ZM, but having a full-fledged SMTP host installed on it is fairly high risk if you do not know how to properly secure it. Something like ssmtp can be much safer since it has no functionality beyond sending messages, and can be used with gmail and other similar services as the actual SMTP host. Root and webmin and ZM and other services can easily leverage SSMTP for notifying you of what's going on.
bbolin
Posts: 9
Joined: Wed Jul 11, 2018 3:10 pm

Re: Trouble shooting email notification

Post by bbolin »

ZM is just a security cam monitor running on my internal network. It forwards to a postfix smarthost(that connects to google TLS) for all my network email
bbolin
Posts: 9
Joined: Wed Jul 11, 2018 3:10 pm

Re: Trouble shooting email notification

Post by bbolin »

I'm actually not sure I needed to install postfix at all on the ZM box. Would libnet-smtp-server-perl have taken care of this?

As long as I have the SMTP host defined in the ZM GUI?
bbolin
Posts: 9
Joined: Wed Jul 11, 2018 3:10 pm

Re: Trouble shooting email notification

Post by bbolin »

Answer to my own question. Postfix or any other MTA is not needed for email notifications
User avatar
snake
Posts: 337
Joined: Sat May 21, 2016 2:20 am

Re: Trouble shooting email notification

Post by snake »

The wiki has a guide on Email notification from scratch here:
https://wiki.zoneminder.com/How_to_get_ ... Zoneminder

I also wrote up troubleshooting tips in addition to that article here:
https://wiki.zoneminder.com/SMS_Notifications
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Trouble shooting email notification

Post by rockedge »

It sounds like you are missing the PERL modules that perform the email notification construction.
you only need to add the PERL modules MIME::Lite and Net::SMTP
I use cpanminus I install using cpan App::cpanminus

then

Code: Select all

cpanm MIME::Lite 
cpanm Net::SMTP
these are for the new mail method. install the MIME::Entity PERL module for the traditional ZM email function.

Or look for your distro's package manager to find these PERL mods as a package and install them that way.
Locked