6

I'm getting a lot of messages like these:

me@home:/etc/snmp$ tail /var/log/syslog
Jun 12 17:52:15 home nullmailer[1238]: Starting delivery: protocol: smtp host: mail. file: 1339502401.24665
Jun 12 17:52:15 home nullmailer[7086]: smtp: Failed: Connect failed
Jun 12 17:52:15 home nullmailer[1238]: Sending failed:  Host not found
Jun 12 17:52:15 home nullmailer[1238]: Starting delivery: protocol: smtp host: mail. file: 1339174804.27614
Jun 12 17:52:15 home nullmailer[7087]: smtp: Failed: Connect failed
Jun 12 17:52:15 home nullmailer[1238]: Sending failed:  Host not found
Jun 12 17:52:15 home nullmailer[1238]: Starting delivery: protocol: smtp host: mail. file: 1339324201.21737
Jun 12 17:52:15 home nullmailer[7088]: smtp: Failed: Connect failed
Jun 12 17:52:15 home nullmailer[1238]: Sending failed:  Host not found
Jun 12 17:52:15 home nullmailer[1238]: Delivery complete, 331 message(s) remain.

The problem is, I don't recall sending anything. How do I find out which software is sending these messages? How do I read them?

Fluffy
  • 1,594
  • I had to install php5-gd as well to get rid of those messages... –  Jun 05 '13 at 11:21
  • 1
    @Michael Robrecht, you had to install imaging library to get rid of mailer error? – Fluffy Jun 05 '13 at 14:59
  • Could well be, if the messages all contain a complaint about the php library missing. My messages in /var/spool/nullmailer/queue/ all contain /usr/lib/php5/sessionclean: 12: /usr/lib/php5/sessionclean: php5: not found – rubo77 Nov 06 '16 at 05:57

3 Answers3

3

To see the contents of one of the messages in the queue, try something like this: (obviously replacing the numeric filename with an actual one from your syslog)

$ sudo cat /var/spool/nullmailer/queue/1347323616.6506

Note that you have to use either sudo or be logged in as root due to permissions on the queue subdir and files.

MarkHu
  • 5,900
2

You seem to have installed nullmailer but no possibility to sent the emails to on your mashine. All those mails are being tried to send on every startup. also if you restart nullmailer, you will generate those messages again:

sudo /etc/init.d/nullmailer restart

have a look in your mail queue:

sudo su
ls -lah /var/spool/nullmailer/queue/

and look at the dates. They are probably all useless old e-mails.

So there are two solutions:

no need for local mails

So if you don't care about emails sent by your system, just empty the nullmail queue every now and then:

rm /var/spool/nullmailer/queue/*

And probably you will delete the many GB of mail logs also with:

rm /var/log/mail.*
rm /var/log/syslog*

You can add this to your etc/rc.local file to do this automatically.

local mail delivery

If you really want to get emails from your sytem, for example PHP sends out messages and you want to test how they would look like, you can install fakemail to store those mails in a folder

(see: http://distinctplace.com/2013/06/20/nullmailer-and-fake-mail-two-little-tools-for-every-developer/)

rubo77
  • 32,486
0

Might be worth trying

sudo apt-get install php5-mcrypt

as all the messages being sent were php errors on my system and several other people have reported this as a problem.

Eric Carvalho
  • 54,385