troubleshooting email sending - Ubuntu 9.04 zm 1.24

Forum for questions and support relating to the 1.24.x releases only.
Locked
sgreszcz
Posts: 2
Joined: Tue Jun 02, 2009 10:23 am

troubleshooting email sending - Ubuntu 9.04 zm 1.24

Post by sgreszcz »

I downloaded the .deb file and installed zoneminder 1.24. All seems to be working OK, except I can't get the email alerting on alarms to work...

I am using ssmtp as my MTA, and I have tested that it is working using mutt to send an email and can see evidence of the sending in /var/log/mail.log

I can see that zoneminder is trying to generate the email:

Code: Select all

Jun 19 15:41:02 247 zmfilter[11757]: INF [Creating notification email] 
Jun 19 15:41:02 247 zmfilter[11757]: INF [Sending notification email 'ZoneMinder: Alarm - Cam-152 (5 - 5 3)'] 
Jun 19 15:41:02 247 zmfilter[11757]: INF [Attaching '/usr/share/zoneminder/events/1/152/011-capture.jpg] 
but for some reason it isn't sending to localhost to be relayed out.

I have tried both perl methods as configured in zoneminder.

Can someone give me some suggestions on how to further troubleshoot this?

Thank you.
User avatar
henriquejf
Posts: 77
Joined: Tue Feb 10, 2009 12:01 pm
Location: Brazil

Post by henriquejf »

yes, i have a suggestion for you, an wiki article i have published that covers that and more; please tell me if you think that was somehow useful;

http://www.zoneminder.com/wiki/index.ph ... rver_32bit

luck !
-----------------------
Henrique Barbosa
Consultant
Juiz de Fora, MG - Brazil
rtm
Posts: 4
Joined: Sat May 09, 2009 4:01 pm

Post by rtm »

Henriquejf - it was very helpful to me! Since I didn't have enough space to ftp all the images ZM is creating, your email fix now gets me something to alert me to any issues. Thanks!
(fyi - after playing around I found that %ED% and %ET% will put in the event date and time - I think that is useful to know when the alert happened versus counting that the email was delivered 'on time'. I tried to find where all of those codes may be, but alas, could not find any except what you posted. Thanks again!)
User avatar
henriquejf
Posts: 77
Joined: Tue Feb 10, 2009 12:01 pm
Location: Brazil

attachment zm codes

Post by henriquejf »

ok rtm, good to know ! the complete reference is in the documentation here:

http://www.zoneminder.com/wiki/index.php/Documentation

and what we want in it is

Code: Select all


    %EI% Id of the event 
    %EN% Name of the event 
    %EC% Cause of the event 
    %ED% Event description 
    %ET% Time of the event 
    %EL% Length of the event 
    %EF% Number of frames in the event 
    %EFA% Number of alarm frames in the event 
    %EST% Total score of the event 
    %ESA% Average score of the event 
    %ESM% Maximum score of the event 
    %EP% Path to the event 
    %EPS% Path to the event stream 
    %EPI% Path to the event images 
    %EPI1% Path to the first alarmed event image 
    %EPIM% Path to the (first) event image with the highest score 
    %EI1% Attach first alarmed event image 
    %EIM% Attach (first) event image with the highest score 
    %EV% Attach event mpeg video 
    %MN% Name of the monitor 
    %MET% Total number of events for the monitor 
    %MEH% Number of events for the monitor in the last hour 
    %MED% Number of events for the monitor in the last day 
    %MEW% Number of events for the monitor in the last week 
    %MEM% Number of events for the monitor in the last month 
    %MEA% Number of archived events for the monitor 
    %MP% Path to the monitor window 
    %MPS% Path to the monitor stream 
    %MPI% Path to the monitor recent image 
    %FN% Name of the current filter that matched 
    %FP% Path to the current filter that matched 
    %ZP% Path to your ZoneMinder console 

cheers
-----------------------
Henrique Barbosa
Consultant
Juiz de Fora, MG - Brazil
rtm
Posts: 4
Joined: Sat May 09, 2009 4:01 pm

Post by rtm »

Thanks, and I found from reading another post that %ED% doesn't do anything - %ET% was giving date AND time.
dcbour
Posts: 12
Joined: Wed Oct 07, 2009 1:30 am

Post by dcbour »

Question...where would I find these defined - are they in a file...or the database. I would like to edit the variable presented so I can embed the authentication and skin selection in the string passed. I've grepped the files and checked through the database to no avail.
Dave
PacoLM
Posts: 971
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Thanks!

Post by PacoLM »

Hi henriquejf,

Followed your email setup guide with postfix, it worked perfect in my Guruplug system, thanks a lot.

PacoLM
Locked