Page 1 of 1

ZM sending e-mails... even when configured not to!

Posted: Sat Aug 15, 2015 7:55 pm
by MJN
My installation of ZoneMinder (v1.28.100) is behaving rather strangely...

From time to time it is sending out e-mails. This is despite no filters being set to send e-mails and even unticking 'OPT_EMAIL' doesn't help. If I changed the From: address (FROM_EMAIL) this doesn't have any effect to these emails - it is still using the original address - however the change does take effect for emails that I manually trigger through a filter set up to send one.

Another thing of note is that the emails are completely blank - no subject, no body and no date being set either! I'm pretty sure they are being sent out direct-to-MX i.e. not being sent via the local Postfix installation.

Anyone any ideas?!

Re: ZM sending e-mails... even when configured not to!

Posted: Sun Aug 16, 2015 4:50 pm
by asker
It doesn't sound like ZM is sending you emails. It seems your cron is sending you emails due to some failed jobs. This may help you http://www.cyberciti.biz/faq/disable-th ... b-command/

MJN wrote:My installation of ZoneMinder (v1.28.100) is behaving rather strangely...

From time to time it is sending out e-mails. This is despite no filters being set to send e-mails and even unticking 'OPT_EMAIL' doesn't help. If I changed the From: address (FROM_EMAIL) this doesn't have any effect to these emails - it is still using the original address - however the change does take effect for emails that I manually trigger through a filter set up to send one.

Another thing of note is that the emails are completely blank - no subject, no body and no date being set either! I'm pretty sure they are being sent out direct-to-MX i.e. not being sent via the local Postfix installation.

Anyone any ideas?!

Re: ZM sending e-mails... even when configured not to!

Posted: Sun Aug 16, 2015 7:09 pm
by MJN
Thanks for the idea Asker however I've ruled out cron as the times are quite sporadic and there's no Date: header (whereas cron does insert given its use of the local mailer).

I've set a script running now to keep an eye on all outgoing port 25 connections and so will hopefully catch what process is doing it!

Re: ZM sending e-mails... even when configured not to!

Posted: Sun Aug 16, 2015 10:16 pm
by asker
MJN wrote:Thanks for the idea Asker however I've ruled out cron as the times are quite sporadic and there's no Date: header (whereas cron does insert given its use of the local mailer).

I've set a script running now to keep an eye on all outgoing port 25 connections and so will hopefully catch what process is doing it!
Sounds good - do let me know what you find out. Always good to learn - may help someone else in the future if it is zone minder related (directly or indirectly).

Re: ZM sending e-mails... even when configured not to!

Posted: Mon Aug 17, 2015 9:10 am
by MJN
I fear we might be heading towards a 'user error' scenario....

I left tcpdump running monitoring outgoing port 25 connections on my Zoneminder machine... and did the same for incoming port 25 on the mail server...

This morning I had two culprit e-mails appear yet only the mail server dump showed the connection - there was nothing in the dump on the ZM machine.

Like many/most my IPv4 connection is behind a NAT and so whilst I know the connection from my house it seems to be almost certainly the case that it didn't come from the ZM machine. So what's left? Well, the only other network-connected devices are the IP cameras and two installs of TinyCam Monitor on Android phones. Neither should be behaving like this but what else can it be? Am going to remove the TinyCam installs and see if the symptoms go away...

Re: ZM sending e-mails... even when configured not to!

Posted: Mon Aug 17, 2015 9:45 am
by MJN
I've found the culprit! And it was 'user error' after all (surprise surprise)

A few weeks ago I was experimenting with the built-in motion detection from one of the IP cameras (a Panasonic BL-C1) and... you're one stop ahead of me now... had configured it to alert by e-mail. Clearly the SMTP client is has is broken though as it doesn't properly form e-mails (a Wireshark trace cannot decipher the SMTP stream for the DATA portion and hints that it could be a malformed packet).

I have a strange conflicting feeling of being pleased with myself for having tracked down the offender... yet also at the same time feeling ashamed that I was an accomplice all along!! :lol:

Thanks though Asker for your willingness to help - it can be really useful someone else throwing ideas in as they help force the consideration of different perspectives.

Re: ZM sending e-mails... even when configured not to!

Posted: Mon Aug 17, 2015 2:46 pm
by asker
Sounds good MJN - glad you figured it out and thanks for posting!
I completely agree that just having a sounding board often helps.