]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.6.3 v2.6.3
authorWietse Venema <wietse@porcupine.org>
Sun, 2 Aug 2009 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 10 Feb 2018 19:34:24 +0000 (14:34 -0500)
postfix/HISTORY
postfix/conf/postmulti-script
postfix/html/postconf.5.html
postfix/man/man5/postconf.5
postfix/proto/postconf.proto
postfix/src/global/mail_task.c
postfix/src/global/mail_version.h
postfix/src/milter/milter8.c

index 6fa824c64530401fb2e6d53d7f20774d41d865d6..5ccc72003472c4c3879616566289542d25f2a06a 100644 (file)
@@ -15240,3 +15240,32 @@ Apologies for any names omitted.
        and broke reject_unauthenticated_sender_login_mismatch and
        reject_sender_login_mismatch.  Based on fix by Victor
        Duchovni. File: smtpd/smtpd_check.c.
+
+20090605
+
+       Bugfix: "postmulti -e destroy" used hard-coded /bin/env
+       command. Simplified the "destroy" procedure to destroy only
+       known safe names without "/". File: conf/postmulti-script.
+
+20090710
+
+       Bugfix (introduced Postfix 2.3): Postfix got out of sync
+       with a Milter application after the application sent a
+       "quarantine" request at end-of-message time. The milter
+       application would still be in the end-of-message state,
+       while Postfix would already be working on the next SMTP
+       event (typically, QUIT or MAIL FROM).  Problem diagnosed
+       with help from Alban Deniz. File: milter/milter8.c.
+
+20090712
+
+       Bugfix (garbage introduced Postfix 2.6): the ugly
+       ${multi_instance_name:postfix}${multi_instance_name
+       ?$multi_instance_name} garbage in Postfix logging is now
+       hopefully gone.  File: global/mail_task.c.
+
+20090715
+
+       Documentation: as of Postfix 2.6, the reject_unauth_pipelining
+       feature can be used meaningfully at any protocol stage.
+       File: proto/postconf.proto.
index 3f1333be39d811d7c364196d0ccd8f0f022cafab..417a8718ae0f634276c643c82f93b4f1333c8796 100644 (file)
@@ -228,6 +228,17 @@ deport)
     ;;
 
 destroy)
+
+    # "postmulti -e destroy" will remove an entire instance only when
+    # invoked immediately after "postmulti -e create" (i.e. before
+    # other files are added to the instance). We delete only known
+    # safe names without "/".
+    #
+    QUEUE_SUBDIRS="active bounce corrupt defer deferred flush hold \
+    incoming maildrop pid private public saved trace"
+    #DEBUG=echo
+    WARN="postlog -p warn -t $TAG"
+
     # Locate the target instance
     #
     [ -f "$config_directory/main.cf" ] ||
@@ -236,57 +247,36 @@ destroy)
     postfix -c "$config_directory" status >/dev/null 2>&1 &&
        fatal "Instance '$config_directory' is not stopped"
 
-    # XXX: Internal "postfix /some/cmd" interface via /bin/env for execvp().
-    #
-    for q in maildrop incoming active deferred hold
-    do
-       postfix -c "$config_directory" /bin/env \
-           find "$q" ! -name "$q" ! -name "?" -perm 0700 -print |
-           grep "^" >/dev/null &&
-           fatal "Instance '$config_directory' $q queue is not empty"
-    done
-
     # Update multi_instance directories
     # and also (just in case) drop from alternate_config_directories
     #
-    update_cfdirs del $config_directory || exit 1
+    $DEBUG update_cfdirs del "$config_directory" || exit 1
 
-    # Change default personalities:
-    MAIL_CONFIG="$config_directory"; export MAIL_CONFIG
-
-    # Full steam ahead, instance will be at least partly destroyed!
-
-    # Try to remove data_directory, but not sub-directories.
-    # Note: care with "$TAG" insertion into sh -c 'script'.
+    # XXX: Internal "postfix /some/cmd" interface.
     #
