Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

I often find many errors DEFERRED

Posted on 2001-06-04
4
Medium Priority
?
654 Views
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?
Thanks

0
Comment
Question by:vage78
  • 2
4 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 100 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 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.

0
 
LVL 5

Expert Comment

by:markt9
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?
0
 

Author Comment

by:vage78
ID: 6162689
My errors are like the following:LAA14115*   13972 Mon Jun  4 11:34 <aro@bemi.gr>
                 (Deferred: Connection timed out with hotmail.gr.)
                                   <ioulia12@hotmail.gr>
LAA14257    13946 Mon Jun  4 11:50 <aro@bemi.gr>
                 (host map: lookup (aperito.com): deferred)
                                   <eidolo@aperito.com>
                                   <sharewave@winmag.net>
                                   <market@boating.gr>
MAA14429*   13972 Mon Jun  4 12:04 <aro@bemi.gr>
                 (Deferred: Connection timed out with info.amy.gr.)
                                   <sales@amy.gr>
LAA14200    13946 Mon Jun  4 11:44 <aro@bemi.gr>
                 (host map: lookup (ahellas.gr): deferred)
                                   <ahellas@ahellas.gr>
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)
                                   <webmaster@marinamar.com>
LAA14285    13972 Mon Jun  4 11:57 <aro@bemi.gr>
                 (host map: lookup (tec.gr): deferred)
                                   <webmaster@tec.gr>  
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.

0
 
LVL 40

Expert Comment

by:jlevie
ID: 6168807
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
Address:  192.168.0.1

hotmail.gr
     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
Trying 209.1.113.100...

^C
chimera>

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
Address:  192.168.0.1

*** 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
Address:  192.168.0.1

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 = 64.84.42.6
NS1.DIRTBIKE.NET     internet address = 64.156.136.228

Now I want to see if the namservers are up:

chimera> ping NS1.DIRTBIKE.NET
NS1.DIRTBIKE.NET is alive
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
Address:  192.168.0.1

> server NS1.DIRTBIKE.NET
Default Server:  NS1.DIRTBIKE.NET
Address:  64.156.136.228

> set querytype=MX
> aperito.com.
Server:  NS1.DIRTBIKE.NET
Address:  64.156.136.228

*** 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.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

916 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