Griff:
> I have Postfix currently running as an outbound relay for a  Microsoft
> Exchange system.  It's working beautifully, but we are having issues
> with bounce messages:
> 
> It appears bounce messages are trucated to <80 chars (more like 75
> according to the tcpdump).
> 
> This means the error code and message are not handled correctly by
> Exchange.  See below screenshot:
> https://pbs.twimg.com/media/DBuyDLkXkAEWZ9d.jpg:large

After a bit of study, I determined that there is no legitimate need
to convert message/delivery-status to qouted-printable or base64.
The content of message/delivery-status should always be 7bit.

        Wietse

diff -ur /var/tmp/postfix-3.3-20170506/src/bounce/bounce_notify_util.c 
src/bounce/bounce_notify_util.c
--- /var/tmp/postfix-3.3-20170506/src/bounce/bounce_notify_util.c       
2015-01-26 15:00:13.000000000 -0500
+++ src/bounce/bounce_notify_util.c     2017-06-10 14:47:25.000000000 -0400
@@ -637,7 +637,9 @@
                      (bounce_info->smtputf8 & SMTPUTF8_FLAG_REQUESTED) ?
                      "global-" : "");
     /* Fix 20140709: addresses may be 8bit. */
-    if (NOT_7BIT_MIME(bounce_info))
+    if (NOT_7BIT_MIME(bounce_info)
+    /* BC Fix 20170610: prevent MIME downgrade of message/delivery-status. */
+       && (bounce_info->smtputf8 & SMTPUTF8_FLAG_REQUESTED))
        post_mail_fprintf(bounce, "Content-Transfer-Encoding: %s",
                          bounce_info->mime_encoding);
 

Reply via email to