I am just analyzing my logwatch logs, and I see the following entries:


 Mail Rejected:
       Total:  6

 Mail Deferred:
       Total:  229

 Total SMTP Session, Message, and Recipient Errors handled by Sendmail:  235

 ---------------------- sendmail End -------------------------

I only use sendmail for logwatch, so what is causing all these errors, and especially, what are deferred emails.


Deferred mail is simply mail that was unable to deliver to the sender and has been added to the mail queue ( you can view it by mailq or postqueue -p).

You can try to resend (flush) all those messages with sendmail -q, which will attempt to send again.

One reason it could be doing this is if your server's DNS listings (/etc/resolv.conf) are not functioning, you will not be able to deliver mail outside the local domain. And yes, I've made the mistake before in the past. It might be what's happening on your side, but then again, maybe not. Just trying to give tips. :)

Either than that, there's no easy way to see what is causing it. I'd recommend to check /var/log/mail.log, /var/log/mail.info, /var/log/mail.err, and /var/log/mail.warn for any clues to see why the messages might not be delivering. It would most likely be in mail.err if something wrong is happening while sending.

  • 1
    Thanks for all the tips. I hope I will get to the bottom of this. Ill go trough all the tips you gave and report what I have found, maybe you can help me further. By the way, I am on a EC2 instance, I thought i'd mention that. Dec 10 '11 at 6:49
  • Ok I have checked everything, and I saw that there were 4 emails in the queue. Could it be that those 4 were responsible for the 235 deferred emails during a 24h period? I deleted everything in the queue with the help of this post: serverfault.com/questions/147676/…. I will report in 24 hours if things are changed. Dec 10 '11 at 7:06
  • Hmm, as for the four in the queue, it is possible if the four emails had a multiple receivers, it could bring your queue up to 235. But on the other hand, I'm not completely sure if the queue bases it off how many emails to send or how many emails to send including all other receivers. If you find anything, feel free to let me know. I'll try my best to help out. :) Dec 10 '11 at 18:07
  • The problem has been solved. I remembered I had fiddled with the hostnames and stuff the day before, and I left it pretty much unconfigured. I reconfigured everything again yesterday and there are no more deferred email today. Thanks for the help. Dec 11 '11 at 3:18
  • Ah, that would do it! Glad you were able to fix it. Glad to be able to help! Dec 11 '11 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.