Page 1 of 1
SMTP event e-mail send not working
Posted: Wed Apr 27, 2005 2:58 pm
by mrcream
Hello.
I need to use an smtp server to send e-mail from the host I am running ZoneMinder on, but the e-mail is disappearing without a trace.
I'm not even sure ZoneMinder is trying to send it - there is nothing in the logs.
This is not a filter-generated email I am trying to get sent, but an event-generated email.
Thanks
Posted: Wed Apr 27, 2005 10:07 pm
by rdmelin
I went a few rounds with this issue a while back. As far as I can tell the value ZM_EMAIL_HOST does not get passed to ->smtpsend() in zmfilter.pl.
From the Mail::Internet man pages on ->smtpsend() :
If "Host" is not given then the SMTP host is found by attempting connections first to hosts specified in $ENV{SMTPHOSTS}, a colon separated list, then "mailhost" and "localhost".
In my tests "Host" defaulted to "localhost" regardless of what value I set in ZM_EMAIL_HOST. So for all intents and purposes it was the same as using the "sendmail" method.
You might try adding a "mailhost" line in /etc/hosts. That will at least get your email out the door to the SMTP mailhost. There is however another issue involving the return path set by MIME::Entity and ->smtpsend() that may result in your mailhost dropping the email.
There is a patch that fixed these issues for me here:
http://www.zoneminder.com/forums/viewtopic.php?t=4333
Best regards,
Ross
Posted: Wed Apr 27, 2005 11:07 pm
by zoneminder
I'll have a look and see if this is a ZM bug or yet another perl mail sending weirdness!
Phil