]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.5.10 v2.5.10
authorWietse Venema <wietse@porcupine.org>
Mon, 22 Mar 2010 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 10 Feb 2018 19:57:40 +0000 (14:57 -0500)
postfix/HISTORY
postfix/makedefs
postfix/src/global/cleanup_user.h
postfix/src/global/db_common.c
postfix/src/global/mail_version.h
postfix/src/milter/milter8.c
postfix/src/pickup/pickup.c
postfix/src/smtpd/smtpd.c
postfix/src/trivial-rewrite/resolve.c
postfix/src/util/sys_defs.h
postfix/src/util/valid_hostname.c

index a13fbddeb187a3861b8c800921acacd2eb0bcf20..aed5d77aa5efabe3132fabfbf581b02080eeb819 100644 (file)
@@ -14529,3 +14529,45 @@ Apologies for any names omitted.
 
        Bugfix: don't panic when an unexpected smtpd access map is
        specified. File: smtpd/smtpd_check.c.
+
+20090918
+
+       Bugfix (introduced Postfix 2.3): with Milter RCPT TO replies
+       turned off, there was no automatic flush-before-read on the
+       smtpd-to-milter stream, because the read was done on the
+       cleanup-to-milter stream. Problem reported by Stephen Warren.
+       File: milter/milter8.c.
+
+20091005
+
+       Bugfix: core dump while printing error message for malformed
+       %<letter> sequence in LDAP, MySQL or PostgreSQL configuration.
+       File: global/db_common.c. Fix by Victor Duchovni.
+
+20091209
+
+       Bugfix: sender_dependent_relayhost_maps did not reject an
+       empty lookup result, and did not recognize lookup errors,
+       thus treating errors as "not found". Problem found during
+       code maintenance. File: trivial-rewrite/resolve.c.
+
+20100107
+
+       Bugfix: the pickup daemon did not discard messages that
+       were requeued after all recipients were delivered (or
+       bounced), and the cleanup server tried to bounce such
+       messages. Files: pickup/pickup.c, global/cleanup_user.h.
+
+20100115
+
+       Bugfix: the valid_hostname() fuction did not set the
+       "non-numeric" flag after encountering the '-' character.
+       Reported by Jan Schampera.  File: util/valid_hostname.c.
+
+20100116
+
+       Workaround: as of Postfix 2.3 the VRFY command did not allow
+       a mailbox address inside <>, which broke expectations.  RFC
+       2821 (and 5321) is vague about the VRFY request format, but
+       spends lots of text on the reply format.  File: smtpd/smtpd.c.
+
index 0585fa055671e5f805a024f1887831475c44c340..af60d58d0efd5c01ae5f0035b7ba4d7052b3b4f7 100644 (file)
@@ -132,6 +132,8 @@ case "$SYSTEM.$RELEASE" in
                ;;
   FreeBSD.7*)  SYSTYPE=FREEBSD7
                ;;
+  FreeBSD.8*)  SYSTYPE=FREEBSD8
+               ;;
   OpenBSD.2*)  SYSTYPE=OPENBSD2
                ;;
   OpenBSD.3*)  SYSTYPE=OPENBSD3
index e44f105ab5508cbfc25d7508de3098c7eb7eacc5..0a098d3da65abd3b415d09995c6cb0f298dd7315 100644 (file)
@@ -65,7 +65,8 @@
   * These are set when we can't bounce even if we were asked to.
   */
 #define CLEANUP_STAT_MASK_CANT_BOUNCE \
