Hello,
I'm struggling with the set up of emails: after an event, when I look at the log, I can see the "Creating notification message" + "Sending notification message" but that's it. I don't see any "Can't send email:" or "Notification message sent". I looked at the zmfilter.pl script and I dont understand how it can be. Does anybody can tell me a way to debug the email feature from the command line?
Please help.
PS: the server is running an exim4 agent who is doing well at sending logwatch messages (for instance)
Email notifications not sent (more or less solved)
Email notifications not sent (more or less solved)
Last edited by olki on Thu Jul 21, 2011 1:13 pm, edited 1 time in total.
Re: Email notifications not sent
Perhaps I see no log because the warn() function in the perl script is not working.
I've added on top of the script the following code:
Info( "Starting modified zmfilter\n" );
warn( "Warning Starting modified zmfilter\n" );
Error( "Error Starting modified zmfilter\n" );
Only lines 1&3 are displayed in the log. Do you see any reason for that?
edit: I did some research (it the first time I look into perl scripts), and I think that the warn function is writting a message to the STDERR device, which I assume to be the console. So how the zm warnings are written to the log files?
Thanks
I've added on top of the script the following code:
Info( "Starting modified zmfilter\n" );
warn( "Warning Starting modified zmfilter\n" );
Error( "Error Starting modified zmfilter\n" );
Only lines 1&3 are displayed in the log. Do you see any reason for that?
edit: I did some research (it the first time I look into perl scripts), and I think that the warn function is writting a message to the STDERR device, which I assume to be the console. So how the zm warnings are written to the log files?
Thanks
Re: Email notifications not sent (more or less solved)
I've modified the zmfilter.pl script to be able to see the warn log by changing the warn() function by the Info(). It's a little bit odd (as the warn is used everywhere in the scripts), but it works... So I could debug and I had to untick the NEW_MAIL_MODULES option + set as EMAIL_HOST the FQDN of my zoneminder server.
Then I see in the logs the "Notification email sent" message, but in receive nothing in my mailbox and the exim log file show no entry for any message from zm.
I this point, I'm lost and I don't know what to do to debug my system further.
Then I see in the logs the "Notification email sent" message, but in receive nothing in my mailbox and the exim log file show no entry for any message from zm.
I this point, I'm lost and I don't know what to do to debug my system further.
Re: Email notifications not sent (more or less solved)
Finally, I managed to get the emails sent by changing the "smtp" method in the zmfilter script by "sendmail" and ticking the NEW_MAIL_MODULES option.
The warn() function that does not display anything in the logs still kills me!
The warn() function that does not display anything in the logs still kills me!