[exim] SMTP timeout after pipelined end of data (5334 bytes …

Top Page
Delete this message
Reply to this message
Author: Marc MERLIN
Date:  
To: exim-users
Subject: [exim] SMTP timeout after pipelined end of data (5334 bytes written), hang at DAT 7247 LAST. Local_scan vs chunking issue?
Howdy,

Long time, no talk, sorry that I've been a stranger :)

I have Exim version 4.92 #3 built 07-May-2019 17:44:23
on both the backup MX and the main MX (both running debian)

I have an issue where some Emails go to the backup MX, then the backup
MX sends to the main MX, and the mail gets delivered to my mailbox, but
the transaction isn't finished in a way that the backup knows the mail
went through, so it sends it over and over again.

Well, except that with the same queue flush command I have a log of it
hanging and failing, and then a later log of it going through.
I am using sa-exim in local_scan which does run after DATA has been
sent. I'm not sure if this could be related.

It looks like this:
moremagic:~# exim -v -qf 1kG0Wt-0001K6-TH
LOG: MAIN
cwd=/root 4 args: exim -v -qf 1kG0Wt-0001K6-TH
LOG: queue_run MAIN
Start queue run: pid=6293 -qf
delivering 1kG3DU-0003Au-Fd (queue run pid 6293)
T: remote_smtp for marcatwww@???
Connecting to mail1.merlins.org [209.81.13.136]:25 ... connected
SMTP<< 220 mail1.merlins.org ESMTP Exim 4.92 #3 Thu, 10 Sep 2020 12:05:28 -0700 - mm9
SMTP>> EHLO mail2.merlins.org

  SMTP<< 250-mail1.merlins.org Hello mail2.merlins.org [213.228.62.38]
         250-SIZE 26214400
         250-8BITMIME
         250-VRFY
         250-EXPN
         250-PIPELINING
         250-AUTH PLAIN LOGIN
         250-CHUNKING
         250-STARTTLS
         250 HELP

SMTP>> STARTTLS

SMTP<< 220 TLS go ahead
SMTP>> EHLO mail2.merlins.org

  SMTP<< 250-mail1.merlins.org Hello mail2.merlins.org [213.228.62.38]
         250-SIZE 26214400
         250-8BITMIME
         250-VRFY
         250-EXPN
         250-PIPELINING
         250-AUTH PLAIN LOGIN
         250-CHUNKING
         250 HELP

SMTP>> MAIL FROM:<SRS0=1t+SHt=CS=solar.cc=info@???> SIZE=8413
SMTP>> RCPT TO:<marcatwww@???>

         will write message using CHUNKING

SMTP>> BDAT 7247 LAST


and then it hangs here.

In the logs, I see
2020-09-10 11:41:41 1kG0Wt-0001K6-TH == marcatwww@??? R=dnslookup T=remote_smtp defer (110): Connection timed out H=mail1.merlins.org [209.81.13.136]: SMTP timeout after pipelined end of data (5334 bytes written)

But on the other side, I see:
2020-09-10 12:05:33 1kGRsw-0006mt-VG SA: Debug: SAEximRunCond expand returned: '1'
2020-09-10 12:05:33 1kGRsw-0006mt-VG SA: Debug: check succeeded, running spamc
2020-09-10 12:05:34 1kGRsw-0006mt-VG SA: Action: scanned but message isn't spam: score=6.4 required=7.0 (scanned in 1/1 secs | Message-Id: 15835da1-3b2d-8b
a6-e219-a838a141a70b@???). From <SRS0=1t+SHt=CS=solar.cc=info@???> (host=NULL [213.228.62.38]) for marcatwww@???
2020-09-10 12:05:34 1kGRsw-0006mt-VG <= SRS0=1t+SHt=CS=solar.cc=info@??? H=(mail2.merlins.org) [213.228.62.38]:54380 I=[209.81.13.136]:25 P=esmtps X
=TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256 CV=no K S=7471 DKIM=solar.cc id=15835da1-3b2d-8ba6-e219-a838a141a70b@??? T="Re: hi from germany (tesla model
3 12V to household ac)" from <SRS0=1t+SHt=CS=solar.cc=info@???> for marcatwww@???
2020-09-10 12:05:34 cwd=/var/spool/exim4 3 args: /usr/sbin/exim4 -Mc 1kGRsw-0006mt-VG
2020-09-10 12:05:34 1kGRsw-0006mt-VG => |/usr/bin/procmail -m /home/merlin/.procmail/procmailrc_marcme (marcatwww@???) <marcatwww@???> F=<SRS0=1t+S
Ht=CS=solar.cc=info@???> R=system_aliases_merlin T=address_pipe_root S=7550

The Email was scanned in 1 second and accepted.



I then ran it again, and it went through (well, I mean I got yet another
copy, but the backup MX is now happy that the mail went through).

moremagic:~# exim -v -qf 1kG0Wt-0001K6-TH
LOG: MAIN
cwd=/root 4 args: exim -v -qf 1kG0Wt-0001K6-TH
LOG: queue_run MAIN
Start queue run: pid=6427 -qf
delivering 1kG0Wt-0001K6-TH (queue run pid 6427)
T: remote_smtp for marcatwww@???
Connecting to mail1.merlins.org [209.81.13.136]:25 ... connected
SMTP<< 220 mail1.merlins.org ESMTP Exim 4.92 #3 Thu, 10 Sep 2020 12:06:41 -0700 - mm9
SMTP>> EHLO mail2.merlins.org

  SMTP<< 250-mail1.merlins.org Hello mail2.merlins.org [213.228.62.38]
         250-SIZE 26214400
         250-8BITMIME
         250-VRFY
         250-EXPN
         250-PIPELINING
         250-AUTH PLAIN LOGIN
         250-CHUNKING
         250-STARTTLS
         250 HELP

SMTP>> STARTTLS

SMTP<< 220 TLS go ahead
SMTP>> EHLO mail2.merlins.org

  SMTP<< 250-mail1.merlins.org Hello mail2.merlins.org [213.228.62.38]
         250-SIZE 26214400
         250-8BITMIME
         250-VRFY
         250-EXPN
         250-PIPELINING
         250-AUTH PLAIN LOGIN
         250-CHUNKING
         250 HELP

SMTP>> MAIL FROM:<SRS0=1t+SHt=CS=solar.cc=info@???> SIZE=6504
SMTP>> RCPT TO:<marcatwww@???>

         will write message using CHUNKING

SMTP>> BDAT 5334 LAST

  SMTP<< 250 OK
  SMTP<< 250 Accepted
  SMTP<< 250- 5334 byte chunk, total 5334
         250 OK id=1kGRu6-0006vO-DL

SMTP>> QUIT

SMTP(close)>>
LOG: MAIN
=> marcatwww@??? F=<SRS0=1t+SHt=CS=solar.cc=info@???> R=dnslookup T=remote_smtp S=5334 H=mail1.merlins.org [209.81.13.136] I=[213.228.62.40] X=TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256 CV=no DN="C=US,ST=CA,L=Silicon Valley,O=Linux Geeks Incorporated,OU=merlins.org,CN=*.merlins.org" K C="250- 5334 byte chunk, total 5334\\n250 OK id=1kGRu6-0006vO-DL"
LOG: MAIN
Completed


Thanks,
Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.

Home page: http://marc.merlins.org/                       | PGP 7F55D5F27AAF9D08