]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-20010120
authorWietse Venema <wietse@porcupine.org>
Sat, 20 Jan 2001 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 15:51:26 +0000 (15:51 +0000)
postfix/HISTORY
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h
postfix/src/smtp/smtp.h
postfix/src/smtp/smtp_addr.c
postfix/src/smtp/smtp_addr.h
postfix/src/smtp/smtp_connect.c

index e735244566710f3bd23eeaa10b205e56e8aedf9e..c0068c88d029f1f89cbbf418b219fe8b028d9f49 100644 (file)
@@ -4734,3 +4734,11 @@ Apologies for any names omitted.
        Feature: SASL support for the LMTP client. Recent CYRUS
        software requires this for Postfix over TCP sockets.
        This was just a cloning operation.
+
+20010120
+
+       Bugfix: the 20001005 revised fallback_relay support caused
+       Postfix to send mail to the fallback even when the local
+       machine was an MX host for the final destination. Result:
+       mailer loop. Found by Laurent Wacrenier (teaser.fr).  Files:
+       smtp/smtp_connect.c, smtp/smtp_addr.c.
index 559e89ac452ec2dcfc73bbba92274c67c70d4e78..93a5bf9cdbe5075de430fa6bd6feec60fb7a54dd 100644 (file)
@@ -888,7 +888,7 @@ extern int var_fork_delay;
   * When locking a mailbox, how often to try and how long to wait.
   */
 #define VAR_FLOCK_TRIES          "deliver_lock_attempts"
-#define DEF_FLOCK_TRIES          5
+#define DEF_FLOCK_TRIES          10
 extern int var_flock_tries;
 
 #define VAR_FLOCK_DELAY          "deliver_lock_delay"
index d70bbe20cb5b0f6a395ee92b7ff99cc4201448c4..f9a7fcd35ef9a0819a09699d28ded8d6615355d0 100644 (file)
@@ -15,7 +15,7 @@
   * Version of this program.
   */
 #define VAR_MAIL_VERSION       "mail_version"
-#define DEF_MAIL_VERSION       "Release-20010119"
+#define DEF_MAIL_VERSION       "Release-20010120"
 extern char *var_mail_version;
 
 /* LICENSE
index 6643944e7b695617ebf25d94b1926afb02027ef0..8c6dd5b063604ad2073b70149cc2f7a7b8705e05 100644 (file)
@@ -85,7 +85,7 @@ extern void smtp_session_free(SMTP_SESSION *);
   */
 extern SMTP_SESSION *smtp_connect(char *, VSTRING *);
 extern SMTP_SESSION *smtp_connect_host(char *, unsigned, VSTRING *);
-extern SMTP_SESSION *smtp_connect_domain(char *, unsigned, VSTRING *);
+extern SMTP_SESSION *smtp_connect_domain(char *, unsigned, VSTRING *, int *);
 
  /*
   * smtp_proto.c
index 75272dde7d9459f9f0133c4a94b078ec9de91470..7c06a8e5a49b9021def69988917d6afeb9a5be5f 100644 (file)
@@ -6,9 +6,10 @@
 /* SYNOPSIS
 /*     #include "smtp_addr.h"
 /*
-/*     DNS_RR *smtp_domain_addr(name, why)
+/*     DNS_RR *smtp_domain_addr(name, why, found_myself)
 /*     char    *name;
 /*     VSTRING *why;
+/*     int     *found_myself;
 /*
 /*     DNS_RR *smtp_host_addr(name, why)
 /*     char    *name;
@@ -279,11 +280,11 @@ static int smtp_compare_mx(DNS_RR *a, DNS_RR *b)
 
 /* smtp_domain_addr - mail exchanger address lookup */
 
-DNS_RR *smtp_domain_addr(char *name, VSTRING *why)
+DNS_RR *smtp_domain_addr(char *name, VSTRING *why, int *found_myself)
 {
     DNS_RR *mx_names;
     DNS_RR *addr_list = 0;
-    DNS_RR *self;
+    DNS_RR *self = 0;
     unsigned best_pref;
     unsigned best_found;
 
@@ -363,6 +364,7 @@ DNS_RR *smtp_domain_addr(char *name, VSTRING *why)
     /*
      * Clean up.
      */
+    *found_myself = (self != 0);
     return (addr_list);
 }
 
index d0dabba49bd390f769a22de1b2e7d7c689525c75..1e7621c9fcc53cc512a89fffaffba8b67883a2a6 100644 (file)
@@ -17,7 +17,7 @@
   * Internal interfaces.
   */
 extern DNS_RR *smtp_host_addr(char *, VSTRING *);
-extern DNS_RR *smtp_domain_addr(char *, VSTRING *);
+extern DNS_RR *smtp_domain_addr(char *, VSTRING *, int *);
 
 /* LICENSE
 /* .ad
index d8017f230cbb5b72274f231e38343ecacdc1e4a9..6b9c58f6ecb08b1385733fbeb60603816c152347 100644 (file)
@@ -292,7 +292,8 @@ SMTP_SESSION *smtp_connect_host(char *host, unsigned port, VSTRING *why)
 
 /* smtp_connect_domain - connect to smtp server for domain */
 
-SMTP_SESSION *smtp_connect_domain(char *name, unsigned port, VSTRING *why)
+SMTP_SESSION *smtp_connect_domain(char *name, unsigned port, VSTRING *why,
+                                         int *found_myself)
 {
     SMTP_SESSION *session = 0;
     DNS_RR *addr_list;
@@ -306,7 +307,7 @@ SMTP_SESSION *smtp_connect_domain(char *name, unsigned port, VSTRING *why)
      * the primary MX host is reachable but does not want to receive our
      * mail, there is no point in trying the backup hosts.
      */
-    addr_list = smtp_domain_addr(name, why);
+    addr_list = smtp_domain_addr(name, why, found_myself);
     for (addr = addr_list; addr; addr = addr->next) {
        if ((session = smtp_connect_addr(addr, port, why)) != 0) {
            session->best = (addr->pref == addr_list->pref);
@@ -393,6 +394,7 @@ SMTP_SESSION *smtp_connect(char *destination, VSTRING *why)
     char   *save;
     char   *dest;
     char   *cp;
+    int     found_myself;
 
     /*
      * First try to deliver to the indicated destination, then try to deliver
@@ -417,7 +419,7 @@ SMTP_SESSION *smtp_connect(char *destination, VSTRING *why)
        if (var_disable_dns || *dest == '[') {
            session = smtp_connect_host(host, port, why);
        } else {
-           session = smtp_connect_domain(host, port, why);
+           session = smtp_connect_domain(host, port, why, &found_myself);
        }
        myfree(dest_buf);
 
@@ -426,7 +428,7 @@ SMTP_SESSION *smtp_connect(char *destination, VSTRING *why)
         * is the best MX relay for the destination. Agreed, an errno of OK
         * after failure is a weird way to reporting progress.
         */
-       if (session != 0 || smtp_errno == SMTP_OK)
+       if (session != 0 || smtp_errno == SMTP_OK || found_myself)
            break;
     }