Sendmail delay: 3 mins 11 secs... Every time.

Tags
sendmail, solaris, solaris 11.3, solved

 
Thread Tools Search this Thread
# 1  
Old 09-01-2017
Sendmail delay: 3 mins 11 secs... Every time.

Hi all,
I would like some help with a sendmail problem:
We have a new system comprising of 4 T7-1 servers, each hosting 5 LDOMs, all domains running Solaris 11.3
All emails sent from every one of these domains (including the control domains) sit in the queue for 3 mins 11 secs (sometime 3m 12s, or 3m 13s) before being delivered.
I've exhausted my googling skills investigating red herrings and blind alleys and now I'm stumped.
I have included some sanitised output below, showing the problem. I used "sendmail -v" here purely for the verbose output: The same delay occurs with mailx.
Any help would be greatly appreciated.
#########################################################
Code:
root@myldom:~# sendmail -v my.name@company.uk < test.txt
my.name@company.uk... Connecting to [127.0.0.1] via relay...
220 myldom.fqdn.uk ESMTP Sendmail 8.15.1+Sun/8.15.1; Thu, 31 Aug 2017 16:33:21 +0100 (BST)
>>> EHLO myldom.fqdn.uk
250-myldom.fqdn.uk Hello localhost.fqdn.uk [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> VERB
250 2.0.0 Verbose mode
>>> MAIL From:<myuser@myldom.fqdn.uk> SIZE=21
250 2.1.0 <myuser@myldom.fqdn.uk>... Sender ok
>>> RCPT To:<my.name@company.uk>
>>> DATA
250 2.1.5 <my.name@company.uk>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .

# (Wait 3 mins 11 secs...)

050 <my.name@company.uk>... Connecting to company.uk. via esmtp...
050 <my.name@company.uk>... Connecting to mailhost.fqdn.uk via esmtp...
050 220 exchangeserver.fqdn.uk Microsoft ESMTP MAIL Service ready at Thu, 31 Aug 2017 16:36:31 +0100
050 >>> EHLO myldom.fqdn.uk
050 250-exchangeserver.fqdn.uk Hello [10.10.3.102]
050 250-SIZE 37748736
050 250-PIPELINING
050 250-DSN
050 250-ENHANCEDSTATUSCODES
050 250-STARTTLS
050 250-X-ANONYMOUSTLS
050 250-AUTH NTLM
050 250-X-EXPS GSSAPI NTLM
050 250-8BITMIME
050 250-BINARYMIME
050 250-CHUNKING
050 250 XRDST
050 >>> STARTTLS
050 220 2.0.0 SMTP server ready
050 >>> EHLO myldom.fqdn.uk
050 250-exchangeserver.fqdn.uk Hello [10.10.3.102]
050 250-SIZE 37748736
050 250-PIPELINING
050 250-DSN
050 250-ENHANCEDSTATUSCODES
050 250-AUTH NTLM LOGIN
050 250-X-EXPS GSSAPI NTLM
050 250-8BITMIME
050 250-BINARYMIME
050 250-CHUNKING
050 250 XRDST
050 >>> MAIL From:<myuser@myldom.fqdn.uk> SIZE=382
050 250 2.1.0 Sender OK
050 >>> RCPT To:<my.name@company.uk>
050 >>> DATA
050 250 2.1.5 Recipient OK
050 354 Start mail input; end with <CRLF>.<CRLF>
050 >>> .
050 250 2.6.0 <201708311533.v7VFXK30006527@myldom.fqdn.uk> [InternalId=80298708569789, Hostname=exchangeserver.fqdn.uk] Queued mail for delivery
050 <my.name@company.uk>... Sent (<201708311533.v7VFXK30006527@myldom.fqdn.uk> [InternalId=80298708569789, Hostname=exchangeserver.fqdn.uk] Queued mail for delivery)
250 2.0.0 v7VFXLXx006528 Message accepted for delivery
my.name@company.uk... Sent (v7VFXLXx006528 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 myldom.fqdn.uk closing connection
root@myldom:~#

During the delay before sending, I ran the following in another session:

Code:
root@myldom:~# mailq;sendmail -v -q
                /var/spool/mqueue (1 request)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
v7VFXLXx006528*      21 Thu Aug 31 16:33 <myuser@myldom.fqdn.
                                         <my.name@company.uk>
                Total requests: 1

Running /var/spool/mqueue/v7VFXLXx006528 (sequence 1 of 1)
v7VFXLXx006528: locked
root@myldom:~#

... And this is what appears in the log:

Code:
root@myldom:~# grep v7VFXLXx006528 /var/log/syslog
Aug 31 16:33:21 myldom sendmail[6528]: [ID 801593 mail.info] v7VFXLXx006528: from=<myuser@myldom.fqdn.uk>, size=382, class=0, nrcpts=1, msgid=<201708311533.v7VFXK30006527@myldom.fqdn.uk>, proto=ESMTP, daemon=MTA-v4, 

relay=localhost.fqdn.uk [127.0.0.1]
Aug 31 16:36:34 myldom sendmail[6528]: [ID 801593 mail.info] v7VFXLXx006528: to=<my.name@company.uk>, ctladdr=<myuser@myldom.fqdn.uk> (111/100), delay=00:03:13, xdelay=00:03:13, mailer=esmtp, pri=30382, relay=mailhost.fqdn.uk 

[10.10.0.98], dsn=2.0.0, stat=Sent (<201708311533.v7VFXK30006527@myldom.fqdn.uk> [InternalId=80298708569789, Hostname=exchangeserver.fqdn.uk] Queued mail for delivery)
Aug 31 16:36:34 myldom sendmail[6527]: [ID 801593 mail.info] v7VFXK30006527: to=my.name@company.uk, ctladdr=myuser (111/100), delay=00:03:14, xdelay=00:03:13, mailer=relay, pri=30021, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent 

(v7VFXLXx006528 Message accepted for delivery)
root@myldom:~#

Many thanks in advance



Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!

Last edited by RudiC; 09-01-2017 at 07:37 AM.. Reason: Added CODE tags.
# 2  
Old 09-01-2017
Welcome to the forum.

With a delay not attributable to an evident cause, I always suspect a DNS timeout, although more than 3 mins seems very long, and I don't see unresolved addresses in the log.
This User Gave Thanks to RudiC For This Post:
Mysturji (09-05-2017)
# 3  
Old 09-01-2017
Hi Rudi (Oops, RE: code tags)
We do use DNS internally, but FQDNs are in the local hosts files as well.
The weird thing is, it doesn't even seem to try to send it for over 3 minutes. It's like there's a config item that says "wait this long before sending mail" but I can't find it.
Both sendmail.cf & submit.cf (and their corresponding .mc files) seem to be default unmodified.
# 4  
Old 09-01-2017
Assuming sendmail daemon is active:

the sendmail daemon can be set up with queueing - meaning send out mail every x minutes.

There are .cf files in the mail directory tree in /etc. (you did this) Read though them and see what is set. (queueing control can be set here, too): Also review the command used to start smtp (sendmail), there are usually two sendmail processes.

I would help but I do not have a unix box here, and sendmail is beastly in how it does things. I do not remember.

You may also need to check if the box that has the problem has an active mail server or if the smtp request is forwarded to another box.
This User Gave Thanks to jim mcnamara For This Post:
Mysturji (09-05-2017)
# 5  
Old 09-01-2017
This is for solaris 10 - but I think the directories are the same most places.
And can be changed in the .cf files.
Administering the Queue Directories - Managing sendmail Services in Oracle Solaris 11.1

mqueue directory should be in /var/spool tree.
This User Gave Thanks to jim mcnamara For This Post:
Mysturji (09-05-2017)
# 6  
Old 09-01-2017
Hi Jim,
Sendmail daemon is active.

You said:
Quote:
the sendmail daemon can be set up with queueing - meaning send out mail every x minutes.
How? Presumably it can also be configured to send mail immediately... How?
I'm afraid the contents of the .cf files are hieroglyphics to me.

I came late to this project and this was already set up when I arrived, but as far as I can tell, there has been no customisation done to sendmail - it's all 'out of the box'. There is next to nothing in the sendmail.mc and submit.mc files, and they and the .cf files are all quite old, so presumably the first build.

That link says:
Code:
2. Force queue processing and display the progress of the jobs as the queue is cleared.
# /usr/lib/sendmail -q -v

When I ran
Code:
sendmail -v -q

(I assumed the "q" meant "query") it replied:
Code:
v7VFXLXx006528: locked

To me, this seems intentional. But how? Smilie

It looks like the email is sent to the localhost over the loopback interface and is accepted, then it sits there waiting for a timer to run out before it gets sent on to the Exchange server and actually delivered.
Thanks
# 7  
Old 09-01-2017
If you're running with 'out of the box' default configuration then in /etc/mail/sendmail.cf the "smart" relay host line probably says:

Code:
DSfoo.bar

Try changing that to

Code:
DS

That will tell it that its relay host is itself.

---------- Post updated at 04:42 PM ---------- Previous update was at 04:36 PM ----------

Although, of course, there's a delay because the mail daemon wakes up regularly to process mail, I wouldn't have thought that a problem with it would give you the exact same delay every time. So I conclude that this sounds like a configuration issue such as above.
These 2 Users Gave Thanks to hicksd8 For This Post:
jim mcnamara (09-01-2017) Mysturji (09-04-2017)

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Script to find directory is getting files in every 10 mins, if not then when last time file received sadique.manzar Shell Programming and Scripting 6 08-13-2018 06:07 PM
Sendmail delaying mails for 45 mins badoshi Solaris 4 12-16-2013 04:35 PM
How to get past 30 mins time in Solaris? ambious Shell Programming and Scripting 4 08-06-2013 07:23 AM
Time delay problem in asking password solaris_1977 Emergency UNIX and Linux Support 9 08-31-2012 11:20 AM
Delay in sending email to-from localhost in Sendmail Rohit Bhanot Red Hat 0 06-23-2012 01:15 AM
Login delay after entering id (40 secs) same after entering pw longjon Solaris 8 02-07-2012 07:16 AM
getting time mins ago cka UNIX for Advanced & Expert Users 6 01-05-2011 03:28 PM
how to calculate the time 10 mins ago?? unix k00061804 Shell Programming and Scripting 7 11-17-2010 07:57 AM
Time delay for awk kristinu Shell Programming and Scripting 3 10-24-2010 10:40 AM
Output of prstat for 60 secs nessj Shell Programming and Scripting 3 06-29-2010 07:51 AM
Calculating delay time - bash jbsimon000 Shell Programming and Scripting 5 04-14-2009 12:54 PM
ls -e to find out File modification time in secs rahulkav Shell Programming and Scripting 3 09-12-2008 12:04 PM
how to find difference of 2 timestamps in secs? Alecs UNIX for Dummies Questions & Answers 0 03-24-2008 01:36 PM
lock time delay part-time-user Solaris 2 06-01-2005 05:04 PM
Reduce boot-time delay on FreeBSD? DownSouthMoe BSD 1 03-28-2004 03:07 AM