LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 01-10-2013, 07:40 AM   #1
mcburton3
LQ Newbie
 
Registered: Apr 2011
Posts: 13

Rep: Reputation: 1
Sendmail extremely slow establishing connctions


I have a web application running on a Linux RedHat server that sends email notifications. In the past, I used our Internet providers SMTP server to relay emails but it was not reliable, so I just switched to using the localhost sendmail SMTP. However, I noticed that something is causing a huge delay when establishing a connection to the local sendmail SMTP server as it takes approximately 40 - 60 secs just to establish the connection. It is not a webserver issue as it happens if I try to connect from a remote machine as well.

I am not very knowledgeable when it comes to sendmail. Do any of you have any ideas what could be causing this or where I might start in finding the source of the delay? We tested this local SMTP server some time ago and it was fast in establishing connections, but someone else made some changes to it to prevent WAN servers from connecting and I suspect that had something to do with it.

Thank you in advance.

Matt
 
Old 01-10-2013, 07:58 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 761
Blog Entries: 2

Rep: Reputation: 197Reputation: 197
Is it DNS lookups that time out?
 
Old 01-10-2013, 08:48 AM   #3
mcburton3
LQ Newbie
 
Registered: Apr 2011
Posts: 13

Original Poster
Rep: Reputation: 1
That's a good question. I am not sure and I don't know how to determine if it a dns lookup delay. However, I do know that the webapp connecting to the server us using an IP address not a server name, so I wouldn't think there is a DNS lookup happening. Likewise, when the webapp attempts to connect to the Internet provider SMTP server via full domain name, it is able to establish a connection in less than a second.
 
Old 01-10-2013, 08:52 AM   #4
mcburton3
LQ Newbie
 
Registered: Apr 2011
Posts: 13

Original Poster
Rep: Reputation: 1
Okay, I ran dig from the server to www.yahoo.com and www.google.com and both DNS lookups completed in under 17ms. "dig www.faa.gov" took 135ms. So I think the DNS lookup is probably not the issue, but thank you for the suggestion as now I can rule that out.
 
Old 01-10-2013, 09:12 AM   #5
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 761
Blog Entries: 2

Rep: Reputation: 197Reputation: 197
I mean the reverse lookup from the mailserver on the source IP of the incoming SMTP connection.
 
Old 01-10-2013, 09:39 AM   #6
mcburton3
LQ Newbie
 
Registered: Apr 2011
Posts: 13

Original Poster
Rep: Reputation: 1
Oh, I see. Would it do a reverse lookup for connections coming from localhost?
 
Old 01-10-2013, 08:14 PM   #7
mcburton3
LQ Newbie
 
Registered: Apr 2011
Posts: 13

Original Poster
Rep: Reputation: 1
I caught a trace from the sendmail log, /var/log/maillog, where another web server (192.168.15.239) connects to the mail server on 192.168.15.110. You can see the long delay between the first log entry (connect from...) to the next entry (AUTH: ...). Any ideas on where I can look?

Jan 10 18:18:07 localhost sendmail[4652]: NOQUEUE: connect from [192.168.15.239]
Jan 10 18:19:00 localhost sendmail[4652]: AUTH: available mech=GSSAPI NTLM CRAM-MD5 LOGIN PLAIN DIGEST-MD5 ANONYMOUS, allowed mech=EXTERNAL GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5
Jan 10 18:19:00 localhost sendmail[4652]: r0B0I7bO004652: Milter: no active filter
Jan 10 18:19:01 localhost sendmail[4652]: r0B0I7bO004652: to=<****@****.***>, delay=00:00:00, pri=0, stat=RSET
Jan 10 18:19:01 localhost sendmail[4652]: r0B0I7bO004652: to=<****@****.***>, delay=00:00:00, pri=0, stat=RSET
Jan 10 18:19:01 localhost sendmail[4652]: r0B0I7bO004652: to=<****@****.***>, delay=00:00:00, pri=0, stat=RSET
Jan 10 18:19:01 localhost sendmail[4652]: r0B0I7bO004652: from=<****@****.***>, size=0, class=0, nrcpts=3, proto=ESMTP, daemon=MTA, relay=[192.168.15.239]
Jan 10 18:19:17 localhost sendmail[4652]: r0B0I7bQ004652: from=<****@****.***>, size=304, class=0, nrcpts=3, msgid=<916631122.1357863648766.JavaMail.javamailuser@localhost>, proto=ESMTP, daemon=MTA, relay=[192.168.15.239]
Jan 10 18:19:17 localhost sendmail[4695]: r0B0I7bQ004652: SMTP outgoing connect on [192.168.15.110]
Jan 10 18:19:18 localhost sendmail[4695]: r0B0I7bQ004652: to=<****@****.***>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=180304, relay=mx.coxmail.com. [68.99.120.4], dsn=2.0.0, stat=Sent (mQKh1k01107nTQg01QKi4C mail accepted for delivery - 1 ??)
Jan 10 18:19:18 localhost sendmail[4695]: r0B0I7bQ004652: SMTP outgoing connect on [192.168.15.110]
Jan 10 18:19:20 localhost sendmail[4695]: r0B0I7bQ004652: to****@****.***>, delay=00:00:03, xdelay=00:00:02, mailer=esmtp, pri=180304, relay=mta6.am0.yahoodns.net. [98.138.112.38], dsn=2.0.0, stat=Sent (okdirdel 2/0)
Jan 10 18:19:20 localhost sendmail[4695]: r0B0I7bQ004652: done;
delay=00:00:03, ntries=1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
sendmail startup extremely slow kaplan71 Linux - Software 2 06-20-2012 01:22 AM
OpenSwan U2.6.24 on 2.6.27.7-9-pae (32-bit) slow at establishing connection rks752 Linux - Networking 0 03-24-2010 03:04 AM
IBM T42 "Extremely, EXTREMELY Slow" alwayslearning Linux - Laptop and Netbook 5 10-11-2009 03:34 AM
FC4 bootup extremely slow? stuck in 'starting sendmail' renshao Fedora 3 03-12-2006 03:59 PM
sdl games are slow extremely slow linksocc Linux - Software 7 01-17-2004 03:53 PM


All times are GMT -5. The time now is 01:54 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration