I wanted to share my problem and solution with you and maybe some of you will find this useful,
My OS is Linux Mandrake 10 and I had problems getting Email filter to send messages.
All previous versions of ZoneMinder did the same thing, did not send mail WHY !?!? I got frustrated and decided to figure it out.
so here is what I did:
1.) "Options / Email" menu of zoneminder and made sure that it has important settings:
ZM_NEW_MAIL_MODULES: checked
ZM_EMAIL_HOST: localhost (for some of you it could be different may have to use your ISP's SMTP host, contact them and ask)
ZM_FROM_EMAIL: me@myhost.com
ZM_URL: http://www.myhost.com/zminstallfolder/
2.) E-mail is still not working, what's next ?
I went to ZM forums and found out that filter has to be created in order to send emails!
Ok, that makes sense! ZM needs to know when and which alerts to send.
3.) creating new filter
clicked on the number of events (the total) then in the new window the one that has all the events listed "ShowFilterWindow"
in the FilterWindow i have configures the following rule:
"Alarm Frames" "greater than" "20"
click Save
the filter could be saved with a new name, ok let it be "Email"
checked the following boxes:
Automatically archive all matches:
Automatically email details of all matches:
Automatically message details of all matches:
Hit Save !
4.)
The email is still not working! what is wrong?
for Linux junkies the following command will make sense:
tail -f /var/log/messages
Output:
Sep 22 13:15:22 bludov zmc_dvideo[20768]: INF [New: 127000 - Capturing at 30.30 fps]
Sep 22 13:15:23 bludov zma_m1[20772]: INF [New: 127000 - Processing at 29.41 fps]
Sep 22 13:15:27 bludov zmdc[20745]: INF [Starting pending process, zmfilter.pl]
Sep 22 13:15:27 bludov zmdc[21179]: INF ['zmfilter.pl' started at 06/09/22 13:15:27]
Sep 22 13:15:27 bludov zmdc[20745]: INF ['zmfilter.pl' starting at 06/09/22 13:15:27, pid = 21179]
Sep 22 13:15:27 bludov zmdc[20745]: ERR ['zmfilter.pl ' exited abnormally, exit status 2]
"exited abnormally" F ^@%! that is not good, now I need to see what makes zmfilter.pl (perl) script to freak out.
now it is probably not a bad idea to check if zmfilter can run and the Perl has all required modules installed.
cd /usr/local/bin/zmfilter.pl
./zmfilter.pl
Can't locate MIME/Lite.pm in @INC (@INC contains: /usr/lib/perl5/5.8.3/i386-linux-thread-multi /usr/lib/perl5/5.8.3 /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl) at ./zmfilter.pl line 80.
OOH SNAP! my perl is missing "MIME::Lite" package,
it's time to install the package!
perl -MCPAN -e shell
install MIME::Lite
5.)
tail -f /var/log/messages
Output:
Sep 22 13:26:20 bludov zmfilter[21371]: INF [Scanning for events]
Sep 22 13:26:25 bludov zmfilter[21371]: INF [Archiving event 106]
Sep 22 13:26:25 bludov zmfilter[21371]: INF [Creating notification email]
Sep 22 13:26:25 bludov zmfilter[21371]: INF [Sending notification email 'ZoneMinder: Alarm - New-106 (39 - 13 158)']
Sep 22 13:26:26 bludov zmfilter[21371]: INF [Notification email sent]
It works now!
P.S.
Thank you for developing ZoneMinder, excellent work !
Email Filter
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
-
- Posts: 33
- Joined: Thu Oct 26, 2006 6:00 pm
-
- Posts: 15
- Joined: Fri Jun 01, 2007 6:47 pm
Almost works....
THanks for this, I used the instructions to fix most my problems, but now I get this from my messages:
Jun 1 08:00:28 linux2 zmfilter[12906]: INF [Creating notification message]
Jun 1 08:00:28 linux2 zmfilter[12906]: INF [Sending notification message 'ZoneMinder: Alarm - Front_Door-111']
Jun 1 08:00:28 linux2 zmfilter[12906]: INF [Archiving event 112]
Jun 1 08:00:28 linux2 zmfilter[12906]: INF [Creating notification email]
Jun 1 08:00:28 linux2 zmfilter[12906]: INF [Sending notification email 'ZoneMinder: Alarm - Front_Door-112 (32 - 10 25)']
Jun 1 08:00:28 linux2 zmfilter[12906]: INF [Creating notification message]
Jun 1 08:00:28 linux2 zmfilter[12906]: INF [Sending notification message 'ZoneMinder: Alarm - Front_Door-112']
Jun 1 08:00:28 linux2 zmfilter[12906]: INF [Archiving event 117]
Jun 1 08:00:28 linux2 zmfilter[12906]: INF [Creating notification email]
Jun 1 08:00:28 linux2 zmfilter[12906]: INF [Sending notification email 'ZoneMinder: Alarm - Front_Door-117 (70 - 27 291)']
Looks like it never sends.
Any ideas on how to troubleshoot?
Thanks,
John
Jun 1 08:00:28 linux2 zmfilter[12906]: INF [Creating notification message]
Jun 1 08:00:28 linux2 zmfilter[12906]: INF [Sending notification message 'ZoneMinder: Alarm - Front_Door-111']
Jun 1 08:00:28 linux2 zmfilter[12906]: INF [Archiving event 112]
Jun 1 08:00:28 linux2 zmfilter[12906]: INF [Creating notification email]
Jun 1 08:00:28 linux2 zmfilter[12906]: INF [Sending notification email 'ZoneMinder: Alarm - Front_Door-112 (32 - 10 25)']
Jun 1 08:00:28 linux2 zmfilter[12906]: INF [Creating notification message]
Jun 1 08:00:28 linux2 zmfilter[12906]: INF [Sending notification message 'ZoneMinder: Alarm - Front_Door-112']
Jun 1 08:00:28 linux2 zmfilter[12906]: INF [Archiving event 117]
Jun 1 08:00:28 linux2 zmfilter[12906]: INF [Creating notification email]
Jun 1 08:00:28 linux2 zmfilter[12906]: INF [Sending notification email 'ZoneMinder: Alarm - Front_Door-117 (70 - 27 291)']
Looks like it never sends.
Any ideas on how to troubleshoot?
Thanks,
John
From vbluov's first post
To use localhost you must have sendmail (or postfix on mandriva) properly configured. It's much simpler to use your ISP's mail host.
What are you using for ZM_EMAIL_HOST ?ZM_EMAIL_HOST: localhost (for some of you it could be different may have to use your ISP's SMTP host, contact them and ask)
To use localhost you must have sendmail (or postfix on mandriva) properly configured. It's much simpler to use your ISP's mail host.
-
- Posts: 15
- Joined: Fri Jun 01, 2007 6:47 pm
It works! Now how can I attach an avi or mpg file ?
I have sendmail working, but I put in my ISP smtp for ZM_EMAIL_HOST.
Now, how can I attach an avi or mpg file of the event?
Thanks,
John
Now, how can I attach an avi or mpg file of the event?
Thanks,
John
-
- Posts: 33
- Joined: Thu Oct 26, 2006 6:00 pm
Attach file
I got sendmail working.
Does anybody know how to send an image attached to the email message?
Thanks,
Daniel Areas
Does anybody know how to send an image attached to the email message?
Thanks,
Daniel Areas