-       (CLEANUP_STAT_BAD | CLEANUP_STAT_WRITE | CLEANUP_STAT_DEFER)
+       (CLEANUP_STAT_BAD | CLEANUP_STAT_WRITE | CLEANUP_STAT_DEFER \
+           | CLEANUP_STAT_RCPT)
 
  /*
   * These are set when we can't examine every record of a message.
index 92223b056f5aa410cdf9e88da9c6be40704cbc8b..887ceacd427501e63bb9bd1c86458372c764d7e2 100644 (file)
@@ -228,7 +228,7 @@ int     db_common_parse(DICT *dict, void **ctxPtr, const char *format, int query
                break;
            default:
                msg_fatal("db_common_parse: %s: Invalid %s template: %s",
-                         dict->name, query ? "query" : "result", format);
+                      ctx->dict->name, query ? "query" : "result", format);
            }
     return dynamic;
 }
index 3a73e7dc0d0d6638cd12f708196c1bf0805c5997..aa9bd93f37ee208ac73b2847c377f27acfa5b71e 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      "20090828"
-#define MAIL_VERSION_NUMBER    "2.5.9"
+#define MAIL_RELEASE_DATE      "20100322"
+#define MAIL_VERSION_NUMBER    "2.5.10"
 
 #ifdef SNAPSHOT
 # define MAIL_VERSION_DATE     "-" MAIL_RELEASE_DATE
index 72190df72d9e27082f6be5644245e9060e3c2d58..b139636027424e37816923dfa59379c98f9d384f 100644 (file)
@@ -2528,6 +2528,13 @@ static int milter8_send(MILTER *m, VSTREAM *stream)
     if (msg_verbose)
        msg_info("%s: milter %s", myname, milter->m.name);
 
+    /*
+     * The next read on this Milter socket happens in a different process. It
+     * will not automatically flush the output buffer in this process.
+     */
+    if (milter->fp)
+       vstream_fflush(milter->fp);
+
     if (attr_print(stream, ATTR_FLAG_MORE,
                   ATTR_TYPE_STR, MAIL_ATTR_MILT_NAME, milter->m.name,
                   ATTR_TYPE_INT, MAIL_ATTR_MILT_VERS, milter->version,
index bf25b63db976d4230afefa728688c292daabba7b..59f3c2386bb0387f2bea92954fce9d418a6e61ba 100644 (file)
@@ -191,10 +191,14 @@ static int cleanup_service_error_reason(PICKUP_INFO *info, int status,
     /*
      * XXX If the cleanup server gave a reason, then it was already logged.
      * Don't bother logging it another time.
+     * 
+     * XXX Discard a message without recipient. This can happen with "postsuper
+     * -r" when a message is already delivered (or bounced). The Postfix
+     * sendmail command rejects submissions without recipients.
      */
     if (reason == 0)
        msg_warn("%s: %s", info->path, cleanup_strerror(status));
-    return ((status & CLEANUP_STAT_BAD) ?
+    return ((status & (CLEANUP_STAT_BAD | CLEANUP_STAT_RCPT)) ?
            REMOVE_MESSAGE_FILE : KEEP_MESSAGE_FILE);
 }
 
index 7feab8a8a22cfd1d10ca632fed5c8f8af3b08c32..29457f13c746bb040f8dcbaecfb6c2d89c0fa5ba 100644 (file)
@@ -3051,9 +3051,9 @@ static int vrfy_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
        smtpd_chat_reply(state, "501 5.1.3 Bad recipient address syntax");
        return (-1);
     }
-    /* Not: state->addr_buf */
+    /* Use state->addr_buf, with the unquoted result from extract_addr() */
     if (SMTPD_STAND_ALONE(state) == 0
-       && (err = smtpd_check_rcpt(state, argv[1].strval)) != 0) {
+       && (err = smtpd_check_rcpt(state, STR(state->addr_buf))) != 0) {
        smtpd_chat_reply(state, "%s", err);
        return (-1);
     }
index 61f5bf7ea4d7af9a9122b56dea02cd371bd59788..aa3f4b132e0bbf1a92d52bd90c3e63b58f2d9885 100644 (file)
@@ -153,6 +153,7 @@ static void resolve_addr(RES_CONTEXT *rp, char *sender, char *addr,
     char   *oper;
     char   *junk;
     const char *relay;
+    const char *sender_key;
 
     *flags = 0;
     vstring_strcpy(channel, "CHANNEL NOT UPDATED");
@@ -508,11 +509,21 @@ static void resolve_addr(RES_CONTEXT *rp, char *sender, char *addr,
             * override the recipient domain.
             */
            if (rp->snd_relay_info
-               && (relay = mail_addr_find(rp->snd_relay_info, *sender ?
-                                          sender : var_null_relay_maps_key,
-                                          (char **) 0)) != 0)
+               && (relay = mail_addr_find(rp->snd_relay_info,
+                                          sender_key = (*sender ? sender :
+                                                  var_null_relay_maps_key),
+                                          (char **) 0)) != 0) {
+               if (*relay == 0) {
+                   msg_warn("%s: ignoring null lookup result for %s",
+                            rp->snd_relay_maps_name, sender_key);
+                   relay = rcpt_domain;
+               }
                vstring_strcpy(nexthop, relay);
-           else if (*RES_PARAM_VALUE(rp->relayhost))
+           } else if (dict_errno != 0) {
+               msg_warn("%s lookup failure", rp->snd_relay_maps_name);
+               *flags |= RESOLVE_FLAG_FAIL;
+               FREE_MEMORY_AND_RETURN;
+           } else if (*RES_PARAM_VALUE(rp->relayhost))
                vstring_strcpy(nexthop, RES_PARAM_VALUE(rp->relayhost));
            else
                vstring_strcpy(nexthop, rcpt_domain);
index 0c8f4d9865a3270227081fe9ae3ac51360034e53..d0411d77587a353c272d5692c0b59c511dc10b48 100644 (file)
@@ -25,6 +25,7 @@
   */
 #if defined(FREEBSD2) || defined(FREEBSD3) || defined(FREEBSD4) \
     || defined(FREEBSD5) || defined(FREEBSD6) || defined(FREEBSD7) \
+    || defined(FREEBSD8) \
     || defined(BSDI2) || defined(BSDI3) || defined(BSDI4) \
     || defined(OPENBSD2) || defined(OPENBSD3) || defined(OPENBSD4) \
     || defined(NETBSD1) || defined(NETBSD2) || defined(NETBSD3) \
 #define HAS_DUPLEX_PIPE                        /* 4.1 breaks with kqueue(2) */
 #endif
 
+#if __FreeBSD_version >= 800098                /* commit: r194262 */
+#define HAS_CLOSEFROM
+#endif
+
 /* OpenBSD version is year+month */
 
 #if OpenBSD >= 199805                  /* XXX */
@@ -1453,7 +1458,7 @@ typedef int pid_t;
   * sections above.
   */
 #ifndef PRINTFLIKE
-#if (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ == 3
+#if (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ >= 3
 #define PRINTFLIKE(x,y) __attribute__ ((format (printf, (x), (y))))
 #else
 #define PRINTFLIKE(x,y)
@@ -1461,7 +1466,7 @@ typedef int pid_t;
 #endif
 
 #ifndef SCANFLIKE
-#if (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ == 3
+#if (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ >= 3
 #define SCANFLIKE(x,y) __attribute__ ((format (scanf, (x), (y))))
 #else
 #define SCANFLIKE(x,y)
index 66ebdef5c62d96f860f0aaf381016483a00f0e19..1beeb9af404501425ba02561f08aef5602509971 100644 (file)
@@ -116,6 +116,7 @@ int     valid_hostname(const char *name, int gripe)
            }
            label_length = 0;
        } else if (ch == '-') {
+           non_numeric = 1;
            label_length++;
            if (label_length == 1 || cp[1] == 0 || cp[1] == '.') {
                if (gripe)