email notification

Support and queries relating to all previous versions of ZoneMinder
Post Reply
kuzotare
Posts: 10
Joined: Sat Oct 27, 2007 1:09 am

email notification

Post by kuzotare » Sat Oct 27, 2007 1:21 am

Hi everybody
i'm new user of zoneminder

I am trying to configure the notification by mail
You carry-over of following what I have configured on options:


ZM_NEW_MAIL_MODULES checked
ZM_EMAIL_HOST smtp.myisp.it
ZM_FROM_EMAIL mymail@myisp.it
ZM_URL http://ipaddress/zm

I have created a filter, specifying the criterion of sending on an motion event

But nothing seems to work... my ISP requires the user authentication on smtp.... How can I solve? I have read many topic, few concrete solutions, I have understood that it is necessary to use Sendmail or something enabling that relay with SMTP authentication to the ISP. You can trying to tell me step by step the resolution of the problem. I thank advance to all and I apologise for my worst English

bye

kuzotare
Posts: 10
Joined: Sat Oct 27, 2007 1:09 am

Post by kuzotare » Sat Oct 27, 2007 3:15 am

Is there a way to remedy that problem, launching, for alarm received, a mail client with the object, text, graphics.... In this way you would to the problem of authentication SMTP server

In this way en solve the problem of authentication SMTP server of my ISP

User avatar
Lee Sharp
Posts: 1069
Joined: Sat Mar 31, 2007 9:18 pm
Location: Houston, TX

Post by Lee Sharp » Sat Oct 27, 2007 4:27 am

Sendmail can be configured to forward all outbound mail to an authenticating smtp server. However, I do not know how. I suggest support for your distribution, or a sendmail group. I just know that it can be done.

kuzotare
Posts: 10
Joined: Sat Oct 27, 2007 1:09 am

Post by kuzotare » Sat Oct 27, 2007 1:11 pm

Ubuntu 7.10 as distribution.... I opened the /etc/mail/sendmail.mc but I cannot find function to enable to use the smart host relay, to use the own my ISP

any idea?!

User avatar
MJN
Posts: 251
Joined: Wed Jan 17, 2007 10:29 am
Location: Wiltshire, UK
Contact:

Post by MJN » Sat Oct 27, 2007 5:44 pm

I run a fully-blown mail server and so can only offer the following cut-down solution based on theory - I'm pretty sure it would work without further configuration so ought to be worth a try.

Firstly, install Postfix - it is Sendmail compatible yet much easier to configure.

The default Postfix config will likely work out of the box (securely too) however you'll need to add the following (perhaps more but give it a try) to /etc/postfix/main.cf to enable Postfix to authenticate with your ISP's server:

Code: Select all

relayhost = [smtp.myisp.it]
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/outgoing_sasl_passwords
Next, create the file /etc/postfix/outgoing_sasl_passwords with the following in it:

Code: Select all

smtp.myisp.it     <username>:<password>
(substituting your credentials as required)

