Trouble shooting email notification

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

Trouble shooting email notification

Post by bbolin » Mon Jul 16, 2018 5:51 pm

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 » Mon Jul 16, 2018 6:21 pm

Fixed

Needed to install

apt install libnet-smtp-server-perl

alabamatoy
Posts: 161
Joined: Sun Jun 05, 2016 2:53 pm

Re: Trouble shooting email notification

Post by alabamatoy » Tue Jul 17, 2018 1:32 pm

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 » Tue Jul 17, 2018 1:44 pm

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 » Tue Jul 17, 2018 1:50 pm

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 » Tue Jul 17, 2018 3:32 pm

Answer to my own question. Postfix or any other MTA is not needed for email notifications

User avatar
snake
Posts: 254
Joined: Sat May 21, 2016 2:20 am

Re: Trouble shooting email notification

Post by snake » Tue Jul 17, 2018 9:24 pm

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: 1114
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA
Contact:

Re: Trouble shooting email notification

Post by rockedge » Wed Jul 18, 2018 1:30 am

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests