]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.3.6-RC3 v2.3.6-RC3
authorWietse Venema <wietse@porcupine.org>
Fri, 29 Dec 2006 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 10 Feb 2018 20:54:36 +0000 (15:54 -0500)
postfix/HISTORY
postfix/src/global/mail_version.h
postfix/src/smtpd/smtpd_check.c

index b596e7d6a2c10f8973bbd827f3f12618a54d462c..130858ec6ee8193cf706d257da82b6f59cf44136 100644 (file)
@@ -12899,3 +12899,9 @@ Apologies for any names omitted.
        insertion point.  Thus, inserting headers at positions (N,
        N+M) could work as if (N, N) had been specified. Problem
        reported by Mark Martinec.  File: milter/milter8.c.
+
+20061227
+
+       Bugfix: the MX hostname syntax check was accidentally skipped
+       with reject_unknown_helo_hostname/sender_domain/recipient_domain.
+       File: smtpd/smtpd_check.c.
index 3118e3ba507977b4cf168041ede3ee0bca8f6bf7..66203d0f32f0c2a2edcb9892bf738387a33480f9 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      "20061224"
-#define MAIL_VERSION_NUMBER    "2.3.6-RC2"
+#define MAIL_RELEASE_DATE      "20061229"
+#define MAIL_VERSION_NUMBER    "2.3.6-RC3"
 
 #ifdef SNAPSHOT
 # define MAIL_VERSION_DATE     "-" MAIL_RELEASE_DATE
index 80d41ac25181f950b03f15979ada786e983f2057..c0a227d68d2a89809d0714e4826754df6c3c44af 100644 (file)
@@ -1142,6 +1142,7 @@ static int reject_unknown_hostname(SMTPD_STATE *state, char *name,
 {
     const char *myname = "reject_unknown_hostname";
     int     dns_status;
+    DNS_RR *dummy;
 
     if (msg_verbose)
        msg_info("%s: %s", myname, name);
@@ -1152,15 +1153,20 @@ static int reject_unknown_hostname(SMTPD_STATE *state, char *name,
 #define RR_ADDR_TYPES  T_A
 #endif
 
-    dns_status = dns_lookup_l(name, 0, (DNS_RR **) 0, (VSTRING *) 0,
+    dns_status = dns_lookup_l(name, 0, &dummy, (VSTRING *) 0,
                              (VSTRING *) 0, DNS_REQ_FLAG_STOP_OK,
                              RR_ADDR_TYPES, T_MX, 0);
+    if (dummy)
+       dns_rr_free(dummy);
     if (dns_status != DNS_OK) {                        /* incl. DNS_INVAL */
        if (dns_status != DNS_RETRY)
            return (smtpd_check_reject(state, MAIL_ERROR_POLICY,
                                       var_unk_name_code, "4.7.1",
-                                      "<%s>: %s rejected: Host not found",
-                                      reply_name, reply_class));
+                                      "<%s>: %s rejected: %s",
+                                      reply_name, reply_class,
+                                      dns_status == DNS_INVAL ?
+                                      "Malformed DNS server reply" :
+                                      "Host not found"));
        else
            DEFER_IF_PERMIT2(state, MAIL_ERROR_POLICY,
                             450, "4.7.1",
@@ -1177,23 +1183,29 @@ static int reject_unknown_mailhost(SMTPD_STATE *state, const char *name,
 {
     const char *myname = "reject_unknown_mailhost";
     int     dns_status;
+    DNS_RR *dummy;
 
     if (msg_verbose)
        msg_info("%s: %s", myname, name);
 
 #define MAILHOST_LOOKUP_FLAGS  (DNS_REQ_FLAG_STOP_OK | DNS_REQ_FLAG_STOP_INVAL)
 
-    dns_status = dns_lookup_l(name, 0, (DNS_RR **) 0, (VSTRING *) 0,
+    dns_status = dns_lookup_l(name, 0, &dummy, (VSTRING *) 0,
                              (VSTRING *) 0, MAILHOST_LOOKUP_FLAGS,
                              T_MX, RR_ADDR_TYPES, 0);
+    if (dummy)
+       dns_rr_free(dummy);
     if (dns_status != DNS_OK) {                        /* incl. DNS_INVAL */
        if (dns_status != DNS_RETRY)
            return (smtpd_check_reject(state, MAIL_ERROR_POLICY,
                                       var_unk_addr_code,
                               strcmp(reply_class, SMTPD_NAME_SENDER) == 0 ?
                                       "4.1.8" : "4.1.2",
-                                      "<%s>: %s rejected: Domain not found",
-                                      reply_name, reply_class));
+                                      "<%s>: %s rejected: %s",
+                                      reply_name, reply_class,
+                                      dns_status == DNS_INVAL ?
+                                      "Malformed DNS server reply" :
+                                      "Domain not found"));
        else
            DEFER_IF_PERMIT2(state, MAIL_ERROR_POLICY,
                          450, strcmp(reply_class, SMTPD_NAME_SENDER) == 0 ?