]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-1.1.10-20020514
authorWietse Venema <wietse@porcupine.org>
Tue, 14 May 2002 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:27:57 +0000 (06:27 +0000)
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/src/global/mail_version.h
postfix/src/global/tok822_parse.c
postfix/src/qmqpd/qmqpd.c
postfix/src/smtpd/smtpd_check.c

index 6d68a08e63f7ad386940435c889b511b1025b5bd..61f6744c4cc01fd1df1d4cac76f0eb98fc4dc9df 100644 (file)
@@ -6435,6 +6435,18 @@ Apologies for any names omitted.
        more correct, but it opens a mail relay loophole with "user
        @domain"@domain when relaying mail to a Sendmail system.
 
+20020514
+
+       Bugfix: the new code for header address quoting sometimes
+       did not null terminate strings so that arbitrary garbage
+       could appear at the end of message headers.  Reported by
+       Ralf Hildebrandt.  File:  global/tok822_parse.c.
+
+       Safety: user@domain@domain is no longer accepted by the
+       permit_mx_backup uce restriction (unless Postfix is configured
+       with "resolve_dequoted_address = no"). Victor Duchovny,
+       Morgan Stanley. File: smtpd/smtpd_check.c.
+
 Open problems:
 
        Low: all table lookups should consistently use internalized
index b962ce2ae2f0193c591b8ffef398a74e9e46d069..edcdcd2b1a728aa1e070f3c76ad91551f0c0e620 100644 (file)
@@ -12,6 +12,15 @@ snapshot release).  Patches change the patchlevel and the release
 date. Snapshots change only the release date, unless they include
 the same bugfixes as a patch release.
 
+Incompatible changes with Postfix snapshot 1.1.10-20020514
+==========================================================
+
+For safety reasons, the permit_mx_backup restriction no longer
+accepts mail for user@domain@domain. To recover the old behavior,
+specify "resolve_dequoted_address = no" which opens up a completely
+different can of worms as described a few paragraphs down in this
+document.
+
 Major changes with Postfix snapshot 1.1.9-20020513
 ==================================================
 
index 0f5af1c0be8a81cd673acbad165e609779521072..f948387a9e7d6243cd4cb8598b67a86f182b36e8 100644 (file)
   * Patches change the patchlevel and the release date. Snapshots change the
   * release date only, unless they include the same bugfix as a patch release.
   */
-#define MAIL_RELEASE_DATE      "20020513"
+#define MAIL_RELEASE_DATE      "20020514"
 
 #define VAR_MAIL_VERSION       "mail_version"
-#define DEF_MAIL_VERSION       "1.1.9-" MAIL_RELEASE_DATE
+#define DEF_MAIL_VERSION       "1.1.10-" MAIL_RELEASE_DATE
 extern char *var_mail_version;
 
  /*
index 194b973a0e6ef9a3d0d2b35050143c6681fc29de..3555031b2ba49e9991be5d2237fd4b71e7a584bb 100644 (file)
@@ -247,7 +247,7 @@ VSTRING *tok822_externalize(VSTRING *vp, TOK822 *tree, int flags)
             */
        case TOK822_ADDR:
            tmp = vstring_alloc(100);
-           tok822_internalize(tmp, tp->head, TOK822_STR_NONE);
+           tok822_internalize(tmp, tp->head, TOK822_STR_TERM);
            quote_822_local_flags(vp, vstring_str(tmp),
                                  QUOTE_FLAG_8BITCLEAN | QUOTE_FLAG_APPEND);
            vstring_free(tmp);
index 263ac17dac1c9cf190ef262a1840634827e1058e..162610bfc78ed9ea3e6b7d72fc2a30c946ea89a7 100644 (file)
@@ -351,7 +351,7 @@ static void qmqpd_write_content(QMQPD_STATE *state)
                    "\tid %s; %s", state->queue_id, mail_date(state->time));
     }
 #ifdef RECEIVED_ENVELOPE_FROM
-    quote_822_local(state->buf, state->sender, QUOTE_FLAG_8BITCLEAN);
+    quote_822_local(state->buf, state->sender);
     rec_fprintf(state->cleanup, REC_TYPE_NORM,
                "\t(envelope-from <%s>)", STR(state->buf));
 #endif
index d6f7bc331d1add9c13c76e44a74b0aa450319f89..cd0b46b1138e78942f060f78658acdce758b0b1b 100644 (file)
@@ -1281,18 +1281,22 @@ static int permit_mx_backup(SMTPD_STATE *state, const char *recipient)
     if ((domain = strrchr(CONST_STR(reply->recipient), '@')) == 0)
        return (SMTPD_CHECK_OK);
     domain += 1;
-    if (resolve_final(state, recipient, domain))
-       return (SMTPD_CHECK_OK);
-
-    if (msg_verbose)
-       msg_info("%s: not local: %s", myname, recipient);
 
     /*
-     * Skip source-routed mail (uncertain destination).
+     * Skip source-routed non-local or virtual mail (uncertain destination).
      */
     if (var_allow_untrust_route == 0 && (reply->flags & RESOLVE_FLAG_ROUTED))
        return (SMTPD_CHECK_DUNNO);
 
+    /*
+     * The destination is local, or it is a local virtual destination.
+     */
+    if (resolve_final(state, recipient, domain))
+       return (SMTPD_CHECK_OK);
+
+    if (msg_verbose)
+       msg_info("%s: not local: %s", myname, recipient);
+
     /*
      * Skip numerical forms that didn't match the local system.
      */