Nullmailer

Forum for questions and support relating to the 1.26.x releases only.
Locked
orangenick
Posts: 3
Joined: Fri Nov 08, 2013 10:43 am

Nullmailer

Post by orangenick »

hi all,

(edit)had to remove some of the dots and things that looked like urls otherwise it refused to post... sorry about that(/edit)

sorry if this is the millionth time you've been asked help but I'm really stuck with this one.

I followed the instructions on Ubuntu Server 12.04 64-bit with Zoneminder 1 26 4 the easy way
I've got zoneminder working almost perfectly, working from the but I just can't get it to ever send me an email :(

The Logs come up with various problems including :
'zmfilter pl ' exited abnormally, exit status 9

which seems to be related to FTP even though I haven't configured that.
I've tried downloading the patch, but have no idea what I'm supposed to do with it.


Nullmailer:
--------------------

I've configured nullmailer with the following files:
adminaddr : [my email]
defaultdomain : mydomain
me : $hostname mydomain
remotes : smtp mandrillapp smtp --port=587 --starttls --user=[my user name] --pass=[my api key]

And if I use the test script that I found :
echo "This is a test message from ${USER}@${HOSTNAME} at $(date)" | sendmail [my email]
it sends me emails no problem, so I'm fairly sure the problem isn't there.


Zonealarm:
--------------------

In Zonealarm I've put this in the email configuration tab :

OPT EMAIL : Checked
EMAIL ADDRESS : [my email]
EMAIL SUBJECT : the default value
EMAIL BODY : the default value
OPT MESSAGE : Checked
MESSAGE ADDRESS : [my email]
MESSAGE SUBJECT : the default value
MESSAGE BODY : the default value
NEW EMAIL MODULES : Unchecked (I've tried checked too, but no luck)
EMAIL HOST : localhost
FROM EMAIL : [my email]
URL : 127.0.0.1


I've created a background filter :
Date/Time Less than now
Sort by date/time desc
Limit to first 3 results only
Email details of all matches
Message details of all matches

If I execute this, it shows some results. (I get the kids to run around a bit.. keeps them happy)




Logs:
--------------------

Mainly INF, ERRs are :

Code: Select all

'zmfilter pl ' exited abnormally, exit status 9
getStreamCmdResponse stream error: socket sendto( ... ) failed: No such file or directory
socket sendto( .. ) failed: No such file or directory
I don't have a message log, or a mail.err log or a syslog log in the var logs folder, which makes debugging them impossible.

where do I go from here?
orangenick
Posts: 3
Joined: Fri Nov 08, 2013 10:43 am

Re: Nullmailer

Post by orangenick »

...so I've found that 'zmfilter pl ' exited abnormally, exit status 9 isn't just related to FTP, it seems to be related to a series of issues.

Having said that, it seems to be the most viable cause of the issues.

I've found various topics on the forum, quite a few of which have had to debug the code to figure out what is wrong:
some suggestions are:

1. A patch may be needed due to a missing dependency, though this affected 1.25. One would hope this was fixed in the 1.26 release. In any case, having installed using a DEB and the fix requires a custom build of the software, I hope that this isn't the solution because I'm not able to do this yet...
2. [www-???] user needs to be added to a group to provide permissions to use the serial port, but this seems unlikely to be related.

3. some mentioned running zmfilter.pl and looking at the output... this is what I got.

Code: Select all

  Name "Net::SFTP::Foreign::debug" used only once: possible typo at /usr/bin/zmfilter.pl line 812.
  Can't locate MIME/Entity.pm in @INC (@INC contains: /usr/share/perl/5.14.2 /etc/perl /usr/local/lib/perl/5.14.2       /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl) at   /usr/bin/zmfilter.pl line 91.
...which doesnt look good but means nothing to me...

Code: Select all

perl -MIME::Entity -e "print \"Module installed.\\n\";"
... gives an error, so perhaps I need to install it. unfortunately, the forum post only says how to see if its installed, not how to install it. (is this a red herring?)

how to install a perl module?
GIYF --> http://www.sudobash.net/bash-how-to-ins ... -ubuntu-2/
...but if you do this get a good book, because it takes AGES to complete... at least 1 hour.
It seems odd to me to get emails working on a clean install Ubuntu LTS system I have to go through all this.
There must be an easier option...
the jist is

Code: Select all

sudo apt-get install build-essential
cpan
make install
install Bundle::CPAN
install MIME:Entity
so now zmfilter.pl doesn't crash immediately, no emails arriving, mandrill doesn't seem to know about any email but in the log I can now see the backlog of events getting sent:

...
2013-12-18 23:02:35.902030 zmfilter 16700 INF Sending notification message 'ZoneMinder: Alarm - LivingRoom-196' zmfilter.pl
2013-12-18 23:02:35.901150 zmfilter 16700 INF Creating notification message zmfilter.pl
2013-12-18 23:02:35.899610 zmfilter 16700 INF Notification email sent zmfilter.pl
2013-12-18 23:02:35.896320 zmfilter 16700 INF Sending notification email 'ZoneMinder: Alarm - LivingRoom-196 (66 - 31 14)' zmfilter.pl
...


I now have a /var/logs/mail.err which I didn't have before, but alas, it is empty. Syslog is also showing everything that the zoneminder log is showing, and it thinks its sending mails.

...so close and yet so far. Nullmailer is definitely working, I've tested it. zmfilter thinks its sending emails. There's nothing in the mail queue. If I ever get this working, I'm going to wiki it, because nullmailer with mandrill is a great combination that no-one seems to be using... its free and you don't need to use your gmail account with a plaintext password...
User avatar
iconnor
Posts: 2903
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Nullmailer

Post by iconnor »

Have you tried telling ZM to use the newer method?
ssteagall
Posts: 1
Joined: Wed Apr 30, 2014 6:44 pm

Re: Nullmailer

Post by ssteagall »

Hi,
Did you ever find a resolution to this problem ?


thx
Locked