]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.3.19 v3.3.19
authorWietse Venema <wietse@porcupine.org>
Sat, 24 Jul 2021 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sun, 25 Jul 2021 18:14:52 +0000 (14:14 -0400)
postfix/HISTORY
postfix/src/cleanup/cleanup_message.c
postfix/src/global/mail_version.h
postfix/src/global/record.c
postfix/src/postscreen/postscreen_tests.c
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd_chat.c
postfix/src/util/mac_expand.c

index 73c4ceb4bd2bf85ed540b1be925665a7175469a0..00f3b02a42165e16e3d9580c3a5a0068b34f3d77 100644 (file)
@@ -23751,3 +23751,35 @@ Apologies for any names omitted.
        an earlier supported version, or when sharing Postfix 3.6
        configuration files with an earlier supported Postfix
        version. File: global/mail_params.c.
+
+20210623
+
+       Bugfix (introduced: 1999, Postfix 2.11) latent false "Result too
+       large" (ERANGE) errors because an strtol() call had no 'errno
+       = 0' statement before the call. Back-ported from Postfix 3.6.
+       Files: postscreen/postscreen_tests.c, util/mac_expand.c.
+
+20210705
+
+       Bugfix (introduced: Postfix 3.3): "null pointer read" error
+       in the cleanup daemon when "header_from_format = standard"
+       (the default as of Postfix 3.3) and email was submitted
+       with /usr/sbin/sendmail without From: header, and an all-space
+       full name was specified in 1) the password file, 2) with
+       "sendmail -F", or 3) with the NAME environment variable.
+       Found by Renaud Metrich. File: cleanup/cleanup_message.c.
+
+20210708
+
+       Bugfix (introduced: 1999): the Postfix SMTP server was
+       sending all session transcripts to the error_notice_recipient,
+       instead of sending transcripts of bounced mail to the
+       bounce_notice_recipient. File: smtpd/smtpd_chat.c.
+
+20210713
+
+       Bugfix (introduced: Postfix 2.4): false "too many reverse
+       jump" warnings in the showq daemon. The loop detection code
+       was comparing memory addresses instead of queue file names.
+       It now properly compares strings. Reported by Mehmet Avcioglu.
+       File: global/record.c.
index 5990d84b6e22177fe240bb377f593257337a4d8c..135a41eaef7c763ba15eecc5a61046eb3cbab058 100644 (file)
@@ -773,9 +773,12 @@ static void cleanup_header_done_callback(void *context)
                } else {
                    token = tok822_alloc(TOK822_QSTRING, state->fullname);
                }
