Unix/Linux Go Back    


UNIX and Linux Applications Discuss UNIX and Linux software applications. This includes SQL, Databases, Middleware, MOM, SOA, EDA, CEP, BI, BPM and similar topics.

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

UNIX and Linux Applications


Tags
sendmail, solaris, solaris 11.3, solved

Reply    
 
Thread Tools Search this Thread Display Modes
    #8  
Old Unix and Linux 09-01-2017   -   Original Discussion by Mysturji
Peasant's Unix or Linux Image
Peasant Peasant is offline Forum Advisor  
Registered User
 
Join Date: Mar 2011
Last Activity: 18 January 2018, 10:57 AM EST
Posts: 1,111
Thanks: 32
Thanked 332 Times in 286 Posts
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.
The Following User Says Thank You to Peasant For This Useful Post:
Mysturji (09-05-2017)
Sponsored Links
    #9  
Old Unix and Linux 09-01-2017   -   Original Discussion by Mysturji
MadeInGermany's Unix or Linux Image
MadeInGermany MadeInGermany is offline Forum Staff  
Moderator
 
Join Date: May 2012
Last Activity: 18 January 2018, 4:14 AM EST
Location: Simplicity
Posts: 3,933
Thanks: 333
Thanked 1,315 Times in 1,185 Posts
I guess the smarthost in /etc/mail/sendmail.cf (and/or submit.cf) is mailhost.fqdn.uk.
Check its DNS resolution with


Code:
nslookup -q=mx mailhost.fqdn.uk

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
The Following User Says Thank You to MadeInGermany For This Useful Post:
Mysturji (09-04-2017)
Sponsored Links
    #10  
Old Unix and Linux 09-04-2017   -   Original Discussion by Mysturji
Mysturji's Unix or Linux Image
Mysturji Mysturji is offline
Registered User
 
Join Date: Sep 2017
Last Activity: 16 January 2018, 9:52 AM EST
Location: I'd rather be flying my Cobra Mk. III
Posts: 7
Thanks: 8
Thanked 0 Times in 0 Posts
Thanks hicksd8, but that has already been set as suggested:


Code:
# grep ^DS sendmail.cf submit.cf
sendmail.cf:DS
submit.cf: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:


Code:
# nslookup outlook.fqdn.uk
Server:         10.10.0.35
Address:        10.10.0.35#53

Name:   outlook.fqdn.uk
Address: 10.10.3.47
Name:   outlook.fqdn.uk
Address: 10.10.3.48
Name:   outlook.fqdn.uk
Address: 10.10.0.171

"SVP-MAIL01" is one of those load-balanced mailservers, which mail gets forwarded to from the old mailhost in the syslog snippet below:


