Mailing List Archive

[Bug 3042] New: EXim closes connection direct after end of DATA (.)
https://bugs.exim.org/show_bug.cgi?id=3042

Bug ID: 3042
Summary: EXim closes connection direct after end of DATA (.)
Product: Exim
Version: 4.96+
Hardware: Sun
OS: Solaris
Status: NEW
Severity: bug
Priority: medium
Component: Delivery in general
Assignee: unallocated@exim.org
Reporter: lt@timmann.de
CC: exim-dev@lists.exim.org

Hi Maintainers,

I have six exim 4.96.1 installations with very different configs, but same
behaviour.
All on Solaris 11 x86.

I am opening the bug so late because it is not easy to say anything about this
problem except that the Exim disconnects after the end of DATA (.) for some(!)
mails. It is independent of the recipient of the mail. Some mails to the
recipient work, others don't, but the mail that doesn't work fails every time I
try to send it.
The problem occurs both with mails to be stored locally and with mails to be
forwarded.
There is nothing in the log file for the problematic mail except that there is
a connection from the remote host. Nothing else.
I have no coredumps, nothing from the paniclog. I am at a bit of a loss as to
how to open this bug.

At one site I have external and internal exim 4.96.1 instances, both on Solaris
11 x86 and I have found mails that are accepted by the external mail servers,
but failed to forward to the internal exim with this message:
2023-10-22 14:00:26.393 [26582] 1quX8E-0006uK-2q H=mail.domain.tld
[172.17.12.42]:25: Remote host closed connection in response to end of data

This is how a remote postfix sees the problem:
Remote Server returned '554 4.4.2 < #4.4.2 X-Postfix; lost connection with
othermail.domain.tld while sending end of data -- message may be sent more than
once>

There is no different behaviour when I build the lookups static instead of
dynamic.

Any suggestions on debugging are welcome!

Greetings,
Lars

--
You are receiving this mail because:
You are on the CC list for the bug.

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-dev.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-dev-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: [Bug 3042] New: EXim closes connection direct after end of DATA (.) [ In reply to ]
On Fri, Oct 27, 2023 at 08:20:37AM +0000, Exim Bugzilla via Exim-dev wrote:

> I am opening the bug so late because it is not easy to say anything
> about this problem except that the Exim disconnects after the end of
> DATA (.) for some(!) mails. It is independent of the recipient of the
> mail. Some mails to the recipient work, others don't, but the mail
> that doesn't work fails every time I try to send it. The problem
> occurs both with mails to be stored locally and with mails to be
> forwarded.

The most plausible scenario here is that this is a combination of
PIPELINING and a potential middle-box in front of Exim that closes the
connection on QUIT, but fails to take PIPELINING into account.

With PIPELINING, the SMTP client send ".<CRLF>QUIT<CRLF>" together in
one packet, and then waits for the "." response. If some firewall
shuts down the connection on encountering the incoming packet, the
client never gets the "." response.

I can't rule out an issue inside Exim, but it seems "unlikely", since
such an issue would have broadly visible impact, breakign mail delivery
for a large fraction of deployments.

If you configure this particular Exim to not advertise "PIPELINING",
that could help.

You could also temporarily as a sanity check, temporary replace it
with Postfix, and perhaps observe the same behaviour, which would
additional evidence of a middlebox as the culprit.

--
Viktor.

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-dev.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-dev-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: [Bug 3042] New: EXim closes connection direct after end of DATA (.) [ In reply to ]
On 2023-10-27, Viktor Dukhovni via Exim-dev <exim-dev@lists.exim.org> wrote:
> On Fri, Oct 27, 2023 at 08:20:37AM +0000, Exim Bugzilla via Exim-dev wrote:
>
> You could also temporarily as a sanity check, temporary replace it
> with Postfix, and perhaps observe the same behaviour, which would
> additional evidence of a middlebox as the culprit.

If it's a middlebox. packet captures taken at each end will also show the
discrepancy.

--
Jasen.
???????? ????? ???????

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-dev.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-dev-unsubscribe@lists.exim.org
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/