SMTP event e-mail send not working

Support and queries relating to all previous versions of ZoneMinder
Locked
mrcream
Posts: 4
Joined: Wed Apr 27, 2005 1:26 pm

SMTP event e-mail send not working

Post 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
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post 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
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I'll have a look and see if this is a ZM bug or yet another perl mail sending weirdness!

Phil
Locked