Code:
Sep  4 11:11:56 myldom sendmail[28520]: [ID 801593 mail.info] v84ABuq7028520: from=myuser, size=108, class=0, nrcpts=1, msgid=<201709041011.v84ABuq7028520@myldom.fqdn.uk>, relay=myuser@localhost
Sep  4 11:11:56 myldom sendmail[28521]: [ID 801593 mail.info] v84ABubQ028521: from=<myuser@myldom.fqdn.uk>, size=450, class=0, nrcpts=1, msgid=<201709041011.v84ABuq7028520@myldom.fqdn.uk>, proto=ESMTP, daemon=MTA-v4, relay=localhost.fqdn.uk [127.0.0.1]
Sep  4 11:11:56 myldom sendmail[28520]: [ID 801593 mail.info] v84ABuq7028520: to=my.name@company.uk, ctladdr=myuser (111/100), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30108, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (v84ABubQ028521 Message accepted for delivery)
Sep  4 11:15:07 myldom sendmail[28523]: [ID 702911 mail.info] STARTTLS=client, relay=mailhost.fqdn.uk, version=TLSv1.2, verify=FAIL, cipher=ECDHE-RSA-AES256-SHA384, bits=256/256
Sep  4 11:15:07 myldom sendmail[28523]: [ID 801593 mail.info] v84ABubQ028521: to=<my.name@company.uk>, ctladdr=<myuser@myldom.fqdn.uk> (111/100), delay=00:03:11, xdelay=00:03:11, mailer=esmtp, pri=120450, relay=mailhost.fqdn.uk [10.10.0.98], dsn=2.0.0, stat=Sent (<201709041011.v84ABuq7028520@myldom.fqdn.uk> [InternalId=80698140526752, Hostname=SVP-MAIL01.fqdn.uk] 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 "outlook.fqdn.uk" without putting only one address in /etc/hosts?

Many thanks

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

P.S.


Code:
# 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...
Quote:
# grep smarthost sendmail.cf submit.cf
sendmail.cf:R$* < @ [ $+ ] : > $* $#esmtp $@ [$2] $: $1 < @ [$2] > $3 no smarthost: send
sendmail.cf:R$* < @ [ $+ ] : $- : $*> $* $#$3 $@ $4 $: $1 < @ [$2] > $5 smarthost with mailer
sendmail.cf:R$* < @ [ $+ ] : $+ > $* $#esmtp $@ $3 $: $1 < @ [$2] > $4 smarthost without mailer
sendmail.cf:# pass names that still have a host to a smarthost (if defined)
sendmail.cf:R$* < @ $* > $* $: $>MailerToTriple < $S > $1 < @ $2 > $3 glue on smarthost name
submit.cf:R$* < @ [ $+ ] : > $* $#esmtp $@ [$2] $: $1 < @ [$2] > $3 no smarthost: send
submit.cf:R$* < @ [ $+ ] : $- : $*> $* $#$3 $@ $4 $: $1 < @ [$2] > $5 smarthost with mailer
submit.cf:R$* < @ [ $+ ] : $+ > $* $#esmtp $@ $3 $: $1 < @ [$2] > $4 smarthost without mailer
submit.cf:# pass names that still have a host to a smarthost (if defined)
submit.cf:R$* < @ $* > $* $: $>MailerToTriple < $S > $1 < @ $2 > $3 glue on smarthost name


Moderator's Comments:
Sendmail delay: 3 mins 11 secs... Every time. 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 sendmail.cf like so:


Code:
DSoutlook.fqdn.uk

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

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

Many thanks

Last edited by RudiC; 09-04-2017 at 10:45 AM.. Reason: Added CODE tags.
    #11  
Old Unix and Linux 09-04-2017   -   Original Discussion by Mysturji
MadeInGermany's Unix or Linux Image
MadeInGermany MadeInGermany is offline Forum Staff  
Moderator
 
Join Date: May 2012
Last Activity: 18 January 2018, 4:14 AM EST
Location: Simplicity
Posts: 3,933
Thanks: 333
Thanked 1,315 Times in 1,185 Posts
With the smarthost sendmail does an MX lookup first, like


Code:
nslookup -q=mx outlook.fqdn.uk

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


Code:
getent hosts outlook.fqdn.uk

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


Code:
nslookup -q=mx mailhost.fqdn.uk

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 sendmail.mc (which is the correct way according to sendmail.org but might be more hassle than a direct change in sendmail.cf), there is a README somewhere in /usr/lib/mail/
and there is also an article in docs.oracle.com.
The Following User Says Thank You to MadeInGermany For This Useful Post:
Mysturji (09-05-2017)
Sponsored Links
    #12  
Old Unix and Linux 09-05-2017   -   Original Discussion by Mysturji
Mysturji's Unix or Linux Image
Mysturji Mysturji is offline
Registered User
 
Join Date: Sep 2017
Last Activity: 16 January 2018, 9:52 AM EST
Location: I'd rather be flying my Cobra Mk. III
Posts: 7
Thanks: 8
Thanked 0 Times in 0 Posts
Thanks MadeinGermany,
I have fixed it by editing sendmail.mc and making a new sendmail.cf : Just add the DS line as you want it to appear in sendmail.cf
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 outlook.fqdn.uk with multiple IP addresses, which is why I needed another way to tell sendmail where the mail server was.


Code:
# nslookup -q=mx mailhost.fqdn.uk
Server:         10.10.0.35
Address:        10.10.0.35#53

*** Can't find mailhost.fqdn.uk: No answer

# nslookup -q=mx outlook.fqdn.uk
Server:         10.10.0.35
Address:        10.10.0.35#53

*** Can't find outlook.fqdn.uk: No answer

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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Sendmail delaying mails for 45 mins badoshi Solaris 4 12-16-2013 04:35 PM
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
ls -e to find out File modification time in secs rahulkav Shell Programming and Scripting 3 09-12-2008 12:04 PM



All times are GMT -4. The time now is 01:48 PM.