]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.3-20050422
authorWietse Venema <wietse@porcupine.org>
Fri, 22 Apr 2005 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:31:06 +0000 (06:31 +0000)
postfix/HISTORY
postfix/src/global/mail_version.h
postfix/src/lmtp/lmtp_sasl_glue.c
postfix/src/postsuper/postsuper.c
postfix/src/smtp/smtp_connect.c

index 495e6ff48b405954b8b4001c8646ab092263595e..53dffb50605359708295754048348f4b29cf96d0 100644 (file)
@@ -10601,10 +10601,10 @@ Apologies for any names omitted.
        the MIME processor. Files: global/mime_state.c,
        cleanup/cleanup_message.c, smtp/smtp_proto.c.
 
-       Cleanup: updated error messages about MIME processing
-       errors in the SMTP client. These errors are no longer
-       specific to 8bit->7bit conversion; they can also happen
-       with generic address mapping. File: smtp/smtp_proto.c.
+       Cleanup: updated error messages about MIME processing errors
+       in the SMTP client. These errors are no longer specific to
+       8bit->7bit conversion; they can also happen with generic
+       address mapping. File: smtp/smtp_proto.c.
 
        Safety: SASL 2.1.19 has a version lookup routine that we
        can use to detect compile time / run time version mis-matches
@@ -10653,7 +10653,7 @@ Apologies for any names omitted.
        eliminated a portability problem that was introduced when
        "REJECT text" support was added. File: cleanup/cleanup.c.
        
-20040513
+20050413
 
        Portability: don't mix socket message send/receive calls
        with socket stream read/write calls. The fact that you can
@@ -10673,6 +10673,21 @@ Apologies for any names omitted.
        Safety: don't call syslog from a user-triggered signal
        handler.  File: postdrop/postdrop.c.
 
+20050421
+
+       Bugfix: don't panic when the fall-back relay can't be used
+       because the local MTA is MX for the destination.  File:
+       smtp/smtp_connect.c.
+
+20050422
+
+       Bugfix: don't panic when the fall-back relay can't be used
+       because it was already tried via a cached session. Produce
+       a default excuse instead. File: smtp/smtp_connect.c.
+       
+       Bugfix: postsuper could lose an error message after reporting
+       a fatal error.  File: postsuper/postsuper.c.
 Open problems:
 
        Med: disable header address rewriting after XCLIENT?
index 46cebddeb4ee87c2171426b9567a008f3885560b..0914990eac247cf5c82135d5049405b84c9753a7 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change the patchlevel and the release date. Snapshots change the
   * release date only.
   */
-#define MAIL_RELEASE_DATE      "20050418"
+#define MAIL_RELEASE_DATE      "20050422"
 #define MAIL_VERSION_NUMBER    "2.3"
 
 #define VAR_MAIL_VERSION       "mail_version"
index ed5d8692d5cf5239d4580b889db05a391eef04d9..3181355a30ecef8ec4b2ab27202943085819b367 100644 (file)
@@ -402,7 +402,7 @@ void    lmtp_sasl_start(LMTP_STATE *state, const char *sasl_opts_name,
      */
     memset(&sec_props, 0L, sizeof(sec_props));
     sec_props.min_ssf = 0;
-    sec_props.max_ssf = 1;                     /* don't allow real SASL
+    sec_props.max_ssf = 0;                     /* don't allow real SASL
                                                 * security layer */
     sec_props.security_flags = name_mask(sasl_opts_name, lmtp_sasl_sec_mask,
                                         sasl_opts_val);
index 633e0a42ad6dff726787fcf4eac973a5245b3ff6..32b818d3bf70470730448c1e73ad97d1be26cab7 100644 (file)
@@ -943,19 +943,31 @@ static void super(const char **queues, int action)
     argv_free(hash_queue_names);
 }
 
-/* fatal_exit - print warning if queue fix is incomplete */
+/* interrupted - signal handler */
 
-static void fatal_exit(void)
+static void interrupted(int sig)
 {
-    if (inode_mismatch > 0 || inode_fixed > 0 || position_mismatch > 0)
-       msg_fatal("OPERATION INCOMPLETE -- RERUN COMMAND TO FIX THE QUEUE FIRST");
+
+    /*
+     * This commands requires root privileges. We therefore do not worry
+     * about hostile signals, and report problems via msg_warn().
+     */
+    if (signal(SIGHUP, SIG_IGN) != SIG_IGN) {
+       (void) signal(SIGINT, SIG_IGN);
+       (void) signal(SIGQUIT, SIG_IGN);
+       (void) signal(SIGTERM, SIG_IGN);
+       if (inode_mismatch > 0 || inode_fixed > 0 || position_mismatch > 0)
+           msg_warn("OPERATION INCOMPLETE -- RERUN COMMAND TO FIX THE QUEUE FIRST");
+       if (sig)
+           _exit(sig);
+    }
 }
 
-/* interrupted - signal handler */
+/* fatal_warning - print warning if queue fix is incomplete */
 
-static void interrupted(int unused_sig)
+static void fatal_warning(void)
 {
-    fatal_exit();
+    interrupted(0);
 }
 
 int     main(int argc, char **argv)
@@ -1136,7 +1148,7 @@ int     main(int argc, char **argv)
     signal(SIGINT, interrupted);
     signal(SIGQUIT, interrupted);
     signal(SIGTERM, interrupted);
-    msg_cleanup(fatal_exit);
+    msg_cleanup(fatal_warning);
 
     /*
      * Sanity checks.
index db25f3fc85fbf286c175234154addb474c660e38..74b8d51a8ce0f17844cbd2784e1658f6e2247050 100644 (file)
@@ -568,8 +568,6 @@ int     smtp_connect(SMTP_STATE *state)
            (*(cpp) && (cpp) >= (sites)->argv + (non_fallback_sites))
 
     for (cpp = sites->argv; SMTP_RCPT_LEFT(state) > 0 && (dest = *cpp) != 0; cpp++) {
-       if (i_am_mx && IS_FALLBACK_RELAY(cpp, sites, non_fallback_sites))
-           break;
        state->final_server = (cpp[1] == 0);
 
        /*
@@ -685,7 +683,8 @@ int     smtp_connect(SMTP_STATE *state)
            if ((state->session = session) != 0) {
                if (++sess_count == var_smtp_mxsess_limit)
                    next = 0;
-               state->final_server = (cpp[1] == 0 && next == 0);
+               state->final_server = (next == 0 && (cpp[1] == 0 || (i_am_mx
+               && IS_FALLBACK_RELAY(cpp + 1, sites, non_fallback_sites))));
                if (addr->pref == domain_best_pref)
                    session->features |= SMTP_FEATURE_BEST_MX;
                if ((session->features & SMTP_FEATURE_FROM_CACHE) != 0
@@ -706,8 +705,17 @@ int     smtp_connect(SMTP_STATE *state)
      * 
      * Pay attention to what could be configuration problems, and pretend that
      * these are recoverable rather than bouncing the mail.
+     * 
+     * In case of a "no error" indication we make up an excuse; this can happen
+     * when the fall-back relay was already tried via a cached connection, so
+     * that the address list scrubber left behind an empty list.
      */
     if (SMTP_RCPT_LEFT(state) > 0) {
+       if (smtp_errno == SMTP_ERR_NONE) {
+           dsn_vstring_update(why, "4.3.0",
+                           "server unavailable or unable to receive mail");
+           smtp_errno = SMTP_ERR_RETRY;
+       }
        switch (smtp_errno) {
 
        default: