From: Wietse Venema Date: Fri, 11 Jul 2008 05:00:00 +0000 (-0500) Subject: postfix-2.5.3-RC1 X-Git-Tag: v2.5.3-RC1^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=caa4ec5a68af384daf2cee87ae86e95191810bb1;p=thirdparty%2Fpostfix.git postfix-2.5.3-RC1 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index 26ef4be67..d08f791d6 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -14377,3 +14377,23 @@ Apologies for any names omitted. not updated when the smtpd_client_port_logging configuration parameter was added. Code by Victor Duchovni. Files: smtpd/smtpd.c, smtpd/smtpd_peer.c. + +20080509 + + Bugfix: null-terminate CN comment string after sanitization. + File: smtpd/smtpd.c. + +20080603 + + Workaround: avoid "bad address pattern" errors with non-address + patterns in namadr_list_match() calls. File: util/match_ops.c. + +20080620 + + Bugfix (introduced 20080207): "cleanup -v" panic because + the new "SMTP reply" request flag did not have a printable + name. File: global/cleanup_strflags.c. + + Cleanup: using "Before-queue content filter", RFC3848 + information was not added to the headers. Carlos Velasco. + File smtpd/smtpd.c. diff --git a/postfix/src/global/cleanup_strflags.c b/postfix/src/global/cleanup_strflags.c index 4853782ec..d2a687c83 100644 --- a/postfix/src/global/cleanup_strflags.c +++ b/postfix/src/global/cleanup_strflags.c @@ -52,6 +52,7 @@ static struct cleanup_flag_map cleanup_flag_map[] = { CLEANUP_FLAG_BCC_OK, "enable_automatic_bcc", CLEANUP_FLAG_MAP_OK, "enable_address_mapping", CLEANUP_FLAG_MILTER, "enable_milters", + CLEANUP_FLAG_SMTP_REPLY, "enable_smtp_reply", }; /* cleanup_strflags - map flags code to printable string */ diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 4086429b9..a91ed72cb 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -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 "20080507" -#define MAIL_VERSION_NUMBER "2.5.2" +#define MAIL_RELEASE_DATE "20080711" +#define MAIL_VERSION_NUMBER "2.5.3-RC1" #ifdef SNAPSHOT # define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE diff --git a/postfix/src/smtpd/smtpd.c b/postfix/src/smtpd/smtpd.c index 740d1bf4e..ef17a1d8d 100644 --- a/postfix/src/smtpd/smtpd.c +++ b/postfix/src/smtpd/smtpd.c @@ -2506,6 +2506,7 @@ static void comment_sanitize(VSTRING *comment_string) } while (pc-- > 0) VSTRING_ADDCH(comment_string, ')'); + VSTRING_TERMINATE(comment_string); } /* data_cmd - process DATA command */ @@ -2687,7 +2688,7 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv) if (state->rcpt_count == 1 && state->recipient) { out_fprintf(out_stream, REC_TYPE_NORM, state->cleanup ? "\tby %s (%s) with %s%s%s id %s" : - "\tby %s (%s) with %s", + "\tby %s (%s) with %s%s%s", var_myhostname, var_mail_name, state->protocol, rfc3848_sess, rfc3848_auth, state->queue_id); @@ -2698,7 +2699,7 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv) } else { out_fprintf(out_stream, REC_TYPE_NORM, state->cleanup ? "\tby %s (%s) with %s%s%s id %s;" : - "\tby %s (%s) with %s;", + "\tby %s (%s) with %s%s%s;", var_myhostname, var_mail_name, state->protocol, rfc3848_sess, rfc3848_auth, state->queue_id); diff --git a/postfix/src/util/match_ops.c b/postfix/src/util/match_ops.c index 41c069394..5832266b1 100644 --- a/postfix/src/util/match_ops.c +++ b/postfix/src/util/match_ops.c @@ -234,12 +234,20 @@ int match_hostaddr(int unused_flags, const char *addr, const char *pattern) * Postfix; if not, then Postfix has no business dealing with IPv4 * addresses anyway. * - * - Don't bother if the pattern is a bare IPv4 address. That form would - * have been matched with the strcasecmp() call above. + * - Don't bother unless the pattern is either an IPv6 address or net/mask. * - * - Don't bother if the pattern isn't an address or address/mask. + * We can safely skip IPv4 address patterns because their form is + * unambiguous and they did not match in the strcasecmp() calls above. + * + * XXX We MUST skip (parent) domain names, which may appear in NAMADR_LIST + * input, to avoid triggering false cidr_match_parse() errors. + * + * The last two conditions below are for backwards compatibility with + * earlier Postfix versions: don't abort with fatal errors on junk that + * was silently ignored (principle of least astonishment). */ if (!strchr(addr, ':') != !strchr(pattern, ':') + || pattern[strcspn(pattern, ":/")] == 0 || pattern[strspn(pattern, V4_ADDR_STRING_CHARS)] == 0 || pattern[strspn(pattern, V6_ADDR_STRING_CHARS "[]/")] != 0) return (0);