Hi Wietse,
On Wed, 3 Apr 2019, Wietse Venema wrote:
Try this:
*** ./src/smtpd/smtpd.c- 2019-03-30 08:05:29.000000000 -0400
--- ./src/smtpd/smtpd.c 2019-04-03 08:26:07.000000000 -0400
***************
*** 3598,3604 ****
if (state->err == 0) {
why = vstring_alloc(10);
state->err = mail_stream_finish(state->dest, why);
! printable(STR(why), ' ');
} else
mail_stream_cleanup(state->dest);
state->dest = 0;
--- 3598,3604 ----
if (state->err == 0) {
why = vstring_alloc(10);
state->err = mail_stream_finish(state->dest, why);
! // printable(STR(why), ' ');
} else
mail_stream_cleanup(state->dest);
state->dest = 0;
Looks good to me. Patched, rebuilt, verified working.
Multiline responses from the milter are now correctly forwarded the smtpd
and the client does not timeout anymore waiting for data.
I do not know if skipping the printable() call does have any side-effects
though.
Swaks output with the patch applied:
$ swaks --server localhost --from '<>' --to t...@bawue.de -d '.'
=== Trying localhost:25...
=== Connected to localhost.
<- 220 mailin01.mx.bawue.net ESMTP Postfix
-> EHLO mailin01.mx.bawue.net
<- 250-mailin01.mx.bawue.net
<- 250-PIPELINING
<- 250-SIZE 41943040
<- 250-VRFY
<- 250-ETRN
<- 250-STARTTLS
<- 250-XCLIENT NAME ADDR PROTO HELO REVERSE_NAME PORT LOGIN DESTADDR DESTPORT
<- 250-ENHANCEDSTATUSCODES
<- 250-8BITMIME
<- 250 DSN
-> MAIL FROM:<>
<- 250 2.1.0 Ok
-> RCPT TO:<t...@bawue.de>
<- 250 2.1.5 Ok
-> DATA
<- 354 End data with <CR><LF>.<CR><LF>
->
-> .
<** 450-4.7.1 Test Milter rejection Reason
<** 450-4.7.1 Test Milter rejection Reason 01
<** 450 4.7.1 Test Milter rejection Reason 02
-> QUIT
<- 221 2.0.0 Bye
=== Connection closed with remote host.
cheers,
Andreas