Page 1 of 1

Mail notifications doesn't work[1.24.2]

Posted: Sun Mar 20, 2011 10:09 am
by darco
Hi,
my installation doesn't send email notifications.
I've already enabled email notifications in the EMAIL tab in options.
This in my /var/log/messages when it detect an alarm.

Code: Select all

Mar 20 10:44:33 p3 zma_m2[3236]: INF [Monitor-2: 4000 - Processing at 19.23 fps]
Mar 20 10:45:06 p3 zmc_dvideo0[3233]: INF [Monitor-2: 5000 - Capturing at 20.00 fps]
Mar 20 10:45:18 p3 zma_m2[3236]: INF [Monitor-2: 4880 - Gone into alarm state]
Mar 20 10:45:18 p3 zma_m2[3236]: INF [Monitor-2: 4880 - Opening new event 108, alarm start]
Mar 20 10:45:19 p3 zma_m2[3236]: INF [Monitor-2: 4886 - Gone into alert state]
Mar 20 10:45:20 p3 zma_m2[3236]: INF [Monitor-2: 4893 - Gone back into alarm state]
Mar 20 10:45:23 p3 zma_m2[3236]: INF [Monitor-2: 4914 - Gone into alert state]
Mar 20 10:45:24 p3 zma_m2[3236]: INF [Monitor-2: 4924 - Left alarm state (108) - 54(27) images]
Mar 20 10:45:24 p3 zma_m2[3236]: INF [Monitor-2: 4924 - Closing event 108, alarm end]
Mar 20 10:45:28 p3 zma_m2[3236]: INF [Monitor-2: 5000 - Processing at 18.18 fps]
Mar 20 10:45:55 p3 zmc_dvideo0[3233]: INF [Monitor-2: 6000 - Capturing at 20.41 fps]
Mar 20 10:46:18 p3 zma_m2[3236]: INF [Monitor-2: 6000 - Processing at 20.00 fps]
Mar 20 10:46:46 p3 zmc_dvideo0[3233]: INF [Monitor-2: 7000 - Capturing at 19.61 fps]
Mar 20 10:47:09 p3 zma_m2[3236]: INF [Monitor-2: 7000 - Processing at 19.61 fps]
Mar 20 10:47:36 p3 zmc_dvideo0[3233]: INF [Monitor-2: 8000 - Capturing at 20.00 fps]
I searched online and I founded this log.. zmfilterseems to be responsible for sending notifications... it must be enabled manually?

Code: Select all

10/09/08 18:55:21.633636 zmfilter[21651].INF [Creating notification email]
10/09/08 18:55:21.634511 zmfilter[21651].INF [Sending notification email 'ZoneMinder: Alarm - Camera1-104 (5 - 3 13)']
10/09/08 18:55:21.640084 zmfilter[21651].INF [Notification email sent]
10/09/08 18:55:21.644063 zmfilter[21651].INF [Executing '/usr/lib/zm/bin/zmeventdump /var/www/html/zm/events/1/104'] 

Thanks! :D

Re: Mail notifications doesn't work[1.24.2]

Posted: Sun Mar 20, 2011 1:14 pm
by PacoLM
Hi,

You will have to edit the /usr/bin/zmfilter.pl file and replace the lines (there are two of them):

MIME::Lite->send( "smtp", ZM_EMAIL_HOST, Timeout=>60 );

with:

MIME::Lite->send( "smtp", ZM_EMAIL_HOST, Timeout=>60, AuthUser='your@email.com', AuthPass='yourpass' );

Hope it helps,

PacoLM

Re: Mail notifications doesn't work[1.24.2]

Posted: Sun Mar 20, 2011 6:47 pm
by darco
Thanks for you replay Paco.

I've edited as your post but seems doesn't work.
This is my /tmp/zmdc.log
20/03/2011 19:37:23.065857 zmdc[2704].INF ['zmfilter.pl' starting at 11/03/20 19:37:23, pid = 2803]
20/03/2011 19:37:28.565843 zmdc[2704].ERR ['zmfilter.pl ' exited abnormally, exit status 9]
A question: I've to insert the sender email and password?

Thank you :D

Re: Mail notifications doesn't work[1.24.2]

Posted: Fri Mar 25, 2011 6:31 pm
by darco
Noone can help me?

Re: Mail notifications doesn't work[1.24.2]

Posted: Fri Mar 25, 2011 8:42 pm
by PacoLM
Yes, you have to replace the line (see that is different, I forgot the '>' after the '='):

MIME::Lite->send( "smtp", ZM_EMAIL_HOST, Timeout=>60, AuthUser=>'your@email.com', AuthPass=>'yourpass' );

With a valid email and password. Of course, you will also need to setup postfix, follow the steps thru the installation of it.

Hope it helps,

PacoLM

Re: Mail notifications doesn't work[1.24.2]

Posted: Sat Mar 26, 2011 7:22 pm
by darco
Resolved!!!

Thank you very much Paco for your advice!
The problem was that I didn't have defined the filter!! :-\