-    postfix /bin/sh -c \
-       'cd $data_directory; rm -f -- *; cd ..; rmdir $data_directory; \
-         PATH=$command_directory:$PATH; export PATH; \
-        test -d $data_directory && \
-            postlog -p warn -t "'"$TAG"'" \
-               "$data_directory partly removed" 2>&1' 2>/dev/null
-
-    # Remove Postfix-owned files in the queue directory.
-    # Remove all files in the "pid" sub-directory.
-    # Remove empty directories.
-    # Note: care with "$TAG" insertion into sh -c 'script'.
-    postfix /bin/sh -c \
-       'find . -user $mail_owner ! -type d -exec rm -f -- "{}" ";"; \
-        find . -depth -user $mail_owner -type d -exec rmdir -- "{}" ";"; \
-        rm -f -- pid/*; rmdir *; cd ..; rmdir $queue_directory; \
-         PATH=$command_directory:$PATH; export PATH; \
-        test -d $queue_directory && \
-            postlog -p warn -t "'"$TAG"'" \
-               "$queue_directory partly removed" 2>&1' 2>/dev/null
+    postfix -c "$config_directory" /bin/sh -c "
+    for q in $QUEUE_SUBDIRS
+    do
+       $DEBUG rmdir -- \$q || 
+           $WARN \`pwd\`/\$q: please verify contents and remove by hand
+    done
+    "
+
+    postfix -c "$config_directory" /bin/sh -c "
+    for dir in \$data_directory \$queue_directory
+    do
+       $DEBUG rmdir -- \$dir || 
+           $WARN \$dir: please verify contents and remove by hand
+    done
+    "
 
     # In the configuration directory remove just the main.cf and master.cf
     # files.
-    rm -f -- "$MAIL_CONFIG/master.cf" "$MAIL_CONFIG/main.cf" 2>/dev/null
-    rmdir -- "$MAIL_CONFIG" 2>/dev/null
-    test -d "$MAIL_CONFIG" && \
-        postlog -p warn -t "$TAG" \
-           "$MAIL_CONFIG partly removed" 2>&1
+    $DEBUG rm -f -- "$config_directory/master.cf" "$config_directory/main.cf" 2>/dev/null
+    $DEBUG rmdir -- "$config_directory" || 
+       $WARN $config_directory: please verify contents and remove by hand
     ;;
+
 enable)
     postconf -c "$config_directory" -e \
        "multi_instance_enable = yes" || exit 1;;
index 49287c76f0042f7bbe67e5f0d9b264786152e24f..c18d7c75c329295e04bb9cb599b9a3b87b32a342 100644 (file)
@@ -10657,11 +10657,15 @@ of time where it is not allowed, or when the client sends SMTP
 commands ahead of time without knowing that Postfix actually supports
 ESMTP command pipelining. This stops mail from bulk mail software
 that improperly uses ESMTP command pipelining in order to speed up
-deliveries. <br> Note: <a href="postconf.5.html#reject_unauth_pipelining">reject_unauth_pipelining</a> is not useful
-outside <a href="postconf.5.html#smtpd_data_restrictions">smtpd_data_restrictions</a> when 1) the client uses ESMTP (EHLO
-instead of HELO) and 2) with "<a href="postconf.5.html#smtpd_delay_reject">smtpd_delay_reject</a> = yes" (the
-default).  The use of <a href="postconf.5.html#reject_unauth_pipelining">reject_unauth_pipelining</a> in the other
-restriction contexts is therefore not recommended.  </dd>
+deliveries.
+<br> With Postfix 2.6 and later, the SMTP server sets a per-session
+flag whenever it detects illegal pipelining, including pipelined
+EHLO or HELO commands. The <a href="postconf.5.html#reject_unauth_pipelining">reject_unauth_pipelining</a> feature simply
+tests whether the flag was set at any point in time during the
+session.
+<br> With older Postfix versions, <a href="postconf.5.html#reject_unauth_pipelining">reject_unauth_pipelining</a> checks
+the current status of the input read queue, and its usage is not
+recommended in contexts other than <a href="postconf.5.html#smtpd_data_restrictions">smtpd_data_restrictions</a>.  </dd>
 
 <dt><b><a name="reject">reject</a></b></dt>
 
index 298ae59210f67504c9af35de42ccfa18d5391d33..fbe4fd308e26a70fb1c1f8eab6c329e92bf2dd46 100644 (file)
@@ -6519,11 +6519,15 @@ ESMTP command pipelining. This stops mail from bulk mail software
 that improperly uses ESMTP command pipelining in order to speed up
 deliveries.
 .br
-Note: reject_unauth_pipelining is not useful
-outside smtpd_data_restrictions when 1) the client uses ESMTP (EHLO
-instead of HELO) and 2) with "smtpd_delay_reject = yes" (the
-default).  The use of reject_unauth_pipelining in the other
-restriction contexts is therefore not recommended.
+With Postfix 2.6 and later, the SMTP server sets a per-session
+flag whenever it detects illegal pipelining, including pipelined
+EHLO or HELO commands. The reject_unauth_pipelining feature simply
+tests whether the flag was set at any point in time during the
+session.
+.br
+With older Postfix versions, reject_unauth_pipelining checks
+the current status of the input read queue, and its usage is not
+recommended in contexts other than smtpd_data_restrictions.
 .IP "\fBreject\fR"
 Reject the request. This restriction is useful at the end of
 a restriction list, to make the default policy explicit.  The
index e1139ec33fdcf3c76a4a6523df3b76fae50ee326..e5c12aaeb0acae175fdb633ec2cb8bab05a8b26b 100644 (file)
@@ -4939,11 +4939,15 @@ of time where it is not allowed, or when the client sends SMTP
 commands ahead of time without knowing that Postfix actually supports
 ESMTP command pipelining. This stops mail from bulk mail software
 that improperly uses ESMTP command pipelining in order to speed up
-deliveries. <br> Note: reject_unauth_pipelining is not useful
-outside smtpd_data_restrictions when 1) the client uses ESMTP (EHLO
-instead of HELO) and 2) with "smtpd_delay_reject = yes" (the
-default).  The use of reject_unauth_pipelining in the other
-restriction contexts is therefore not recommended.  </dd>
+deliveries.
+<br> With Postfix 2.6 and later, the SMTP server sets a per-session
+flag whenever it detects illegal pipelining, including pipelined
+EHLO or HELO commands. The reject_unauth_pipelining feature simply
+tests whether the flag was set at any point in time during the
+session.   
+<br> With older Postfix versions, reject_unauth_pipelining checks
+the current status of the input read queue, and its usage is not
+recommended in contexts other than smtpd_data_restrictions.  </dd>
 
 <dt><b><a name="reject">reject</a></b></dt>
 
index 9f2fbc05919d23408b5ff1c709fe1f8f195048fb..b1df611d40bc28acdef4e1338ab470231694e04d 100644 (file)
@@ -59,7 +59,8 @@ const char *mail_task(const char *argv0)
     /* Setenv()-ed from main.cf, or inherited from master. */
     if ((tag = safe_getenv(CONF_ENV_LOGTAG)) == 0)
        /* Check main.cf settings directly, in case set-gid. */
-       tag = var_syslog_name ? var_syslog_name : DEF_SYSLOG_NAME;
+       tag = var_syslog_name ? var_syslog_name :
+           mail_conf_eval(DEF_SYSLOG_NAME);
     vstring_sprintf(canon_name, "%s/%s", tag, argv0);
     return (vstring_str(canon_name));
 }
index c33c7b28fd9469702a6a9f87901d5ca2dcb92491..f80a7c53af1d8943a359f6b65c54a4ab07625829 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      "20090603"
-#define MAIL_VERSION_NUMBER    "2.6.2"
+#define MAIL_RELEASE_DATE      "20090802"
+#define MAIL_VERSION_NUMBER    "2.6.3"
 
 #ifdef SNAPSHOT
 # define MAIL_VERSION_DATE     "-" MAIL_RELEASE_DATE
index d49f656dd094b3423f2ad67733595f4c883bbcac..e839532f6a87a30473dd47421d5ad4d7d25af240 100644 (file)
@@ -1296,7 +1296,8 @@ static const char *milter8_event(MILTER8 *milter, int event,
            /*
             * Decision: quarantine. In Sendmail 8.13 this does not imply a
             * transition in the receiver state (reply, reject, tempfail,
-            * accept, discard).
+            * accept, discard). We should not transition, either, otherwise
+            * we get out of sync.
             */
        case SMFIR_QUARANTINE:
            /* XXX What to do with the "reason" text? */
@@ -1304,7 +1305,8 @@ static const char *milter8_event(MILTER8 *milter, int event,
                                  MILTER8_DATA_BUFFER, milter->buf,
                                  MILTER8_DATA_END) != 0)
                MILTER8_EVENT_BREAK(milter->def_reply);
-           MILTER8_EVENT_BREAK("H");
+           milter8_def_reply(milter, "H");
+           continue;
 
            /*
             * Decision: skip further events of this type.