]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.10-20120407
authorWietse Venema <wietse@porcupine.org>
Sat, 7 Apr 2012 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:38:06 +0000 (06:38 +0000)
postfix/HISTORY
postfix/src/global/mail_version.h
postfix/src/global/smtp_reply_footer.c
postfix/src/proxymap/proxymap.c

index 1329451ca2aea624cb1d58a3aad6662841e7ab78..4091d329824071fd9a3db850974ddc9c574cdb1a 100644 (file)
@@ -17717,3 +17717,9 @@ Apologies for any names omitted.
        Cleanup: weed out stale TODO's from the WISHLIST, and moved
        some CYA text from WISHLIST into the code. Files: WISHLIST,
        smtpd/smtpd_proxy.c.
+
+20120407
+
+       Bugfix (introduced: 20120330): don't replace <reply-code>
+       <space> by <reply-code> <hyphen> when a reply footer starts
+       with \c and contains no \n. File: global/smtp_reply_footer.c.
index 4adf80252e0dcccbe246d559f11a705f5177bcfe..c5a2f3f94108cc4b0c78f81733c4cce85831f868 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20120404"
+#define MAIL_RELEASE_DATE      "20120407"
 #define MAIL_VERSION_NUMBER    "2.10"
 
 #ifdef SNAPSHOT
index ffa4de617c3496eed1cf6937a42ec7136b27288f..3c90621f927c7a97366fffe3d044a013fe058629 100644 (file)
@@ -97,6 +97,7 @@ int     smtp_reply_footer(VSTRING *buffer, ssize_t start,
     char   *end;
     ssize_t dsn_len;
     int     crlf_at_end = 0;
+    int     reply_patch_undo_offs = -1;
 
     /*
      * Sanity check.
@@ -115,6 +116,7 @@ int     smtp_reply_footer(VSTRING *buffer, ssize_t start,
            || (cp[3] != ' ' && cp[3] != '-'))
            return (-1);
        cp[3] = '-';
+       reply_patch_undo_offs = cp + 3 - STR(buffer);
        if ((next = strstr(cp, "\r\n")) == 0) {
            next = end;
            break;
@@ -159,6 +161,7 @@ int     smtp_reply_footer(VSTRING *buffer, ssize_t start,
                vstring_strncat(buffer, STR(buffer) + start + 4, (int) dsn_len);
                vstring_strcat(buffer, " ");
            }
+           reply_patch_undo_offs = -1;
        }
        /* Append one line of footer text. */
        mac_expand(buffer, cp, MAC_EXP_FLAG_APPEND, filter, lookup, context);
@@ -168,6 +171,8 @@ int     smtp_reply_footer(VSTRING *buffer, ssize_t start,
        } else
            break;
     }
+    if (reply_patch_undo_offs > 0)
+       STR(buffer)[reply_patch_undo_offs] = ' ';
     if (crlf_at_end)
        vstring_strcat(buffer, "\r\n");
     return (0);
index b0110c3cc8a5ed0b91768e5d3926e573aad15c43..036a494ab0c8a283cfadc743a0e00e8ba0c65d85 100644 (file)
@@ -306,6 +306,7 @@ static DICT *proxy_map_find(const char *map_type_name, int request_flags,
 
     while (strncmp(map_type_name, PROXY_COLON, PROXY_COLON_LEN) == 0)
        map_type_name += PROXY_COLON_LEN;
+    /* XXX The following breaks with maps that have ':' in their name. */
     if (strchr(map_type_name, ':') == 0)
        PROXY_MAP_FIND_ERROR_RETURN(PROXY_STAT_BAD);
     if (htable_locate(proxy_auth_maps, map_type_name) == 0) {