I have zoneminder on Ubuntu Edgy and was hoping to use the ZM_NEW_MAIL_MODULES section to use postfix to send email notifications out.
I set it up but I have not figured out how to create a filter to actually test it.
Do you use the "Execute command on all matches" section and then have it run in the background?
Can someone post a quick howto on setting up email notifications.
Sorry I feel like I am missing something simple here but I am just not getting it.
Allan
Email notifications - noob question
Emails
Yeah, I think I have email's working. This is what I did.
Option's > Email.
Then I went Filters > Show Filter Window
I created a filter called test, it has Avg Score > 15.
I ticked "Email details of all matches"
and "Execute command on all matches" (This is the one I really want to work, though it won't affect emailing.)
Then I pushed “execute”. Every candidate event was emailed to me. Note that if you get no events returned in the filter window, you have no candidate events. Try lowering the avg score.
To run in real time, save the filter with the “Run in background” box ticked in the save dialogue.
You can check to see if the email routines are running by monitoring the messages log. (var/log/messages)
The problem I have is the script in "Execute command on all matches" does not seem to execute. There is a message in the messages log that says it has been run. But it produces no output. Here is the script, as you can see it’s very simple.
Any thoughts on why this is failing? It works fine when I run it manually as a regular user.
Option's > Email.
Code: Select all
Ticked = ZM_OPT_EMAIL
ZM_EMAIL_ADDRESS = me@localhost.localdomain
Ticked = ZM_NEW_MAIL_MODULES
ZM_EMAIL_HOST = localhost.localdomain
ZM_FROM_EMAIL = tst@tst.com
ZM_URL = 192.168.0.4
I created a filter called test, it has Avg Score > 15.
I ticked "Email details of all matches"
and "Execute command on all matches" (This is the one I really want to work, though it won't affect emailing.)
Then I pushed “execute”. Every candidate event was emailed to me. Note that if you get no events returned in the filter window, you have no candidate events. Try lowering the avg score.
To run in real time, save the filter with the “Run in background” box ticked in the save dialogue.
You can check to see if the email routines are running by monitoring the messages log. (var/log/messages)
The problem I have is the script in "Execute command on all matches" does not seem to execute. There is a message in the messages log that says it has been run. But it produces no output. Here is the script, as you can see it’s very simple.
Code: Select all
#!/usr/bin/perl -w
$ENV{PATH} = '/bin:/usr/bin';
$ENV{SHELL} = '/bin/sh' if exists $ENV{SHELL};
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
system("date >> /temp/test.txt")
-
- Posts: 15
- Joined: Fri Jun 01, 2007 6:47 pm
I am having problems....so close but no e-mail yet
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. Not sure if I got the ZM URL right, my machine is not accessible from outside the internal network if that matters. I just put http://localhost/zm/zm.php, is that right? I do get the ZM main screen when I use that, but is that what the e-mail settings needs/wants?
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. Not sure if I got the ZM URL right, my machine is not accessible from outside the internal network if that matters. I just put http://localhost/zm/zm.php, is that right? I do get the ZM main screen when I use that, but is that what the e-mail settings needs/wants?
Any ideas on how to troubleshoot?
Thanks,
John