ZM & Mail on LiveCD ?

Support and queries relating to third party Live CDs and DVD, VM images and other packaged distributions
msevestre
Posts: 16
Joined: Thu Jun 29, 2006 6:18 am

ZM & Mail on LiveCD ?

Post by msevestre »

Hello,

I am facing black point on my ZM configuration.

Today I have Zm configured with one monitor, an active area and I have FTP setup to send to a FTP server the event-related JPEGs.

I would like to be able to send an Email when an event occurs... I was expecting to be able to use my ISP (with authentication) SMTP, but it seems it's not possible to use this kind of connection to send mail with ZM.

Is there a HOW TO that could help me to configure what is necessary on latest Ross' LiveCD with ZM 1.22 to make the whole thing work ??

Thanks for any help
Matt
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

I don't beleive you can email if your ISP requires SMTP with auth. But this is going to be an issue for more users as time goes on. So I will work on a solution.

I have no way to test SMTP with auth, so would you be willing to test if I send you modified zmfilter.pl?
msevestre
Posts: 16
Joined: Thu Jun 29, 2006 6:18 am

Post by msevestre »

Hi !

OK for me, if you teach me how to manage everything; perhaps i could help :)

Finally, it seems that autheticated SMTP is not very common... Yahoo use it but it's not the case of most.

My ISP does not seems to use authetication then I think I'll go with it... I configured ZM with smtp.free.fr as SMTP server, but I nothing arrived until now (I had event captured) :(

I'm not at home right now to test think using command line, I have only remote access to ZM interface.

Matt
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

Ross I can open you an account on one of my mail servers to test smtp auth on either a windows or linux server, just let me know
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

My ISP does not seems to use authetication then I think I'll go with it... I configured ZM with smtp.free.fr as SMTP server, but I nothing arrived until now (I had event captured)


I'm not sure if you're saying you can use SMTP without auth. If so you should be able to make it work.
To test, first create a filter with a line "Ave. Score equal to 255" and save it, selecting "Automatically email details of all matches:"
Now if you force an alarm in the Watch window this filter will catch it and try to mail it.
Next run this command in a konsole window:

Code: Select all

sudo tail -f /var/log/zm/zmfilter.log
Watch and see if any errors when the filter runs.
Ross I can open you an account on one of my mail servers to test smtp auth on either a windows or linux server, just let me know
Yes please James
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

ok mate ill pm you use names etc
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
msevestre
Posts: 16
Joined: Thu Jun 29, 2006 6:18 am

Post by msevestre »

Ross,

thanks for the help... I'll try all this at home tonight :)

Matt
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

Code: Select all

Quote: 
My ISP does not seems to use authetication then I think I'll go with it... I configured ZM with smtp.free.fr as SMTP server, but I nothing arrived until now (I had event captured) 
A lot of isp's use some wierd sort of pop/smtp auth ie you authenticate your pop3 then smtp is allowed for a set time from your ip. This assumes you will check for new messages before sending new one's. This works fine with oe etc but not with zm as you never check email.
Others on here (i have read) set their ow sendmail to intercept the messages then use smtp auth to actually send them. Or you could set your own mail server up on a static to handle this then use ip filtering to bypass auth (as i do)
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
msevestre
Posts: 16
Joined: Thu Jun 29, 2006 6:18 am

Post by msevestre »

Hi !

I tried what you told me Ross... Generating an alarm manually displays only that zmeventdump is executed with dump ID equl to the event generated... but nothing comes to my mail.

Any other dump I may check ?

Matt
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

I tried what you told me Ross... Generating an alarm manually displays only that zmeventdump is executed with dump ID equal to the event generated... but nothing comes to my mail.
OK you're not getting to first base then. Things to check

1. Did you install from ZMliveCD_1.22.2.1. (if zmeventdump is running on events I would say yes) If from and earlier CD (Like 1.22.2) you will need to upgrade your zm RPM. Get the latest here: http://www.elltel.net/melins/mdv_2006/
In fact if you did install from the latest CD you should upgrade your zm RPM anyway because the latest will fix a permissions bug that will affect creating videos and perhaps other functions. This is not a new version of zm, just a new version of the RPM package.

2. Did you, in the email tab of the Options window, select ZM_OPT_EMAIL, ZM_NEW_MAIL_MODULES, and enter a value for ZM_EMAIL_HOST.

3. Did you save a filter as instructed above with the "Automatically email details of all matches:" option.

If you have done all of the above you will see at least an attempt to send out an email in zmfilter.log
msevestre
Posts: 16
Joined: Thu Jun 29, 2006 6:18 am

Post by msevestre »

Hi Ross !
1. Did you install from ZMliveCD_1.22.2.1. (if zmeventdump is running on events I would say yes) If from and earlier CD (Like 1.22.2) you will need to upgrade your zm RPM. Get the latest here: http://www.elltel.net/melins/mdv_2006/
I installed everything from the LiveCD "ZoneMinder LiveCD v1.22.2" available in Download section of this web site.
In fact if you did install from the latest CD you should upgrade your zm RPM anyway because the latest will fix a permissions bug that will affect creating videos and perhaps other functions. This is not a new version of zm, just a new version of the RPM package.
OK, then I must now find a thread somewhere that explains how to do this updgrade :)
2. Did you, in the email tab of the Options window, select ZM_OPT_EMAIL, ZM_NEW_MAIL_MODULES, and enter a value for ZM_EMAIL_HOST.
ZM_OPT_EMAIL is checked
ZM_NEW_MAIL_MODULE is not checked
SM_EMAIl_HOST is set to my isp STMP (smtp.free.fr)
3. Did you save a filter as instructed above with the "Automatically email details of all matches:" option.
Yes, as you explained me above...

I'll check more... must a expect on zmfilter.log something really explicit telling "sending email" ??

Matt
msevestre
Posts: 16
Joined: Thu Jun 29, 2006 6:18 am

Post by msevestre »

Hello !

I tried to check the ZM_NEW_MAIL_MODULE but no success...

BUT I was able to get mails sent after filling in ZM_FROM_EMAIL :)

A question: is there a way to NOT to have a MPEG generated and added to the mail ? Because right now, I am getting a 500Kb mail when an event matching the filter occurs... JPEG could be linked to the mail but MPEG is too big (a remote connection will be done to watch event).

EDIT:

I found the answer... I had to remove
# %EV% - Attach event mpeg video

from the mail body :)

Encore un grand bravo !!! From France :wink:

Thanks
Matt
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

No problem. Forums are all about self-help :)
Phil
msevestre
Posts: 16
Joined: Thu Jun 29, 2006 6:18 am

Post by msevestre »

:wink:

Perhaps you should set some advice about the field ZM_FROM_EMAIL that seems mandatory for mail configuration :)

Matt
jason_donaldson
Posts: 2
Joined: Sat Feb 03, 2007 12:56 am

Post by jason_donaldson »

I have a similar problem. I cannot see any attempt to mail in zmfilter.log when I create alarm events. I have set the following ZM_OPT_EMAIL, ZM_NEW_MAIL_MODULES, ZM_EMAIL_HOST and saved the filter as instructed with the "Automatically email details of all matches.

I am running v1.22.2 from the live cd. I could not get the link posted some time ago for RPM to work.

I have already checked that my ISP does not require authentication but I think my problem must be more fundamental than that if I am not receiving anything in zmfilter.log.

Any help would be greatly appreciated.
Post Reply