-               tok822_externalize(state->temp2, token, TOK822_STR_NONE);
-               tok822_free(token);
-               vstring_sprintf_append(state->temp2, " <%s>",
+               if (token) {
+                   tok822_externalize(state->temp2, token, TOK822_STR_NONE);
+                   tok822_free(token);
+                   vstring_strcat(state->temp2, " ");
+               }
+               vstring_sprintf_append(state->temp2, "<%s>",
                                       vstring_str(state->temp1));
                break;
 
index 450170e5abfb24645a5a9f05aa4540961046a7c4..85bc6fde50f78e7f449d6185d75d5a791dcafdeb 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      "20210613"
-#define MAIL_VERSION_NUMBER    "3.3.18"
+#define MAIL_RELEASE_DATE      "20210724"
+#define MAIL_VERSION_NUMBER    "3.3.19"
 
 #ifdef SNAPSHOT
 #define MAIL_VERSION_DATE      "-" MAIL_RELEASE_DATE
index 82ca8ec7f3b2267c367079420cc40d72d6b057fb..948f3b524a8e4e96428e0f789797b7bc48335689 100644 (file)
@@ -326,7 +326,7 @@ int     rec_get_raw(VSTREAM *stream, VSTRING *buf, ssize_t maxsize, int flags)
 int     rec_goto(VSTREAM *stream, const char *buf)
 {
     off_t   offset;
-    static const char *saved_path;
+    static char *saved_path;
     static off_t saved_offset;
     static int reverse_count;
 
@@ -339,11 +339,12 @@ int     rec_goto(VSTREAM *stream, const char *buf)
      * is likely to insert 10000 message headers, but someone might append
      * 10000 recipients.
      */
-#define STREQ(x,y) ((x) == (y) && strcmp((x), (y)) == 0)
 #define REVERSE_JUMP_LIMIT     10000
 
-    if (!STREQ(saved_path, VSTREAM_PATH(stream))) {
-       saved_path = VSTREAM_PATH(stream);
+    if (saved_path == 0 || strcmp(saved_path, VSTREAM_PATH(stream)) != 0) {
+       if (saved_path)
+           myfree(saved_path);
+       saved_path = mystrdup(VSTREAM_PATH(stream));
        reverse_count = 0;
        saved_offset = 0;
     }
index 80cbc97d68591b2d9fe9ff7623029c4c9450d8b8..21ebde8a3c7210c5d0df5d442c81eb5e63582e9a 100644 (file)
@@ -175,6 +175,7 @@ void    psc_parse_tests(PSC_STATE *state,
      * at the time that the cache entry was written.
      */
     for (sp = time_stamps; sp < time_stamps + PSC_TINDX_COUNT; sp++) {
+       errno = 0;
        *sp = strtoul(start, &cp, 10);
        if (*start == 0 || (*cp != '\0' && *cp != ';') || errno == ERANGE)
            *sp = PSC_TIME_STAMP_DISABLED;
index ad0ab00ee8cd4abbd353479d8f10f1c6b94f27b1..a5b6cb46042610fd071d5c4905a72cb0ef913226 100644 (file)
@@ -1261,6 +1261,7 @@ int     var_reject_code;
 int     var_defer_code;
 int     var_smtpd_err_sleep;
 int     var_non_fqdn_code;
+char   *var_bounce_rcpt;
 char   *var_error_rcpt;
 int     var_smtpd_delay_reject;
 char   *var_rest_classes;
@@ -5941,6 +5942,7 @@ int     main(int argc, char **argv)
        VAR_EOD_CHECKS, DEF_EOD_CHECKS, &var_eod_checks, 0, 0,
        VAR_MAPS_RBL_DOMAINS, DEF_MAPS_RBL_DOMAINS, &var_maps_rbl_domains, 0, 0,
        VAR_RBL_REPLY_MAPS, DEF_RBL_REPLY_MAPS, &var_rbl_reply_maps, 0, 0,
+       VAR_BOUNCE_RCPT, DEF_ERROR_RCPT, &var_bounce_rcpt, 1, 0,
        VAR_ERROR_RCPT, DEF_ERROR_RCPT, &var_error_rcpt, 1, 0,
        VAR_REST_CLASSES, DEF_REST_CLASSES, &var_rest_classes, 0, 0,
        VAR_CANONICAL_MAPS, DEF_CANONICAL_MAPS, &var_canonical_maps, 0, 0,
index 8ba46b01cf874102d34fe3639c1c1d48f7593121..48b44c3d23722d4c8739be7c2cb8c642ef1fc14f 100644 (file)
@@ -263,7 +263,8 @@ void    smtpd_chat_notify(SMTPD_STATE *state)
 #define INDENT 4
 
     notice = post_mail_fopen_nowait(mail_addr_double_bounce(),
-                                   var_error_rcpt,
+                                   (state->error_mask & MAIL_ERROR_BOUNCE) ?
+                                   var_bounce_rcpt : var_error_rcpt,
                                    MAIL_SRC_MASK_NOTIFY, NULL_TRACE_FLAGS,
                                    SMTPUTF8_FLAG_NONE, NO_QUEUE_ID);
     if (notice == 0) {
index 8ba0071bc57a0d21dfac1f7464a2914ad7dabd15..1679e5e0f276213aa7bc95e42513c117ca1c2a7c 100644 (file)
@@ -226,6 +226,7 @@ static long atol_or_die(const char *strval)
     long    result;
     char   *remainder;
 
+    errno = 0;
     result = strtol(strval, &remainder, 10);
     if (*strval == 0 /* can't happen */ || *remainder != 0 || errno == ERANGE)
        msg_fatal("mac_exp_eval: bad conversion: %s", strval);