]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.3.7-RC2 v2.3.7-RC2
authorWietse Venema <wietse@porcupine.org>
Sat, 13 Jan 2007 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 10 Feb 2018 20:57:14 +0000 (15:57 -0500)
postfix/HISTORY
postfix/conf/post-install
postfix/src/global/mail_version.h
postfix/src/global/mime_state.c
postfix/src/smtpd/smtpd_check.c
postfix/src/util/msg_output.c

index 7dc529bbc09de2d1bdedfcc790c1530ac72c75c5..f0d473879b6237eff91d076b7f9ff71563b999b5 100644 (file)
@@ -12918,3 +12918,17 @@ Apologies for any names omitted.
        types and to the proxymap protocol, which is too much change
        for a stable release.  Files: postalias/postalias.c,
        util/dict_db.c, util/dict_dbm.c, util/dict_cdb.c.
+
+20070112
+
+       Bugfix (introduced 20011008): after return from a nested
+       access restriction, possible longjump into exited stack
+       frame upon configuration error or table lookup error.  Victor
+       Duchovni.  Files: smtpd/smtpd_check.c.
+
+       Workaround: don't insert header/body blank line separator
+       in malformed attachments, to avoid breaking digital signatures.
+       Switch from header to body state, for robust MIME parsing.
+       People concerned about MIME evasion can use a MIME normalizer
+       to corrupt their user's legitimate email.  File:
+       global/mime_state.c.
index 54b3b93bcceb4820c062ed389744328d8f0cf24c..bdad4d4a4bf70d6120245b853e81bc38ef91c3e9 100644 (file)
@@ -685,8 +685,9 @@ test -n "$first_install_reminder" && {
     Warning: you still need to edit myorigin/mydestination/mynetworks
     parameter settings in $config_directory/main.cf.
 
-    See also http://www.postfix.org/faq.html for information about
-    dialup sites or about sites inside a firewalled network.
+    See also http://www.postfix.org/STANDARD_CONFIGURATION_README.html
+    for information about dialup sites or about sites inside a
+    firewalled network.
 
     BTW: Check your $ALIASES file and be sure to set up aliases
     that send mail for root and postmaster to a real person, then
index e5f098e2268d1f80302325bb00241231c9fca4b8..1815464788366ca7da4234ee8d254ebd4e16d09b 100644 (file)
@@ -20,8 +20,8 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20070104"
-#define MAIL_VERSION_NUMBER    "2.3.7-RC1"
+#define MAIL_RELEASE_DATE      "20070113"
+#define MAIL_VERSION_NUMBER    "2.3.7-RC2"
 
 #ifdef SNAPSHOT
 # define MAIL_VERSION_DATE     "-" MAIL_RELEASE_DATE
index 66b93fb7ad381cafa83551e3cd0eb091ceeb91e5..b81fc1f9072bd7a46ee0bedb96d84469c2ac271f 100644 (file)
 /* .IP state
 /*     MIME parser state created with mime_state_alloc().
 /* BUGS
+/*     NOTE: when the end of headers is reached, mime_state_update()
+/*     may execute up to three call-backs before returning to the
+/*     caller: head_out(), head_end(), and body_out() or body_end().
+/*     As long as call-backs return no result, it is up to the
+/*     call-back routines to check if a previous call-back experienced
+/*     an error.
+/*
 /*     Different mail user agents treat malformed message boundary
 /*     strings in different ways. The Postfix MIME processor cannot
 /*     be bug-compatible with everything.
@@ -959,10 +966,32 @@ int     mime_state_update(MIME_STATE *state, int rec_type,
            /*
             * Invalid input. Force output of one blank line and jump to the
             * body state, leaving all other state alone.
+            * 
+            * We don't break legitimate mail by inserting a blank line
+            * separator between primary headers and a non-empty body. Many
+            * MTA's don't even record the presence or absence of this
+            * separator, nor does the Milter protocol pass it on to Milter
+            * applications.
+            * 
+            * XXX We don't insert a blank line separator with attachments, as
+            * this breaks digital signatures. Postfix shall not do a worse
+            * mail delivery job than crappy MTAs that can't even parse MIME.
+            * But we switch to the body state anyway.
+            * 
+            * People who worry about MIME evasion can use a MIME normalizer,
+            * and knowlingly corrupt legitimate email for their users.
+            * Postfix has a different mission.
             */
            else {
+               if (msg_verbose)
+                   msg_info("garbage in %s header",
+                   state->curr_state == MIME_STATE_MULTIPART ? "multipart" :
+                      state->curr_state == MIME_STATE_PRIMARY ? "primary" :
+                        state->curr_state == MIME_STATE_NESTED ? "nested" :
+                            "other");
+               if (state->curr_state == MIME_STATE_PRIMARY)
+                   BODY_OUT(state, REC_TYPE_NORM, "", 0);
                SET_CURR_STATE(state, MIME_STATE_BODY);
-               BODY_OUT(state, REC_TYPE_NORM, "", 0);
            }
        }
 
index c0a227d68d2a89809d0714e4826754df6c3c44af..dde16082822291715287dcbf0cde5cd2a89e4b32 100644 (file)
@@ -2245,6 +2245,7 @@ static int check_table_result(SMTPD_STATE *state, const char *table,
                                reply_class, def_acl);
     }
     argv_free(restrictions);
+    memcpy(ADDROF(smtpd_check_buf), ADDROF(savebuf), sizeof(smtpd_check_buf));
     return (status);
 }
 
index ebef3c6cf6756fccd8e5a729ed34817c5355c2e3..0c34bb5db43ac19dc5fd2bafe98e9f6c52d87e97 100644 (file)
@@ -150,6 +150,9 @@ void    msg_vprintf(int level, const char *format, va_list ap)
 {
     if (msg_vprintf_lock == 0) {
        msg_vprintf_lock = 1;
+       /* On-the-fly initialization for debugging test programs only. */
+       if (msg_output_fn_count == 0)
+           msg_vstream_init("unknown", VSTREAM_ERR);
        /* OK if terminating signal handler hijacks control before next stmt. */
        vstring_vsprintf(msg_buffer, percentm(format, errno), ap);
        msg_text(level, vstring_str(msg_buffer));