On 02/04/2019 10:48, Andreas Thienemann wrote:
> Hi,
>
> I have a locally developed milter using the python-milter bindings
> which seems to trigger a Postfix bug.
>
> The milter in question uses the smfi_setmlreply() command to set a
> multiline response as defined in rfc5321.
>
> Multiline replies should result in the smtpd replying with something
> like the following to e.g. a rejected DATA command:
>
> 450-4.7.1 Line 1
> 450-4.7.1 Line 2
> 450 4.7.1 Line 3
>
> Postfix however seems to fold the reply into a single line:
>
> 450-4.7.1 Line 1  450-4.7.1 Line 2  450 4.7.1 Line 3

The output you sent shows what the smtpd server replies to the client
and shows a different behaviour between sendmail and postfix when the
milter uses  smfi_setmlreply(). It does not show that postfix is
receiving multiple reply lines from the milter and folding them, though
of course you may be right about it.

If you want to investigate this further you could turn on verbose
logging on the smtpd and cleanup processes and you will see a bit more
info about what is happening. If I'm reading this correctly the end of
message milter is being evaluated in the cleanup process
in cleanup_milter_apply for event SMFIC_BODYEOB. The cleanup process
then sends the reject reason to the smtpd process.

John

Reply via email to