Wietse Venema:
> Ralf Hildebrandt:
> > In my log I found this:
> > 
> > Jul 21 07:23:09 mail-cvk postfix/smtp[7329]: 3xDK0Z6RBRz1Z1wy: enabling PIX 
> > workarounds: disable_esmtp delay_dotcrlf for 
> > mail.unimed.de[62.154.176.144]:25
> > 
> 
> The "220 greeting" handler logs this when the server looks like
> PIX, and was correct when PIX workarounds were always in effect.
> [smtp_pix_workaround_threshold_time support] was added later, deep
> down in the guts of the pipelined code, and the 220 greeting handler
> was not updated.

This patch changes only the logging, by moving some code before the
logging call.

As before, the smtp_pix_workaround_threshold_time setting affects
only the 'delay_dotcrlf' workaround, and has no effect on the
'disable_esmtp' workaround.

Also part of postfix-3.3-20170722.

        Wietse

diff -ur /var/tmp/postfix-3.3-20170716/src/smtp/smtp_proto.c 
src/smtp/smtp_proto.c
--- /var/tmp/postfix-3.3-20170716/src/smtp/smtp_proto.c 2017-01-09 
18:10:07.000000000 -0500
+++ src/smtp/smtp_proto.c       2017-07-22 17:28:36.000000000 -0400
@@ -403,6 +403,10 @@
                pix_bug_mask = name_mask_opt(pix_bug_source, pix_bug_table,
                                             pix_bug_words,
                                     NAME_MASK_ANY_CASE | NAME_MASK_IGNORE);
+               if ((pix_bug_mask & SMTP_FEATURE_PIX_DELAY_DOTCRLF)
+                   && request->msg_stats.incoming_arrival.tv_sec
+                   > vstream_ftime(state->session->stream) - 
var_smtp_pix_thresh)
+                   pix_bug_mask &= ~SMTP_FEATURE_PIX_DELAY_DOTCRLF;
                msg_info("%s: enabling PIX workarounds: %s for %s",
                         request->queue_id,
                         str_name_mask("pix workaround bitmask",
@@ -2147,9 +2151,7 @@
                    }
                } else if (prev_type == REC_TYPE_CONT)  /* missing newline */
                    smtp_fputs("", 0, session->stream);
-               if ((session->features & SMTP_FEATURE_PIX_DELAY_DOTCRLF) != 0
-                   && request->msg_stats.incoming_arrival.tv_sec
-                 <= vstream_ftime(session->stream) - var_smtp_pix_thresh) {
+               if (session->features & SMTP_FEATURE_PIX_DELAY_DOTCRLF) {
                    smtp_flush(session->stream);/* hurts performance */
                    sleep(var_smtp_pix_delay);  /* not to mention this */
                }

Reply via email to