]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.3.10 v2.3.10
authorWietse Venema <wietse@porcupine.org>
Wed, 30 May 2007 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 10 Feb 2018 21:08:31 +0000 (16:08 -0500)
postfix/HISTORY
postfix/src/cleanup/cleanup_out_recipient.c
postfix/src/discard/discard.c
postfix/src/error/error.c
postfix/src/global/mail_version.h
postfix/src/local/mailbox.c
postfix/src/local/unknown.c
postfix/src/postdrop/postdrop.c
postfix/src/util/get_hostname.c

index dfaa4d8e5e2033873c3d9673ee89883014f843d6..12b51a03ad0de6309fdffd808c93776fb5a0d82f 100644 (file)
@@ -13011,3 +13011,31 @@ Apologies for any names omitted.
 
        Bugfix: Content-Transfer-Encoding: attribute values are
        case insensitive. File: src/cleanup/cleanup_message.c.
+
+20070514
+
+       Bugfix: mailbox_transport(_maps) and fallback_transport(_maps)
+       were broken when used with the error(8) or discard(8)
+       transports. Cause: insufficient documentation.  Files:
+       error/error.c, discard/discard.c.
+
+20070520
+
+       Bugfix (problem introduced Postfix 2.3): when DSN support
+       was introduced it broke "agressive" recipient duplicate
+       elimination with "enable_original_recipient = no".  File:
+       cleanup/cleanup_out_recipient.c.
+
+20070529
+
+       Bugfix (introduced Postfix 2.3): the sendmail/postdrop
+       commands would hang when trying to submit a message larger
+       than the per-message size limit. File: postdrop/postdrop.c.
+
+20070530
+
+       Sabotage the saboteur who insists on breaking Postfix by
+       adding gethostbyname() calls that cause maildir delivery
+       to fail when the machine name is not found in /etc/hosts,
+       or that cause Postfix processes to hang when the network
+       is down.
index 476dc44b56271e0ab3adeff8bf497ab9ecda44cd..25ffb90526cad0077feaa0e7dc47c95ef87c6953 100644 (file)
@@ -127,13 +127,20 @@ void    cleanup_out_recipient(CLEANUP_STATE *state,
      * Distinguish between different original recipient addresses that map
      * onto the same mailbox. The recipient will use our original recipient
      * message header to figure things out.
+     * 
+     * Postfix 2.2 compatibility: when ignoring differences in Postfix original
+     * recipient information, also ignore differences in DSN attributes. We
+     * do, however, keep the DSN attributes of the recipient that survives
+     * duplicate elimination.
      */
 #define STREQ(x, y) (strcmp((x), (y)) == 0)
 
     if ((state->flags & CLEANUP_FLAG_MAP_OK) == 0
        || cleanup_virt_alias_maps == 0) {
-       if (been_here(state->dups, "%s\n%d\n%s\n%s",
-                     dsn_orcpt, dsn_notify, orcpt, recip) == 0) {
+       if ((var_enable_orcpt ?
+            been_here(state->dups, "%s\n%d\n%s\n%s",
+                      dsn_orcpt, dsn_notify, orcpt, recip) :
+            been_here_fixed(state->dups, recip)) == 0) {
            if (dsn_notify)
                cleanup_out_format(state, REC_TYPE_ATTR, "%s=%d",
                                   MAIL_ATTR_DSN_NOTIFY, dsn_notify);
@@ -181,6 +188,11 @@ void    cleanup_out_recipient(CLEANUP_STATE *state,
      * notifications. The queue manager will flush the trace (and bounce)
      * logfile, possibly after it has generated its own success or failure
      * notification records.
+     * 
+     * Postfix 2.2 compatibility: when ignoring differences in Postfix original
+     * recipient information, also ignore differences in DSN attributes. We
+     * do, however, keep the DSN attributes of the recipient that survives
+     * duplicate elimination.
      */
     else {
        RECIPIENT rcpt;
@@ -198,8 +210,10 @@ void    cleanup_out_recipient(CLEANUP_STATE *state,
                          dsn_notify & ~DSN_NOTIFY_SUCCESS);
        }
        for (cpp = argv->argv; *cpp; cpp++) {
-           if (been_here(state->dups, "%s\n%d\n%s\n%s",
-                         dsn_orcpt, dsn_notify, orcpt, *cpp) == 0) {
+           if ((var_enable_orcpt ?
+                been_here(state->dups, "%s\n%d\n%s\n%s",
+                          dsn_orcpt, dsn_notify, orcpt, *cpp) :
+                been_here_fixed(state->dups, *cpp)) == 0) {
                if (dsn_notify)
                    cleanup_out_format(state, REC_TYPE_ATTR, "%s=%d",
                                       MAIL_ATTR_DSN_NOTIFY, dsn_notify);
index 04855889b105e7fd16191911752f2a61ce93b096..152a8202c2cf35ffec0a1f2a80d00daa150d07b8 100644 (file)
@@ -173,13 +173,11 @@ static int deliver_message(DELIVER_REQUEST *request)
     (void) DSN_SIMPLE(&dsn, DSN_STATUS(dp.dsn), dp.text);
     for (nrcpt = 0; nrcpt < request->rcpt_list.len; nrcpt++) {
        rcpt = request->rcpt_list.info + nrcpt;
-       if (rcpt->offset >= 0) {
-           status = sent(BOUNCE_FLAGS(request), request->queue_id,
-                         &request->msg_stats, rcpt, "none", &dsn);
-           if (status == 0 && (request->flags & DEL_REQ_FLAG_SUCCESS))
-               deliver_completed(src, rcpt->offset);
-           result |= status;
-       }
+       status = sent(BOUNCE_FLAGS(request), request->queue_id,
+                     &request->msg_stats, rcpt, "none", &dsn);
+       if (status == 0 && (request->flags & DEL_REQ_FLAG_SUCCESS))
+           deliver_completed(src, rcpt->offset);
+       result |= status;
     }
 
     /*
index 2aeb98f03157b349dcaeea9dfd8d0151eb0690b5..0deb8de6d4bd322c8b2adf22ad96c7711db7a2db 100644 (file)
@@ -176,13 +176,11 @@ static int deliver_message(DELIVER_REQUEST *request)
     (void) DSN_SIMPLE(&dsn, DSN_STATUS(dp.dsn), dp.text);
     for (nrcpt = 0; nrcpt < request->rcpt_list.len; nrcpt++) {
        rcpt = request->rcpt_list.info + nrcpt;
-       if (rcpt->offset >= 0) {
-           status = bounce_append(BOUNCE_FLAGS(request), request->queue_id,
-                                  &request->msg_stats, rcpt, "none", &dsn);
-           if (status == 0)
-               deliver_completed(src, rcpt->offset);
-           result |= status;
-       }
+       status = bounce_append(BOUNCE_FLAGS(request), request->queue_id,
+                              &request->msg_stats, rcpt, "none", &dsn);
+       if (status == 0)
+           deliver_completed(src, rcpt->offset);
+       result |= status;
     }
 
     /*
index 6f9f64174f510269006cac7b0dc8bafaba99ad06..1d71e5227b53a46df7d526306768565399f20720 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      "20070511"
-#define MAIL_VERSION_NUMBER    "2.3.10-RC1"
+#define MAIL_RELEASE_DATE      "20070530"
+#define MAIL_VERSION_NUMBER    "2.3.10"
 
 #ifdef SNAPSHOT
 # define MAIL_VERSION_DATE     "-" MAIL_RELEASE_DATE
index 04cead1b90cbd09e009727a3dcdc3a5e5d4470ed..92bd79d6767c28b518b3417e77e0fa434690faa5 100644 (file)
@@ -271,6 +271,7 @@ int     deliver_mailbox(LOCAL_STATE state, USER_ATTR usr_attr, int *statusp)
     if (*var_mbox_transp_maps && transp_maps == 0)
        transp_maps = maps_create(VAR_MBOX_TRANSP_MAPS, var_mbox_transp_maps,
                                  DICT_FLAG_LOCK | DICT_FLAG_NO_REGSUB);
+    /* The -1 is a hint for the down-stream deliver_completed() function. */
     if (*var_mbox_transp_maps
        && (map_transport = maps_find(transp_maps, state.msg_attr.user,
                                      DICT_FLAG_NONE)) != 0) {
index cc80acfa6aaf798caa1435d918289ec6f13837ea..068f9eed2683ca44e59e069861112e9a2e5c42e8 100644 (file)
@@ -109,9 +109,11 @@ int     deliver_unknown(LOCAL_STATE state, USER_ATTR usr_attr)
     if (*var_fbck_transp_maps && transp_maps == 0)
        transp_maps = maps_create(VAR_FBCK_TRANSP_MAPS, var_fbck_transp_maps,
                                  DICT_FLAG_LOCK | DICT_FLAG_NO_REGSUB);
+    /* The -1 is a hint for the down-stream deliver_completed() function. */
     if (*var_fbck_transp_maps
        && (map_transport = maps_find(transp_maps, state.msg_attr.user,
                                      DICT_FLAG_NONE)) != 0) {
+       state.msg_attr.rcpt.offset = -1L;
        return (deliver_pass(MAIL_CLASS_PRIVATE, map_transport,
                             state.request, &state.msg_attr.rcpt));
     }
index ad01f14df0aa567a66d51de9c71eb6933b84bf50..93708776e972273ba926a96c47693365f1353821 100644 (file)
@@ -428,9 +428,11 @@ int     main(int argc, char **argv)
        if (REC_PUT_BUF(dst->stream, rec_type, buf) < 0) {
            /* rec_get() errors must not clobber errno. */
            saved_errno = errno;
-           while (rec_get_raw(VSTREAM_IN, buf, var_line_limit,
-                              REC_FLAG_NONE) > 0)
-                /* void */ ;
+           while ((rec_type = rec_get_raw(VSTREAM_IN, buf, var_line_limit,
+                                          REC_FLAG_NONE)) != REC_TYPE_END
+                  && rec_type != REC_TYPE_EOF)
+               if (rec_type == REC_TYPE_ERROR)
+                   msg_fatal("uid=%ld: malformed input", (long) uid);
            errno = saved_errno;
            break;
        }
index fcf4a7f7ffb760e01406453dd2f95cb1880b0299..eb2cfea06ad96b491034844626212b49cd736d35 100644 (file)
@@ -61,13 +61,23 @@ const char *get_hostname(void)
      * part of the socket interface library. We avoid the more politically-
      * correct uname() routine because that has no portable way of dealing
      * with long (FQDN) hostnames.
+     * 
+     * DO NOT CALL GETHOSTBYNAME FROM THIS FUNCTION. IT BREAKS MAILDIR DELIVERY
+     * AND OTHER THINGS WHEN THE MACHINE NAME IS NOT FOUND IN /ETC/HOSTS OR
+     * CAUSES PROCESSES TO HANG WHEN THE NETWORK IS DISCONNECTED.
+     * 
+     * POSTFIX NO LONGER NEEDS A FULLY QUALIFIED HOSTNAME. INSTEAD POSTFIX WILL
+     * USE A DEFAULT DOMAIN NAME "LOCALDOMAIN".
      */
     if (my_host_name == 0) {
+       /* DO NOT CALL GETHOSTBYNAME FROM THIS FUNCTION */
        if (gethostname(namebuf, sizeof(namebuf)) < 0)
            msg_fatal("gethostname: %m");
        namebuf[MAXHOSTNAMELEN] = 0;
+       /* DO NOT CALL GETHOSTBYNAME FROM THIS FUNCTION */
        if (valid_hostname(namebuf, DO_GRIPE) == 0)
            msg_fatal("unable to use my own hostname");
+       /* DO NOT CALL GETHOSTBYNAME FROM THIS FUNCTION */
        my_host_name = mystrdup(namebuf);
     }
     return (my_host_name);