Mail notifications doesn't work[1.24.2]

Forum for questions and support relating to the 1.24.x releases only.
Locked
darco
Posts: 4
Joined: Sun Mar 20, 2011 9:55 am

Mail notifications doesn't work[1.24.2]

Post 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
PacoLM
Posts: 971
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Re: Mail notifications doesn't work[1.24.2]

Post 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

After more than 15 years, no longer using ZM as surveillance system.
Now in the dark side, using a commercial system...
darco
Posts: 4
Joined: Sun Mar 20, 2011 9:55 am

Re: Mail notifications doesn't work[1.24.2]

Post 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
darco
Posts: 4
Joined: Sun Mar 20, 2011 9:55 am

Re: Mail notifications doesn't work[1.24.2]

Post by darco »

Noone can help me?
PacoLM
Posts: 971
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Re: Mail notifications doesn't work[1.24.2]

Post 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

After more than 15 years, no longer using ZM as surveillance system.
Now in the dark side, using a commercial system...
darco
Posts: 4
Joined: Sun Mar 20, 2011 9:55 am

Re: Mail notifications doesn't work[1.24.2]

Post by darco »

Resolved!!!

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