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

Forum for questions and support relating to the 1.28.x releases only.
Post Reply
User avatar
MJN
Posts: 250
Joined: Wed Jan 17, 2007 10:29 am
Location: Wiltshire, UK
Contact:

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

Post by MJN » Sat Aug 15, 2015 7:55 pm

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?!

User avatar
asker
Posts: 1397
Joined: Sun Mar 01, 2015 12:12 pm

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

Post by asker » Sun Aug 16, 2015 4:50 pm

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?!
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

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

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

Post by MJN » Sun Aug 16, 2015 7:09 pm

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!

User avatar
asker
Posts: 1397
Joined: Sun Mar 01, 2015 12:12 pm

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

Post by asker » Sun Aug 16, 2015 10:16 pm

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).
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

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

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

Post by MJN » Mon Aug 17, 2015 9:10 am

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...

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

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

Post by MJN » Mon Aug 17, 2015 9:45 am

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.

User avatar
asker
Posts: 1397
Joined: Sun Mar 01, 2015 12:12 pm

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

Post by asker » Mon Aug 17, 2015 2:46 pm

Sounds good MJN - glad you figured it out and thanks for posting!
I completely agree that just having a sounding board often helps.
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests