I often find many errors DEFERRED

Posted on 2001-06-04
Last Modified: 2013-12-17
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?

Question by:vage78
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 40

Accepted Solution

jlevie earned 25 total points
ID: 6155020
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 or 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 it is necessary to kill sendmail and restart it. A -HUP won't do it.


Expert Comment

ID: 6161821
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?

Author Comment

ID: 6162689
My errors are like the following:LAA14115*   13972 Mon Jun  4 11:34 <>
                 (Deferred: Connection timed out with
LAA14257    13946 Mon Jun  4 11:50 <>
                 (host map: lookup ( deferred)
MAA14429*   13972 Mon Jun  4 12:04 <>
                 (Deferred: Connection timed out with
LAA14200    13946 Mon Jun  4 11:44 <>
                 (host map: lookup ( deferred)
MAA14405    13946 Mon Jun  4 12:02 <>
                 (host map: lookup ( deferred)
LAA14218    13946 Mon Jun  4 11:45 <>
                 (host map: lookup ( deferred)
LAA14285    13972 Mon Jun  4 11:57 <>
                 (host map: lookup ( 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 is reread? after I have changed something inside the .cf
Thanks a lot.

LVL 40

Expert Comment

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

"Deferred: Connection timed out with"

This means that the local sendmail attempted to connect to one of the MX hosts for 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
Server:  merlin.hidden.tld
     origin =
     mail addr =
     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 is alive

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

chimera> telnet 25


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

"host map: lookup ( 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
Server:  merlin.hidden.tld

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

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

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

Non-authoritative answer:     nameserver = NS2.DIRTBIKE.NET     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

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

So that one looks like the nameserver that is supposedly responsible for simply isn't set up correctly.

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Easy CSR creation in Exchange 2007,2010 and 2013
This article outlines some of the reasons why an email message gets flagged as spam on a recipient's end.
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question