Mailing List Archive

Exim stucks after bdat command when sending to google
Hello,

After update to 4.94 I have a problem to send emails to google. It
stucks after bdat command  For me it looks very simillar to this bug:
https://bugs.exim.org/show_bug.cgi?id=1974

When I tried to send same message using 4.92.3 binaries then message is
correctly received by google. With 4.94 i got:

  SMTP<< 220 mx.google.com ESMTP t18si12300997ejj.437 - gsmtp
  SMTP>> EHLO **DELETED**
  SMTP<< 250-mx.google.com at your service, [**DELETED**]
         250-SIZE 157286400
         250-8BITMIME
         250-STARTTLS
         250-ENHANCEDSTATUSCODES
         250-PIPELINING
         250-CHUNKING
         250 SMTPUTF8
  SMTP>> STARTTLS
  SMTP<< 220 2.0.0 Ready to start TLS
  SMTP>> EHLO **DELETED**
  SMTP<< 250-mx.google.com at your service, [**DELETED**]
         250-SIZE 157286400
         250-8BITMIME
         250-ENHANCEDSTATUSCODES
         250-PIPELINING
         250-CHUNKING
         250 SMTPUTF8
  SMTP>> MAIL FROM:<**DELETED**> SIZE=151847
  SMTP>> RCPT TO:<**DELETED**>
         will write message using CHUNKING
  SMTP>> BDAT 7789
  SMTP<< 250 2.1.0 OK t18si12300997ejj.437 - gsmtp
  SMTP<< 250 2.1.5 OK t18si12300997ejj.437 - gsmtp
  SMTP<< 250 2.0.0 OK t18si12300997ejj.437 - gsmtp
  SMTP>> BDAT 143035 LAST

and after few minutes I received:

  SMTP(Connection timed out)<<
LOG: MAIN
  H=alt1.gmail-smtp-in.l.google.com [142.250.147.26]: SMTP timeout after
end of data (150824 bytes written): Connection timed out
  SMTP(close)>>


When I added ``` hosts_try_chunking =   ``` to my smtp configuration
then message stucks after:


  SMTP>> STARTTLS
  SMTP<< 220 2.0.0 Ready to start TLS
  SMTP>> EHLO **DELETED**
  SMTP<< 250-mx.google.com at your service, [**DELETED**]
         250-SIZE 157286400
         250-8BITMIME
         250-ENHANCEDSTATUSCODES
         250-PIPELINING
         250-CHUNKING
         250 SMTPUTF8
  SMTP>> MAIL FROM:<**DELETED**> SIZE=151847
  SMTP>> RCPT TO:<**DELETED**>
  SMTP>> DATA
  SMTP<< 250 2.1.0 OK k22si16455243wmr.170 - gsmtp
  SMTP<< 250 2.1.5 OK k22si16455243wmr.170 - gsmtp
  SMTP<< 354  Go ahead k22si16455243wmr.170 - gsmtp
  SMTP>> writing message and terminating "."

any idea what can cause this and why using 4.92.3 exim it works and
using 4.94 it doesn't?

Regards

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Exim stucks after bdat command when sending to google [ In reply to ]
On 29/03/2021 13:08, Grzegorz Wit via Exim-users wrote:
> After update to 4.94 I have a problem to send emails to google. It
> stucks after bdat command  For me it looks very simillar to this bug:
> https://bugs.exim.org/show_bug.cgi?id=1974

Unlikely; that was a reception issue and you're doing transmission.

> any idea what can cause this and why using 4.92.3 exim it works and
> using 4.94 it doesn't?

Best immediate guess is that you're talking through an out-of-spec
firewall. Packet capture required for further diagnosis.
--
Cheers,
Jeremy

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Exim stucks after bdat command when sending to google [ In reply to ]
On Wed, Mar 31, 2021 at 12:30:46PM +0100, Jeremy Harris via Exim-users wrote:
> On 29/03/2021 13:08, Grzegorz Wit via Exim-users wrote:
> >any idea what can cause this and why using 4.92.3 exim it works and
> >using 4.94 it doesn't?
>
> Best immediate guess is that you're talking through an out-of-spec
> firewall. Packet capture required for further diagnosis.

Small remark. The session log is:

? SMTP>> MAIL FROM:<**DELETED**> SIZE=151847
? SMTP>> RCPT TO:<**DELETED**>
???????? will write message using CHUNKING
? SMTP>> BDAT 7789
? SMTP<< 250 2.1.0 OK t18si12300997ejj.437 - gsmtp
? SMTP<< 250 2.1.5 OK t18si12300997ejj.437 - gsmtp
? SMTP<< 250 2.0.0 OK t18si12300997ejj.437 - gsmtp
? SMTP>> BDAT 143035 LAST

BDAT sizes are 7789+143035=150824, but MAIL FROM contains SIZE=151847.
They should be equal, isn't it?

And there is no reply from server to BDAT LAST, that is also strange.
Packet capture would be very helpful, yes.
--
Eugene Berdnikov

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Exim stucks after bdat command when sending to google [ In reply to ]
On 31/03/2021 12:56, Evgeniy Berdnikov via Exim-users wrote:
> Small remark. The session log is:
>
>   SMTP>> MAIL FROM:<**DELETED**> SIZE=151847
>   SMTP>> RCPT TO:<**DELETED**>
>          will write message using CHUNKING
>   SMTP>> BDAT 7789
>   SMTP<< 250 2.1.0 OK t18si12300997ejj.437 - gsmtp
>   SMTP<< 250 2.1.5 OK t18si12300997ejj.437 - gsmtp
>   SMTP<< 250 2.0.0 OK t18si12300997ejj.437 - gsmtp
>   SMTP>> BDAT 143035 LAST
>
> BDAT sizes are 7789+143035=150824, but MAIL FROM contains SIZE=151847.
> They should be equal, isn't it?

No; the sending Exim does not have perfect information about the
message size as it will be transmitted, at the the time the MAIL
command goes out.
--
Cheers,
Jeremy

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Exim stucks after bdat command when sending to google [ In reply to ]
Thanks for your reply.
I don't know if that you have on mind but i got something like this;

Tcpdump with exim 4.94 and csf:

https://pastebin.com/kdVZuF16

When I stoped my firewall (CSF) then message is correctly received by
google. So that might be a firewall issue as you said, but why exim
4.92-3 works  without any issue.

tcpdump with exim 4.94 without CSF:

https://pastebin.com/5Mumdwg8


Also i realized that problem exist only when FROM is SRS. Standard
messages are received correctly.


Regards

Grzegorz



--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Exim stucks after bdat command when sending to google [ In reply to ]
On 01/04/2021 09:41, Grzegorz Wit via Exim-users wrote:
> Thanks for your reply.
> I don't know if that you have on mind but i got something like this;
>
> Tcpdump with exim 4.94 and csf:
>
> https://pastebin.com/kdVZuF16

You've removed all the useful information from the capture, by
only giving the text interpretation rather than the binary.
If you are concerned about info leaks, then we can't help
diagnose your firewall's bugs.
--
Cheers,
Jeremy

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/