Tuesday, August 23, 2011

nullmailer smtp Failed 550 5.7.1 Unable to relay for user@myhost.myhost big log files

One of our servers was reporting low HDD resources and as usual I took a look at log files. Yes, again /var/log/mail.* were above 1GB, in some cases even 5GB.

This is the error that I saw in the traces:
Aug 23 21:56:33 myhost nullmailer[782]: Starting delivery: protocol: smtp host: mail.nestorurquiza.com file: 1314082502.18221
Aug 23 21:56:33 myhost nullmailer[27145]: smtp: Failed: 550 5.7.1 Unable to relay for nestorurquizaadmin@myhost.myhost
Aug 23 21:56:33 myhost nullmailer[782]: Sending failed:  Permanent error in sending the message

This was originated because in etc/hosts I had a line like: myhost

And the SMTP server was not configured to relay to such a thing like myhost.myhost. So just changing it to an authorized domain should fix it right? myhost.nestorurquiza.com

Well I kept getting the same error!!!

The reason was queued emails. I was getting from logs also a line like below:
Aug 23 22:26:47 myhost nullmailer[828]: Delivery complete, 42489 message(s) remain.

So deleting the queue made finally the trick:
sudo rm -fR  /var/spool/nullmailer/queue/
sudo mkdir  /var/spool/nullmailer/queue

No comments: