]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.9.0 v2.9.0
authorWietse Venema <wietse@porcupine.org>
Tue, 31 Jan 2012 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 10 Feb 2018 17:55:07 +0000 (12:55 -0500)
postfix/HISTORY
postfix/src/bounce/bounce_trace_service.c
postfix/src/global/dict_ldap.c
postfix/src/global/dict_sqlite.c
postfix/src/global/mail_version.h

index 8d0758c5b22178414cd33d929a7db22512e741c8..88c64f22949a825ccc685a6771a7ed44f194827c 100644 (file)
@@ -17589,3 +17589,22 @@ Apologies for any names omitted.
        This is a real stinker that causes Postfix to fail without
        any prior warning.  File: util/warn_stat.[hc], and everything
        that directly calls stat(), fstat() or lstat().
+
+20120127
+
+       Bugfix (introduced: Postfix 2.8): the Postfix client sqlite
+       quoting routine returned the unquoted result instead of the
+       quoted text.  The opportunities for misuse are limited,
+       because Postfix sqlite files are usually owned by root, and
+       Postfix daemons usually run with non-root privileges so
+       they can't corrupt the database. Problem reported by Rob
+       McGee (rob0).  File: global/dict_sqlite.c.
+
+20120130
+
+       Bugfix (introduced: Postfix 2.3): the trace service did not
+       distinguish between notifications for a non-bounce or a
+       bounce message. This code pre-dates DSN support and should
+       have been updated when it was re-purposed to handle DSN
+       SUCCESS notifications. Problem reported by Sabahattin
+       Gucukoglu.  File: bounce/bounce_trace_service.c.
index 850515902a78f7269f960af9b174f346c7e19356..824931d60becfe192e70f144b97f432ffc140cae 100644 (file)
@@ -83,8 +83,39 @@ int     bounce_trace_service(int flags, char *service, char *queue_name,
     BOUNCE_INFO *bounce_info;
     int     bounce_status = 1;
     VSTREAM *bounce;
-    VSTRING *new_id = vstring_alloc(10);
+    int     notify_mask = name_mask(VAR_NOTIFY_CLASSES, mail_error_masks,
+                                   var_notify_classes);
+    VSTRING *new_id;
     int     count;
+    const char *sender;
+
+    /*
+     * For consistency with fail/delay notifications, send notification for a
+     * non-bounce message as a single-bounce message, send notification for a
+     * single-bounce message as a double-bounce message, and drop requests to
+     * send notification for a double-bounce message.
+     */
+#define NULL_SENDER            MAIL_ADDR_EMPTY /* special address */
+
+    if (strcasecmp(recipient, mail_addr_double_bounce()) == 0) {
+       msg_info("%s: not sending trace/success notification for "
+                "double-bounce message", queue_id);
+       return (0);
+    } else if (*recipient == 0) {
+       if ((notify_mask & MAIL_ERROR_2BOUNCE) != 0) {
+           recipient = var_2bounce_rcpt;
+           sender = mail_addr_double_bounce();
+       } else {
+           msg_info("%s: not sending trace/success notification "
+                    "for single-bounce message", queue_id);
+           if (mail_queue_remove(service, queue_id) && errno != ENOENT)
+               msg_fatal("remove %s %s: %m", service, queue_id);
+           return (0);
+       }
+    } else {
+       /* Always send notification for non-bounce message. */
+       sender = NULL_SENDER;
+    }
 
     /*
      * Initialize. Open queue file, bounce log, etc.
@@ -126,7 +157,6 @@ int     bounce_trace_service(int flags, char *service, char *queue_name,
        bounce_mail_free(bounce_info);
        return (0);
     }
-#define NULL_SENDER            MAIL_ADDR_EMPTY /* special address */
 #define NULL_TRACE_FLAGS       0
 
     /*
@@ -139,7 +169,8 @@ int     bounce_trace_service(int flags, char *service, char *queue_name,
      * there are fewer potential left-over files to remove up when we create
      * a new queue file.
      */
-    if ((bounce = post_mail_fopen_nowait(NULL_SENDER, recipient,
+    new_id = vstring_alloc(10);
+    if ((bounce = post_mail_fopen_nowait(sender, recipient,
                                         INT_FILT_MASK_BOUNCE,
                                         NULL_TRACE_FLAGS,
                                         new_id)) != 0) {
index 3d6ddeaaab2082d0792dc2b62f487e98a3c5ce41..7038e050a750bcee09475e0ff35382ff158354b0 100644 (file)
@@ -461,7 +461,7 @@ typedef struct bind_props {
     char   *passwd;
     char   *realm;
     char   *authzid;
-}       bind_props;
+} bind_props;
 
 static int ldap_b2_interact(LDAP *ld, unsigned flags, void *props, void *inter)
 {
index 7f56cdf30cf9d5d3856764e51012dc5bc841c5fb..8eb0da2f78c6c7ccde0a9aff39dc64ffbf276183 100644 (file)
 /* AUTHOR(S)
 /*     Axel Steiner
 /*     ast@treibsand.com
+/*
+/*     Adopted and updated by:
+/*     Wietse Venema
+/*     IBM T.J. Watson Research
+/*     P.O. Box 704
+/*     Yorktown Heights, NY 10598, USA
 /*--*/
 
 /* System library. */
@@ -109,7 +115,7 @@ static void dict_sqlite_quote(DICT *dict, const char *raw_text, VSTRING *result)
     /* Fix 20100616 */
     if (quoted_text == 0)
        msg_fatal("dict_sqlite_quote: out of memory");
-    vstring_strcat(result, raw_text);
+    vstring_strcat(result, quoted_text);
     sqlite3_free(quoted_text);
 }
 
index 27382f5619e089890ba19e7bd3d33f6c0cb3827d..addabbd432b7ab4e37bfea3ae80125f227002608 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      "20120124"
-#define MAIL_VERSION_NUMBER    "2.9-RC2"
+#define MAIL_RELEASE_DATE      "20120131"
+#define MAIL_VERSION_NUMBER    "2.9.0"
 
 #ifdef SNAPSHOT
 # define MAIL_VERSION_DATE     "-" MAIL_RELEASE_DATE