On 12 Aug 2018, at 16:50, Thomas Kristensen wrote:

Hey

I got this strange problem with postfix 3.1.0.
I got this one server that doesn't get all the mails, queued for it. Some mails gets the error in subject.
And if I do a tcpdump on the tcp stream I see this everytime:

(the content has been wiped for some information)
<start>

[...]


----boundary_274246_f400b577-4e93-4ffd-b5ec-355c7a0b5059
Content-Type: application
.
</end>

As you can see the stream stops before the last mimepart is done.

Which *should not* make any difference, since the terminating <CRLF>.CRLF> is present. Unfortunately, the bogus Content-Type and unterminated MIME part may be the cause.

This is captured with tcpdump on the server with postfix 3.1.0
We use SMTP protocol to transport small files, so the body of the mail is not importen but the attachment is the actual message we want to transport.

This is only a problem with about 5-10% of the delivers to this one host. We got about 40-50000 messages in and out, to many servers, everyday and only see this problem with one host we try to deliver to.

So, the receiving host is broken. It is not answering the submitted data for over 10 minutes (unless you've shortened the smtp_data_done_timeout value? Don't do that...) so presumably it is doing some sort of content filtering or delivery procedure which is hanging. A badly-designed content filter or heavyweight delivery agent (e.g. Exchange) could make the mistake of demanding that MIME parts have parseable headers and/or non-null bodies and/or closing boundaries before they accept them as complete and process them, ignoring the fact that a misconstructed message like this one might be sent and terminated correctly at the SMTP level with the last part being a useless stub as shown.


If I do a postqueue -I on the queueid It still fails, but if I make the sender resend it, so it is a whole new message in postfix, it goes fine without problems. So the question is, why does some of the mails fail on the server, with no option to requeue them?

You would probably need to provide postconf -n output and logging of all activity regarding a particular message to get a useful answer to that.

Reply via email to