Jump to: navigation, search
MithiWiki Home > ConnectXf Home > ConnectXf Administration > Configuration > Maillog shows mail sending attempts by certain senders are resulting in connection time outs


Troubleshooting Icon.png
Troubleshooting
Product ConnectXf
Version All
Applies to Administrators
Level Advanced



Senders are complaining the my server is not accepting their mail OR is taking too long with multiple retries

Senders receiving notification by MTA that server is not accepting the mail which remains in the queue to retry

Maillog shows mail sending attempts by certain senders are resulting in connection time outs

Symptoms:

  1. Mail sending attempts by certain senders are resulting in connection time outs as observed from the log.
cat /var/log/messages | grep "connection timed out" | wc -l
  1. Senders are getting notification by their MTAs that our server is not accepting the mail, the mail is still in the queue and that it will retry for some more time.
  2. Sometimes the mail is delivered after multiple retries and sometimes it simply bounces.

Cause:

  1. Our server (recipient) is timing out on these connections as is seen by scanning the messages log as shown below.
Search for the sender email id.
# zcat /var/log/messages.1.gz | grep <sender email id> -i
Mar 31 08:50:38 SERVER smtpd: 1206933638.368221 qmail-smtpd 755: mail from: <sender email id>
Search now for all log lines pertaining to the above transaction
# zcat /var/log/messages.1.gz | grep "qmail-smtpd 755:"
Mar 31 08:50:37 SERVER smtpd: 1206933637.503986 qmail-smtpd 755: connection from <sender ip> (unknown) to 0
Mar 31 08:50:37 SERVER smtpd: 1206933637.504006 qmail-smtpd 755: enabled options: max msg size: 12582912 sanitycheck rblcheck rblonlyheader sendercheck rcptcheck smtp-auth qmailqueue /var/qmail/bin/qmail-scanner-queue.pl
Mar 31 08:50:38 SERVER smtpd: 1206933638.203883 qmail-smtpd 755: RBL check with 'dnsbl.sorbs.net': no match found, continue.
Mar 31 08:50:38 SERVER smtpd: 1206933638.285674 qmail-smtpd 755: RBL check with 'sbl.spamhaus.org': no match found, continue.
Mar 31 08:50:38 SERVER smtpd: 1206933638.368202 qmail-smtpd 755: RBL check with 'spamguard.leadmon.net': no match found, continue.
Mar 31 08:50:38 SERVER smtpd: 1206933638.368221 qmail-smtpd 755: mail from: <sender email id>
Mar 31 08:50:38 SERVER smtpd: 1206933638.707090 qmail-smtpd 755: rcpt to: <local recipient>
Mar 31 08:52:39 SERVER smtpd: 1206933759.319644 qmail-smtpd 755: connection timed out, closing connection
  1. Connection can time out due to several reasons. The one which is in our control is the timeout parameter for SMTP on our server.

Solution:

  1. Increase the SMTP session time out to 600 seconds or beyond

Case 1: Not getting mails from external domains

  • Tail the the messages log and check if the mails from the external domains are coming

How to check:

#tail -f /var/log/messages 
Aug 29 00:02:25 MEMMxc1 smtpd: 1219948345.389480 qmail-smtpd 3173: enabled options: max msg   size:15728640 starttls sanitycheck returnmxcheck rblcheck rblonlyheader sendercheck rcptcheck smtp-auth
Aug 29 00:02:25 MEMMxc1 smtpd: 1219948345.415188 qmail-smtpd 2157: RBL check with 'sbl.spamhaus.org': temporary DNS error, ignored
Aug 29 00:02:25 MEMMxc1 smtpd: 1219948345.415216 no match found, continue.
Aug 29 00:02:25 MEMMxc1 smtpd: 1219948345.445081 qmail-smtpd 2167: RBL check with 'sbl.spamhaus.org': temporary DNS error, ignored
Aug 29 00:02:25 MEMMxc1 smtpd: 1219948345.445110 no match found, continue.
Aug 29 00:02:25 MEMMxc1 smtpd: 1219948345.545121 qmail-smtpd 360: refused mailfrom because return   MX lookup failed temporarly
Aug 29 00:02:25 MEMMxc1 smtpd: 1219948345.545159 qmail-smtpd 360: read error or connection closed
  • If messages log contains above error. This is dns issue. It means your dns server is not responding.It is not able to resolve the return mx of the incoming mailids and due Return mx
  • check your DNS