Finally, create a lookup table for Postfix to use (it can't use the bare text file) with sudo postmap /etc/postfix/outgoing_sasl_passwords and then restart Postfix with sudo /etc/init.d/postfix restart.

You will of course have to tell ZM to use your server (localhost) as the MTA.

If it doesn't work post the output of /var/log/mail.log

Mathew

kuzotare
Posts: 10
Joined: Sat Oct 27, 2007 1:09 am

Post by kuzotare » Sat Oct 27, 2007 11:22 pm

Hi Mjn and thank for you reply

ok first of all

here my postfix main.cf

Code: Select all

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
relayhost = smtp.myisp.it
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/outgoing_sasl_passwords
and here the /var/log/mail.log

Code: Select all

Oct 28 01:12:26 pcsegreteria sm-mta[3067]: l9RNCQp9003067: localhost [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA-v4
Oct 28 01:12:26 pcsegreteria sm-mta[3066]: l9RNCQ1l003066: SYSERR(root): collect: Cannot write ./dfl9RNCQ1l003066 (bfcommit, uid=0, gid=123): No such file or directory
Oct 28 01:12:26 pcsegreteria sm-mta[3066]: l9RNCQ1l003066: from=<assistenza@myisp.it>, size=667, class=0, nrcpts=1, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Oct 28 01:12:26 pcsegreteria sm-mta[3068]: l9RNCQ7w003068: SYSERR(root): collect: Cannot write ./dfl9RNCQ7w003068 (bfcommit, uid=0, gid=123): No such file or directory
Oct 28 01:12:26 pcsegreteria sm-mta[3068]: l9RNCQ7w003068: from=<assistenza@myisp.it>, size=670, class=0, nrcpts=1, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Oct 28 01:12:26 pcsegreteria sm-mta[3069]: l9RNCQ7S003069: SYSERR(root): collect: Cannot write ./dfl9RNCQ7S003069 (bfcommit, uid=0, gid=123): No such file or directory
Oct 28 01:12:26 pcsegreteria sm-mta[3069]: l9RNCQ7S003069: from=<assistenza@myisp.it>, size=675, class=0, nrcpts=1, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Oct 28 01:12:26 pcsegreteria sm-mta[3070]: l9RNCQCJ003070: SYSERR(root): collect: Cannot write ./dfl9RNCQCJ003070 (bfcommit, uid=0, gid=123): No such file or directory
Oct 28 01:12:26 pcsegreteria sm-mta[3070]: l9RNCQCJ003070: from=<assistenza@myisp.it>, size=672, class=0, nrcpts=1, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Oct 28 01:12:26 pcsegreteria sm-mta[3071]: l9RNCQ95003071: SYSERR(root): collect: Cannot write ./dfl9RNCQ95003071 (bfcommit, uid=0, gid=123): No such file or directory
Oct 28 01:12:26 pcsegreteria sm-mta[3071]: l9RNCQ95003071: from=<assistenza@myisp.it>, size=672, class=0, nrcpts=1, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Oct 28 01:12:27 pcsegreteria sm-mta[3072]: l9RNCQWs003072: SYSERR(root): collect: Cannot write ./dfl9RNCQWs003072 (bfcommit, uid=0, gid=123): No such file or directory
Oct 28 01:12:27 pcsegreteria sm-mta[3072]: l9RNCQWs003072: from=<assistenza@myisp.it>, size=670, class=0, nrcpts=1, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Oct 28 01:12:27 pcsegreteria sm-mta[3073]: l9RNCRQi003073: SYSERR(root): collect: Cannot write ./dfl9RNCRQi003073 (bfcommit, uid=0, gid=123): No such file or directory
Oct 28 01:12:27 pcsegreteria sm-mta[3073]: l9RNCRQi003073: from=<assistenza@myisp.it>, size=665, class=0, nrcpts=1, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Oct 28 01:12:27 pcsegreteria sm-mta[3074]: l9RNCRcN003074: SYSERR(root): collect: Cannot write ./dfl9RNCRcN003074 (bfcommit, uid=0, gid=123): No such file or directory
Oct 28 01:12:27 pcsegreteria sm-mta[3074]: l9RNCRcN003074: from=<assistenza@myisp.it>, size=670, class=0, nrcpts=1, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Oct 28 01:12:27 pcsegreteria sm-mta[3075]: l9RNCRkc003075: SYSERR(root): collect: Cannot write ./dfl9RNCRkc003075 (bfcommit, uid=0, gid=123): No such file or directory
Oct 28 01:12:27 pcsegreteria sm-mta[3075]: l9RNCRkc003075: from=<assistenza@myisp.it>, size=671, class=0, nrcpts=1, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Oct 28 01:12:27 pcsegreteria sm-mta[3076]: l9RNCRnh003076: SYSERR(root): collect: Cannot write ./dfl9RNCRnh003076 (bfcommit, uid=0, gid=123): No such file or directory
Oct 28 01:12:27 pcsegreteria sm-mta[3076]: l9RNCRnh003076: from=<assistenza@myisp.it>, size=667, class=0, nrcpts=1, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Oct 28 01:12:27 pcsegreteria sm-mta[3077]: l9RNCRoV003077: SYSERR(root): collect: Cannot write ./dfl9RNCRoV003077 (bfcommit, uid=0, gid=123): No such file or directory
Oct 28 01:12:27 pcsegreteria sm-mta[3077]: l9RNCRoV003077: from=<assistenza@myisp.it>, size=673, class=0, nrcpts=1, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Oct 28 01:12:27 pcsegreteria sm-mta[3078]: l9RNCRbl003078: SYSERR(root): collect: Cannot write ./dfl9RNCRbl003078 (bfcommit, uid=0, gid=123): No such file or directory
Oct 28 01:12:27 pcsegreteria sm-mta[3078]: l9RNCRbl003078: from=<assistenza@myisp.it>, size=680, class=0, nrcpts=1, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Oct 28 01:12:28 pcsegreteria sm-mta[3079]: l9RNCRhw003079: SYSERR(root): collect: Cannot write ./dfl9RNCRhw003079 (bfcommit, uid=0, gid=123): No such file or directory
Oct 28 01:12:28 pcsegreteria sm-mta[3079]: l9RNCRhw003079: from=<assistenza@myisp.it>, size=673, class=0, nrcpts=1, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Oct 28 01:12:28 pcsegreteria sm-mta[3080]: l9RNCS5H003080: SYSERR(root): collect: Cannot write ./dfl9RNCS5H003080 (bfcommit, uid=0, gid=123): No such file or directory
Oct 28 01:12:28 pcsegreteria sm-mta[3080]: l9RNCS5H003080: from=<assistenza@myisp.it>, size=680, class=0, nrcpts=1, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Oct 28 01:12:28 pcsegreteria sm-mta[3081]: l9RNCSPL003081: SYSERR(root): collect: Cannot write ./dfl9RNCSPL003081 (bfcommit, uid=0, gid=123): No such file or directory
Oct 28 01:12:28 pcsegreteria sm-mta[3081]: l9RNCSPL003081: from=<assistenza@myisp.it>, size=673, class=0, nrcpts=1, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Oct 28 01:12:28 pcsegreteria sm-mta[3082]: l9RNCScJ003082: SYSERR(root): collect: Cannot write ./dfl9RNCScJ003082 (bfcommit, uid=0, gid=123): No such file or directory
Oct 28 01:12:28 pcsegreteria sm-mta[3082]: l9RNCScJ003082: from=<assistenza@myisp.it>, size=680, class=0, nrcpts=1, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Oct 28 01:12:28 pcsegreteria sm-mta[3083]: l9RNCSjw003083: SYSERR(root): collect: Cannot write ./dfl9RNCSjw003083 (bfcommit, uid=0, gid=123): No such file or directory
Oct 28 01:12:28 pcsegreteria sm-mta[3083]: l9RNCSjw003083: from=<assistenza@myisp.it>, size=667, class=0, nrcpts=1, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Oct 28 01:12:28 pcsegreteria sm-mta[3084]: l9RNCS9B003084: SYSERR(root): collect: Cannot write ./dfl9RNCS9B003084 (bfcommit, uid=0, gid=123): No such file or directory
Oct 28 01:12:28 pcsegreteria sm-mta[3084]: l9RNCS9B003084: from=<assistenza@myisp.it>, size=668, class=0, nrcpts=1, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Oct 28 01:12:28 pcsegreteria sm-mta[3085]: l9RNCSWF003085: SYSERR(root): collect: Cannot write ./dfl9RNCSWF003085 (bfcommit, uid=0, gid=123): No such file or directory
Oct 28 01:12:28 pcsegreteria sm-mta[3085]: l9RNCSWF003085: from=<assistenza@myisp.it>, size=667, class=0, nrcpts=1, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Oct 28 01:12:28 pcsegreteria sm-mta[3086]: l9RNCSXc003086: SYSERR(root): collect: Cannot write ./dfl9RNCSXc003086 (bfcommit, uid=0, gid=123): No such file or directory
Oct 28 01:12:28 pcsegreteria sm-mta[3086]: l9RNCSXc003086: from=<assistenza@myisp.it>, size=675, class=0, nrcpts=1, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
there's something wrong

in ZM email config i set

ZM_OPT_EMAIL checked
ZM_EMAIL_ADDRESS myaddress@myisp.it
ZM_EMAIL_HOST localhost
ZM_FROM_EMAIL assistenza@myisp.it
ZM_URL http://localhost/zm

kuzotare
Posts: 10
Joined: Sat Oct 27, 2007 1:09 am

Post by kuzotare » Sat Oct 27, 2007 11:31 pm

looking the mail log i saw as MTA "SM"
so i removed all sendmail package from my o.s.

now the mail log give it to me

Code: Select all

Oct 28 01:25:14 pcsegreteria postfix/master[4455]: daemon started -- version 2.4.5, configuration /etc/postfix
but when i try to execute a filter nothing seems to run

kuzotare
Posts: 10
Joined: Sat Oct 27, 2007 1:09 am

Post by kuzotare » Sun Oct 28, 2007 2:13 am

I have tried to send a mail using Thunderbird and I must say that the server postifix works perfectly. There is something wrong with the configuration of zoneminder


!! UPDATE !!!

searching similar problem i found this topic http://www.zoneminder.com/forums/viewto ... ht=postfix

i followed the instruction and here i think that found a problem

Code: Select all

 ./zmfilter.pl
Can't open config file '/etc/zm/zm.conf': Permesso negato at /usr/share/perl5/ZoneMinder/Config.pm line 100
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 100.
Compilation failed in require at /usr/share/perl5/ZoneMinder.pm line 33.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder.pm line 33.
Compilation failed in require at ./zmfilter.pl line 48.
BEGIN failed--compilation aborted at ./zmfilter.pl line 48.
utente@pcsegreteria:/usr/bin$ sudo ./zmfilter.pl

User avatar
MJN
Posts: 251
Joined: Wed Jan 17, 2007 10:29 am
Location: Wiltshire, UK
Contact:

Post by MJN » Sun Oct 28, 2007 8:38 pm

I'm not sure I see there's a problem - the first time you ran zmfilter you were running it as yourself and hence could not read zm.conf. Second time you ran it as root and hence it worked.

What do the logs say when your e-mail filter fires?

Mathew

kuzotare
Posts: 10
Joined: Sat Oct 27, 2007 1:09 am

Post by kuzotare » Sun Oct 28, 2007 10:50 pm

Hi

if i try to type zmfilter.pl with root rights this is the result

nothing

Code: Select all

root@pcsegreteria:/usr/bin# ./zmfilter.pl

how can i post the log relative the execution of filters?

if you refer to mail log, the result is NOTHING!!
seems like nothing went done!

User avatar
MJN
Posts: 251
Joined: Wed Jan 17, 2007 10:29 am
Location: Wiltshire, UK
Contact:

Post by MJN » Sun Oct 28, 2007 10:53 pm

I meant ZM's log (in /var/log/syslog unless you've arranged for it to be piped elsewhere).

Howcome you're running zmfilter.pl? What were you expecting it to do?

Mathew

kuzotare
Posts: 10
Joined: Sat Oct 27, 2007 1:09 am

Post by kuzotare » Sun Oct 28, 2007 11:09 pm

i sincerily don't know what can i expect :D

the log , after a new try is

Code: Select all

Oct 29 00:03:27 pcsegreteria zmc_dvideo0[21775]: INF [Webcam1: 1000 - Capturing at 5.24 fps]
Oct 29 00:03:29 pcsegreteria zma_m1[21799]: INF [Webcam1: 1000 - Processing at 5.29 fps]
Oct 29 00:03:30 pcsegreteria zmfilter[21970]: INF [Scanning for events using filter '_TempFilter1193612609'] 
nothing other

the mail log no have important message relative this action

( sorry for my bad english) and thank you for your help! :)

kuzotare
Posts: 10
Joined: Sat Oct 27, 2007 1:09 am

Post by kuzotare » Mon Oct 29, 2007 9:43 am

OK I solved the problem of the notifications via mail. probably i make a mistake in the filter. Now I have found that when it is noted a movement I receive a quantity of monstrous notices in a few moments, the events have a delay of 3 seconds but I received almost 13 such as alerts. I cannot find the correct parameter to have less alerts between an event and the other

User avatar
MJN
Posts: 251
Joined: Wed Jan 17, 2007 10:29 am
Location: Wiltshire, UK
Contact:

Post by MJN » Mon Oct 29, 2007 10:07 am

Good to hear you've got the mail sorted.

You might be best starting a new thread with your other issue as it is unrelated to mail and hence may get lost in this one.

Mathew

Dougal
Posts: 1
Joined: Wed May 11, 2011 7:02 am

Re: email notification

Post by Dougal » Wed May 11, 2011 8:18 am

Well, try to check the configuration setting of the sending email you have. Maybe there’s need to change in setting of the email sending you are using now. However, you can try to check in web search engine like google and yahoo.
:evil:

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests