Page 1 of 2

no email

Posted: Fri Sep 30, 2005 12:19 am
by bhomass
I set up my zm to email and message out when an event is triggered. I set up smtp and all that. for filter, I used a dumb filter which simply matches the monitor id. the events are triggered just fine and matches the dumb filter. but no emails are sent. I looked at the content of Events database table, the email and message bits are always 0.

the smtp server I use is same as what I have in outlook and does not require authentication.

what could be wrong. show I at least see the email and message bits go to 1 in the Events table, even if there was a smtp error?

Posted: Fri Sep 30, 2005 12:34 am
by cordel
Check your error logs to see why they are not going out. You may need some perl modules or another package.
Regards,
Cordel

Posted: Fri Sep 30, 2005 1:00 am
by bhomass
do you mean /var/log/messages? there is no indication there. it does record the capturing and processing of the many events.

under /var/log/zm there are no files at all.

Posted: Fri Sep 30, 2005 1:05 am
by bhomass
I also tried setting delete all matches. the motion detected images are still saved. is there a way to check if event processing is working at all?

Posted: Fri Sep 30, 2005 1:13 am
by cordel
There has to be log files for zm somewhere since it will not run if it can't open it's log files. Whats the path you have configured for zm to put it's logs?
You should find that what ever is preventing you from sending emails would be noted there.
Also make sure in your options in the email tab you have configured for email correctly and check the box for zm to send emails ZM_OPT_EMAIL.
Regards,
Cordel

Posted: Fri Sep 30, 2005 1:20 am
by bhomass
ok, found them at /tmp.

zmfilter.log has
Use of uninitialized value in concatenation (.) or string at /usr/local/bin/zmfilter.pl line 916.
09/29/05 22:05:42.112121 zmfilter[18476].INF [Sending notification message '']
Use of uninitialized value in pattern match (m//) at /usr/local/bin/zmfilter.pl line 950.
Can't send email: can't build entity: no body, and not multipart
09/29/05 22:05:42.112785 zmfilter[18476].INF [Deleting event 25]

why all this uninitialized value? I did configure them when saving the filter definition.

Posted: Fri Sep 30, 2005 1:30 am
by cordel
This might be becuase the zm_email_text is incorrect. Here is the default>

Code: Select all

#
# This is the configuration file for notification emails
#
# The tags you can use in here are as follows
# %ZP% - The path to your ZoneMinder console
# %MN% - The name of the monitor
# %MET% - The total number of events for the monitor
# %MEH% - The number of events for the monitor in the last hour
# %MED% - The number of events for the monitor in the last day
# %MEW% - The number of events for the monitor in the last week
# %MEM% - The number of events for the monitor in the last month
# %MEA% - The number of archived events for the monitor
# %MP% - The path to the monitor window
# %MPS% - The path to the monitor stream
# %MPI% - The path to the monitor recent image
# %EP% - The path to the event
# %EPS% - The path to the event stream
# %EPI% - The path to the event images
# %EPI1% - The path to the first alarmed event image
# %EPIM% - The 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
# %EI% - The id of the event
# %EN% - The name of the event
# %ET% - The time of the event
# %ED% - The duration of the event
# %EF% - The number of frames in the event
# %EFA% - The number of alarm frames in the event
# %EST% - The total score of the event
# %ESA% - The average score of the event
# %ESM% - The maximum score of the event
# %FN% - The name of the current filter that matched
# %FP% - The path to the current filter that matched

# Change these to suit your own preferences
subject = "ZoneMinder: Alarm - %MN%-%EI% (%ESM% - %ESA% %EFA%)"
body = "
Hello,

An alarm has been detected on your installation of the ZoneMinder.

The details are as follows :-

  Monitor  : %MN%
  Event Id : %EI%
  Duration : %ED%
  Frames   : %EF% (%EFA%)
  Scores   : t%EST% m%ESM% a%ESA%

This alarm was matched by the %FN% filter and can be viewed at %EPS%

	# %ZP% - The path to your ZoneMinder console
	# %MN% - The name of the monitor
	# %MET% - The total number of events for the monitor
	# %MEH% - The number of events for the monitor in the last hour
	# %MED% - The number of events for the monitor in the last day
	# %MEW% - The number of events for the monitor in the last week
	# %MEM% - The number of events for the monitor in the last month
	# %MEA% - The number of archived events for the monitor
	# %MP% - The path to the monitor window
	# %MPS% - The path to the monitor stream
	# %MPI% - The path to the monitor recent image
	# %EP% - The path to the event
	# %EPS% - The path to the event stream
	# %EPI% - The path to the event images
	# %EPI1% - The path to the first alarmed event image
	# %EPIM% - The 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
	# %EI% - The id of the event
	# %EN% - The name of the event
	# %ET% - The time of the event
	# %ED% - The duration of the event
	# %EF% - The number of frames in the event
	# %EFA% - The number of alarm frames in the event
	# %EST% - The total score of the event
	# %ESA% - The average score of the event
	# %ESM% - The maximum score of the event
	# %FN% - The name of the current filter that matched
	# %FP% - The path to the current filter that matched

ZoneMinder
"
See if this corrects the problem.
Regards,
Cordel

Posted: Fri Sep 30, 2005 1:48 am
by bhomass
I have a copy of the zmconfig_eml.txt in my directory where I did the installation, and it looks identical to what you posted. is zmfilter.pl not looking there?

Posted: Fri Sep 30, 2005 2:04 am
by cordel
I'm not sure to be honest if zm actualy reads that file or during install loads that file into the database. Check your options under the email tab and just check that it matchs there.

I just checked and this is loaded into the database so check your settings under the email tab in your options.
Regards,
Cordel

Posted: Fri Sep 30, 2005 3:30 am
by bhomass
the email tab simply lets you type in the email text. you don't mean I should copy and past the entire zmconfig_tml.txt into the text field and submit it? I tried leaving the email text field blank and still no email went out.

other setting for the smtp server and so on look correct. and ZM_OPT_EMAIL is checked.

Posted: Fri Sep 30, 2005 4:33 am
by cordel
Yep there is your problem. You obviously don't need anything with a # before it as it is commented out but it is tring to populate the variables that are supposed to be set in the text. They are not there and so It don't know what to send in the email.
Regards,
Cordel

Posted: Fri Sep 30, 2005 5:13 pm
by bhomass
great, got email! attachment and all!

Thanks for help!

Posted: Fri Sep 30, 2005 7:23 pm
by bhomass
when I try to add a link to the triggering jpg image using %EPIM%, I got

hostname?view=frame&mid=20&eid=44&fid=11

this did not go anywhere. which page name do I need to complete this url?

Posted: Fri Sep 30, 2005 11:04 pm
by cordel
you need to fill in ZM_URL in the options under the email tab with your correct URL ie. http://somehost.no-ip.info:84 (incase you use a nonstandard port you have to add the :port#).
Regards,
Cordel

Posted: Sat Oct 01, 2005 12:58 am
by bhomass
definitely having a problem with this feature.

I filled in a good url for the host, and got back
http://hostip?view=frame&mid=20&eid=47&fid=11
as the link.

clicked on it, got back a good html page with a blank image, the image property shows an url of
http://192.168.1.210/events///011-capture.jpg

what is missing is the monitor name and eventID which should fill in the two missing path segments after "events/".

how can this happen? first, which cgi-bin or what ever script is awaken by
http://hostip?view=frame&mid=20&eid=47&fid=11 ?