host -a yahoo.com

Solution:

  • Edit the /etc/resolv.conf file with working DNS server. Add the new working dns entry at the top of file as given below
vi /etc/resolv.conf
nameserver dns_server_ip

Case 2: Not getting mails from external domains

How to check

  • Server is not much loaded


  • Check if messages log contains following logs in the messages log,confirm if the smtp- connection to remoter server giving read error.
Aug 30 00:13:36 MEMFE1 smtpd: 1220035416.970000 qmail-smtpd 25152: connection from 203.199.162.249 (unknown) to 0
Aug 30 00:13:36 MEMFE1 smtpd: 1220035416.970000 qmail-smtpd 25152: enabled options: max msg size: 15728640 starttls sendercheck rcptcheck  qmailqueue /var/qmail/bin/qmail-scanner-queue.pl
Aug 30 00:13:36 MEMFE1 smtpd: 1220035416.970000 qmail-smtpd 25152: mail from: andrew@vodafone.com
Aug 30 00:13:36 MEMFE1 smtpd: 1220035416.970000 qmail-smtpd 25152: rcpt to: mundrav@bilsyn.com
Aug 30 00:13:39 MEMFE1 smtpd: 1220035419.540000 Details :: Message Queued["Status"="Message successfully Queued"]["IP"="203.199.162.249"]["Sender"="andrew@vodafone.com"]["Recipients"="mundrav@bilsyn.com, "]["Date"="Fri, 29 Aug 2008 17:09:50 +0000"]["MessageID"="000801c90a09$03df647a$099667aa@jcdixttc"]["Subject"="[***probable spam***] erection for sexual activity"]["Size(KB)"="4"]["AttachmentCount"="0"]["AttachmentList"=""]["ReturnCode"="0"]["ProcessingTime"="[ProcessingTime=0.130]"]["ProcessedSteps"="{Mail Policy - Allow(Matched rule: no rule found)}{Quota check - not applicable}{Mail Footer(local) - Skipped(not applicable)}{Mail Footer(remote) - Skipped(no remote recipients)}"]
Aug 30 00:13:39 MEMFE1 smtpd: 1220035419.550000 qmail-smtpd 25152: message queued: 1220035419 qp 25154 size 3191 bytes
Aug 30 00:13:41 MEMFE1 smtpd: 1220035421.960000 qmail-smtpd 25152: read error or connection closed
  • On the remote server maillogs contains error lfor "connection timed out while sending messasege body"
8Check telnet form remote server to your server. It gives proper response upto following steps.
root@ES183 ~]# telnet 192.168.0.75 25
Trying 192.168.0.75...
Connected to 192.168.0.75.
Escape character is '^]'.
220 test.int ESMTP
mail from:support@mithi.com
250 ok
rcpt to:support@adityabirla.com
250 ok
  • But after the your write data and
data
354 go ahead punk, make my day
mail from:support@mithi.com
rcpt to:support@adityabirla.com
subject:test
tes mai
.
(Here  it gives you very late response to queue the messages )

250 ok 1220072667 qp 18500 by test.int


Solution:

  • This is network related issue. Check the network connection Switches, Router connectivity.

Case 3: Not getting mail from external domains

Symptom

  • Mails from external domains are not being received by users.
  • The messages logs show lines similar to the lines given below, where one of the RBL site takes too long to respond (check time difference between line 3 and 4)
Jun 6 00:03:22 rs smtpd: 1244226802.015959 qmail-smtpd 6117: mail from: abc@acme.com.br
Jun 6 00:03:22 rs smtpd: 1244226802.244034 qmail-smtpd 6117: RBL check with 'b.barracudacentral.org': no match found, continue.
Jun 6 00:03:22 rs smtpd: 1244226802.263802 qmail-smtpd 6117: RBL check with 'dnsbl.sorbs.net': no match found, continue.
Jun 6 00:04:06 rs smtpd: 1244226846.560217 qmail-smtpd 6117: RBL check with 'sbl.spamhaus.org': temporary DNS error, ignored
Jun 6 00:04:06 rs smtpd: 1244226846.576294 qmail-smtpd 6117: RBL check with 'spamguard.leadmon.net': no match found, continue.
Jun 6 00:04:11 rs smtpd: 1244226851.415083 qmail-smtpd 6117: read error or connection closed

Cause

  • When the RBL sites take too long to respond the sending servers timeout and break the connection

Solution

  • Remove the RBL check for the RBL site not responding in time.