Visit Our UNIX and Linux User Community

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

Thread Tools Search this Thread
Special Forums UNIX and Linux Applications Sendmail delay: 3 mins 11 secs... Every time.
# 8  
Old 09-01-2017
I would suspect some issues in /etc/hosts or /etc/resolv.conf files.
/etc/resolv.conf less likely to be wrong due to being managed by smf in your release.

Check hosts file for syntax errors, post the content here is possible.
This User Gave Thanks to Peasant For This Post:
# 9  
Old 09-01-2017
I guess the smarthost in /etc/mail/ (and/or is
Check its DNS resolution with
nslookup -q=mx

Does it list many hosts? Are some of them not reachable on port 25?
What is the hosts line in /etc/nsswitch.conf?

Last edited by MadeInGermany; 09-01-2017 at 04:06 PM.. Reason: nsswitch not resolv
This User Gave Thanks to MadeInGermany For This Post:
# 10  
Old 09-04-2017
Thanks hicksd8, but that has already been set as suggested:
# grep ^DS

---------- Post updated at 13:43 ---------- Previous update was at 10:20 ----------

I've found out something that may be significant, but I'm not sure what to do with it:
"mailhost" is an alias in /etc/hosts for the old mailserver which is still active, but the preferred mailserver is "outlook", which is 3 load-balanced servers:
# nslookup


"SVP-MAIL01" is one of those load-balanced mailservers, which mail gets forwarded to from the old mailhost in the syslog snippet below:
Sep  4 11:11:56 myldom sendmail[28520]: [ID 801593] v84ABuq7028520: from=myuser, size=108, class=0, nrcpts=1, msgid=<>, relay=myuser@localhost
Sep  4 11:11:56 myldom sendmail[28521]: [ID 801593] v84ABubQ028521: from=<>, size=450, class=0, nrcpts=1, msgid=<>, proto=ESMTP, daemon=MTA-v4, []
Sep  4 11:11:56 myldom sendmail[28520]: [ID 801593] v84ABuq7028520:, ctladdr=myuser (111/100), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30108, relay=[] [], dsn=2.0.0, stat=Sent (v84ABubQ028521 Message accepted for delivery)
Sep  4 11:15:07 myldom sendmail[28523]: [ID 702911] STARTTLS=client,, version=TLSv1.2, verify=FAIL, cipher=ECDHE-RSA-AES256-SHA384, bits=256/256
Sep  4 11:15:07 myldom sendmail[28523]: [ID 801593] v84ABubQ028521: to=<>, ctladdr=<> (111/100), delay=00:03:11, xdelay=00:03:11, mailer=esmtp, pri=120450, [], dsn=2.0.0, stat=Sent (<> [InternalId=80698140526752,] Queued mail for delivery)

Obviously I can't put them all in /etc/hosts with the same address, but when I took the "mailhost" line out, it failed to find any mailserver at all.
How do I tell sendmail that the mailhost is "" without putting only one address in /etc/hosts?

Many thanks

---------- Post updated at 13:45 ---------- Previous update was at 13:43 ----------

# grep hosts /etc/nsswitch.conf
hosts:  files dns

---------- Post updated at 13:46 ---------- Previous update was at 13:45 ----------

PPS: I'm not sure if this is what you meant, but...
# grep smarthost$* < @ [ $+ ] : > $* $#esmtp $@ [$2] $: $1 < @ [$2] > $3 no smarthost: send$* < @ [ $+ ] : $- : $*> $* $#$3 $@ $4 $: $1 < @ [$2] > $5 smarthost with mailer$* < @ [ $+ ] : $+ > $* $#esmtp $@ $3 $: $1 < @ [$2] > $4 smarthost without mailer pass names that still have a host to a smarthost (if defined)$* < @ $* > $* $: $>MailerToTriple < $S > $1 < @ $2 > $3 glue on smarthost name$* < @ [ $+ ] : > $* $#esmtp $@ [$2] $: $1 < @ [$2] > $3 no smarthost: send$* < @ [ $+ ] : $- : $*> $* $#$3 $@ $4 $: $1 < @ [$2] > $5 smarthost with mailer$* < @ [ $+ ] : $+ > $* $#esmtp $@ $3 $: $1 < @ [$2] > $4 smarthost without mailer pass names that still have a host to a smarthost (if defined)$* < @ $* > $* $: $>MailerToTriple < $S > $1 < @ $2 > $3 glue on smarthost name

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

---------- Post updated at 16:07 ---------- Previous update was at 13:46 ----------

OK, Having a better idea of what I'm looking for now, I found the solution - it's just the implementation I'm unsure of now.

I put the correct mailhost name in like so:

then restarted sendmail and emails get delivered in just a few seconds. Smilie

My last question on this is...
I need to add it to via editing and running make on it, but what's the syntax for
Do I just add the DS line as I want it to appear in as it is above?

Many thanks

Last edited by RudiC; 09-04-2017 at 10:45 AM.. Reason: Added CODE tags.
# 11  
Old 09-04-2017
With the smarthost sendmail does an MX lookup first, like
nslookup -q=mx

If there is no MX it falls back to gethostbyname lookup, like
getent hosts

The second goes to /etc/inet/hosts first (ensure that /etc/hosts and /etc/inet/ipnodes are symlinks to it!)
I have told you to try
nslookup -q=mx

because mailhost is a more standard name for an MX, and MX (mail exchanger records) is the standard for SMTP mailers (is a list of mail servers with a weight for true load balancing). I wonder why you ignore the MX and try to emulate load balancing with a number of IP addresses.
If you want to try (which is the correct way according to but might be more hassle than a direct change in, there is a README somewhere in /usr/lib/mail/
and there is also an article in
This User Gave Thanks to MadeInGermany For This Post:
# 12  
Old 09-05-2017
Thanks MadeinGermany,
I have fixed it by editing and making a new : Just add the DS line as you want it to appear in
I didn't set this up (I'm fairly new here) and since the Exchange server is a Windows server, it's looked after by the Windows team.
I couldn't put multiple entries in /etc/hosts for with multiple IP addresses, which is why I needed another way to tell sendmail where the mail server was.
# nslookup -q=mx

*** Can't find No answer

# nslookup -q=mx

*** Can't find No answer

I found the procedure on an oracle docs webpage (I'm not allowed to post URLs Smilie ) but I wouldn't have found it without the hints and tips in this thread.
Thanks to all who contributed. Smilie

Previous Thread | Next Thread
Test Your Knowledge in Computers #620
Difficulty: Medium
Python implicitly assumes that each physical line corresponds to a logical line.
True or False?

10 More Discussions You Might Find Interesting

1. Solaris

Sendmail delaying mails for 45 mins

Hi, I'm trying to send out mails from my server using mailx, however everytime I send one, it appears to be held in the /var/spool/mqueue for 44 mins before being sent. I'm quite new to sendmail, so don't really know where to start with this /var/log/syslog displays the following: Dec 16... (4 Replies)
Discussion started by: badoshi
4 Replies

2. Shell Programming and Scripting

How to get past 30 mins time in Solaris?

Hi guys, could you help to find a way to get the past 30 mins time in solaris. version: bash-3.00# uname -a SunOS solaris 5.10 Generic_142910-17 i86pc i386 i86pc I had tried the following ways, it works fine in GNU Linux, but doesn't work in Solaris. # date Tue Apr 2 01:01:49 CST... (4 Replies)
Discussion started by: ambious
4 Replies

3. Red Hat

Delay in sending email to-from localhost in Sendmail

Hi Friends, I am very much new to sendmail or any other mta. I just installed sendmail 8.14 on my rhel6 machine. I was trying to send email to local user but after entering the message when i press CTRL-D it simply hangs. I also tried sending email via mutt but again mutt also hangs. It sends... (0 Replies)
Discussion started by: Rohit Bhanot
0 Replies

4. Solaris

Login delay after entering id (40 secs) same after entering pw

Hi all, I have just installed Solaris 10 on an old Fujitsu Primepower 650 which has been wiped clean. I haven't installed anything apart from the OS yet, so the machine is 99% idle. I get long delays when logging in, first after entering the id then another long delay after entering a valid... (8 Replies)
Discussion started by: longjon
8 Replies

5. UNIX for Advanced & Expert Users

getting time mins ago

Hi I trying to get 5 mins ago time using below command echo `date +%R -d "1 min ago"` but this is giving only current time. Please help (6 Replies)
Discussion started by: cka
6 Replies

6. Shell Programming and Scripting

how to calculate the time 10 mins ago?? unix

Hi guys, Im trying to subtract time in ksh script. i.e. basically im querying a database and i want to get the time 10mins before hand..(from) in ksh CurrMin=$(date "+%M") from=`expr $CurrMin - 10` to=$CurrMin however if i run this i say at 2 or 3 mins past the hour, i.e.... (7 Replies)
Discussion started by: k00061804
7 Replies

7. Shell Programming and Scripting

Time delay for awk

I have an awk script, and want to introduce a time delay. How can I do this? (3 Replies)
Discussion started by: kristinu
3 Replies

8. Shell Programming and Scripting

Calculating delay time - bash

Hi, I am having the following problem. test > hourOfDay=06 ; delayTime=$(((9-$hourOfDay)*60)) ; echo $delayTime 180 test > hourOfDay=07 ; delayTime=$(((9-$hourOfDay)*60)) ; echo $delayTime 120 test > hourOfDay=08 ; delayTime=$(((9-$hourOfDay)*60)) ; echo $delayTime bash: (9-08: value... (5 Replies)
Discussion started by: jbsimon000
5 Replies

9. Shell Programming and Scripting

ls -e to find out File modification time in secs

Hi All, I would like to know the file modification time till seconds in Unix. So I tried ls -e and it worked fine. This Solaris 5.10 -rw-rw-r-- 1 test admin 22 Sep 12 11:01:37 2008 test_message But I am not able to run the same command in SOlaris 5.6 and also in AIX/HP Is there... (3 Replies)
Discussion started by: rahulkav
3 Replies

10. Solaris

lock time delay

I have a Sol system. The lock timeout is default 15 minutes. I tried to make it longer but cannot by lock -t timeout Anyon can tell me the cmd in solai for this please. A thank in advance (2 Replies)
Discussion started by: part-time-user
2 Replies

Featured Tech Videos