I often find many errors DEFERRED

I have many errors in /var/spool/mqueue what can I do?
I use solaris 2.8. There are a lot of messages Deferred what does it means? How can I fix it?
1) Is it good idea to do
 # cd /var/spool/mqueue
 # rm *
 or # cp /dev/null /var/spool/mqueue or
 is it the same?

2)I can see running
 ps -ef |grep sendmail
 5 processes sendmail are running. Do I have to kill any of them and let only one running?

3) Is it any way to debug my server if it is ok or is it
a problem of my dialup users.

4) If I kill the unique process of sendmail how can I reread the configuration file maybe
 #pkill -HUP sendmail is it ok?

5) If I decide not to delete the file from mqueue. Is there any command to tell to sendmail to try itself later in order to resend these mails?

Who is Participating?
jlevieConnect With a Mentor Commented:
Deferred messages don't necessarily indicate a serious problem. A message will move into a deferred state if sendmail can't deliver it on the first attempt. And that can be because the nameserver responsible for the target domain isn't accessible at the moment, or the remote SMTP server may be down or too busy, or there could be no route to the name server for the domain or the SMTP server, or there could have been errors during the first delivery attempt. Sendmail will keep the message in the delivery queue and periodically retry the delivery for a limited period of time. The intervals between delivery attempts are determined by what queue interval (-q option) was specified when sendmail was started, e.g., "sendmail -bd -q15m" says to run the queue every 15 minutes. If you have problems with a number of messages sitting in the delivery queue (check with "mailq") it is probably best to run the queue less often, perhaps once an hour or two (-q1h or -q2h). One a message enters the delivery queue and can't be delivered on the first attempt sendmail will keep track of how long the messages sits in the queue. After 4 days of delivery attempts (typically) the message will be automatically dropped from the queue and a bounce message set to the message's originator. You should never delete messages from /var/spool/mqueue unless you have certain knowledge that the message can never be delivered.

It is normal to see multiple sendmail processes running. The master sendmail process will fork off a copy of itself for each message that it handles. The children will normally terminate on their own when they have finished processing the message. Occasionally you'll find a sendmail process that's been running for many hours or days. It is possible for a sendmail process to get into a stalled state and never exit, but if you check those processes won't be consuming CPU time.

Under ordinary circumstances the only time that sendmail needs to be told to read it's config files is when local-host-names (aka sendmail.cw) or sendmail.cf has been changed. All of the DB files (aliases, virtusertable, genericstable, etc) are "read on the fly". To get sendmail to re-read local-host-names or sendmail.cf it is necessary to kill sendmail and restart it. A -HUP won't do it.

Can you give an example of the log showing the error?  Is your connection to the internet and dns servers been giving you a problem lately?  Are users complaining out mail going out slow?

Is it one or two remote hosts that you are sending mail to that are slow?
vage78Author Commented:
My errors are like the following:LAA14115*   13972 Mon Jun  4 11:34 <aro@bemi.gr>
                 (Deferred: Connection timed out with hotmail.gr.)
LAA14257    13946 Mon Jun  4 11:50 <aro@bemi.gr>
                 (host map: lookup (aperito.com): deferred)
MAA14429*   13972 Mon Jun  4 12:04 <aro@bemi.gr>
                 (Deferred: Connection timed out with info.amy.gr.)
LAA14200    13946 Mon Jun  4 11:44 <aro@bemi.gr>
                 (host map: lookup (ahellas.gr): deferred)
MAA14405    13946 Mon Jun  4 12:02 <aro@bemi.gr>
                 (host map: lookup (mathrabank.gr): deferred)
                                   <mtb info@mathrabank.gr>
LAA14218    13946 Mon Jun  4 11:45 <aro@bemi.gr>
                 (host map: lookup (marinamar.com): deferred)
LAA14285    13972 Mon Jun  4 11:57 <aro@bemi.gr>
                 (host map: lookup (tec.gr): deferred)
Thanks jlevie
but what can I do with the 6-7 proceeses of sendmail. do I need to kill and let only one running or not.
And finally how sendmail.cf is reread? after I have changed something inside the .cf
Thanks a lot.

Okay let me dissect those error and see if I can explain what they mean:

"Deferred: Connection timed out with hotmail.gr."

This means that the local sendmail attempted to connect to one of the MX hosts for hotmail.gr and the connection timed out. That can occur if the remote SMTP server is now, too busy, or there are network problems between your system and the remote SMTP server.

You can always do yout own checks to see what is happening in a specific case. What I do is to first find out what host sendmail will be contacting by:

chimera> nslookup -q=mx hotmail.gr
Server:  merlin.hidden.tld

     origin = ns1.hotmail.com
     mail addr = netops.jsnet.com
     serial = 2000012201
     refresh = 10800 (3H)
     retry   = 3600 (1H)
     expire  = 604800 (1W)
     minimum ttl = 400 (400)

Then check to see if I can "reach out and touch the mail server:

chimera> ping netops.jsnet.com
netops.jsnet.com is alive

And finally attempt to open an SMTP connection to the remote mail server:

chimera> telnet netops.jsnet.com 25


And I see in this case that there is apparently no SMTP server running on the mailserver for hotmail.gr as I never get an answer from the remote.

"host map: lookup (aperito.com): deferred"

This indicates that there was a problem doing the MX lookup for some domain. Sendmail needs to be able to retrieve the MX records (or the IP address of a Fully Qualified Domain Name (FQDN)) in order to be able to find and connect to the remote SMTP server. This can be the result of a DNS server being down, bad delegation of a domain, an improperly configured nameserver, or network problems between the SMTP server and the central registries or the nameserver.

And, like above you can do your own checks to see what is failing, like:

chimera> nslookup -q=mx aperito.com
Server:  merlin.hidden.tld

*** merlin.hidden.tld can't find aperito.com: Non-existent host/domain

Okay, I don't get an answer that way, lets see who the nameservers are:

chimera> nslookup -q=ns aperito.com
Server:  merlin.hidden.tld

Non-authoritative answer:
aperito.com     nameserver = NS2.DIRTBIKE.NET
aperito.com     nameserver = NS1.DIRTBIKE.NET

Authoritative answers can be found from:
NS2.DIRTBIKE.NET     internet address =
NS1.DIRTBIKE.NET     internet address =

Now I want to see if the namservers are up:

chimera> ping NS1.DIRTBIKE.NET
chimera> ping NS2.DIRTBIKE.NET
no answer from NS2.DIRTBIKE.NET

Okay one of them is. Lets try going directly to that server:

chimera> nslookup
Default Server:  merlin.hidden.tld

Default Server:  NS1.DIRTBIKE.NET

> set querytype=MX
> aperito.com.

*** NS1.DIRTBIKE.NET can't find aperito.com.: No response from server

So that one looks like the nameserver that is supposedly responsible for aperito.com simply isn't set up correctly.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.