From: Wietse Venema Date: Sat, 7 Apr 2012 05:00:00 +0000 (-0500) Subject: postfix-2.10-20120407 X-Git-Tag: v2.10.0-RC1~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8caa56cc2ce5cbb154f6994eba6637962d31de6a;p=thirdparty%2Fpostfix.git postfix-2.10-20120407 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index 1329451ca..4091d3298 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -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 + by when a reply footer starts + with \c and contains no \n. File: global/smtp_reply_footer.c. diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 4adf80252..c5a2f3f94 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -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 diff --git a/postfix/src/global/smtp_reply_footer.c b/postfix/src/global/smtp_reply_footer.c index ffa4de617..3c90621f9 100644 --- a/postfix/src/global/smtp_reply_footer.c +++ b/postfix/src/global/smtp_reply_footer.c @@ -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); diff --git a/postfix/src/proxymap/proxymap.c b/postfix/src/proxymap/proxymap.c index b0110c3cc..036a494ab 100644 --- a/postfix/src/proxymap/proxymap.c +++ b/postfix/src/proxymap/proxymap.c @@ -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) {