From 5f9dde17b569e69d10f85b555b42662e7ef68504 Mon Sep 17 00:00:00 2001 From: Wietse Venema Date: Tue, 24 Sep 2002 00:00:00 -0500 Subject: [PATCH] postfix-1.1.11-20020924 --- postfix/HISTORY | 6 ++++++ postfix/RELEASE_NOTES | 2 +- postfix/src/global/mail_version.h | 2 +- postfix/src/smtpd/smtpd_check.c | 31 ++++++++++++++++++++----------- 4 files changed, 28 insertions(+), 13 deletions(-) diff --git a/postfix/HISTORY b/postfix/HISTORY index d0327940d..534ec272d 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -7018,6 +7018,12 @@ Apologies for any names omitted. The reject_rbl restriction name is still recognized for compatibility with systems maintained by LaMont Jones. +20020924 + + Bugfix: reject_rhsbl_ was broken when was + unavailable, causing the restrictions parser to get out if + sync. Spotted by Ralf Hildebrandt. File: smtpd/smtpd_check.c. + Open problems: Low: smtpd should log queue ID with reject/warn/hold/discard diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index 96b0afbcb..d48b20094 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -15,7 +15,7 @@ the same bugfixes as a patch release. Incompatible changes with Postfix snapshot 1.1.11-20020923 ========================================================== -Subtle change in ${name:result} macro expansions: the expansion +Subtle change in ${name?result} macro expansions: the expansion no longer happens when $name is an empty string. This probably makes more sense than the old behavior. diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 11f19ff1a..6319c6598 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,7 +20,7 @@ * Patches change the patchlevel and the release date. Snapshots change the * release date only, unless they include the same bugfix as a patch release. */ -#define MAIL_RELEASE_DATE "20020923" +#define MAIL_RELEASE_DATE "20020924" #define VAR_MAIL_VERSION "mail_version" #define DEF_MAIL_VERSION "1.1.11-" MAIL_RELEASE_DATE diff --git a/postfix/src/smtpd/smtpd_check.c b/postfix/src/smtpd/smtpd_check.c index cc4ad2d13..6e78d30fd 100644 --- a/postfix/src/smtpd/smtpd_check.c +++ b/postfix/src/smtpd/smtpd_check.c @@ -110,8 +110,8 @@ /* .IP reject_maps_rbl /* Look up the reversed client network address in the real-time blackhole /* DNS zones below the domains listed in the "maps_rbl_domains" -/* configuration parameter. This is equivalent to using "reject_rbl" -/* once for each such domain. +/* configuration parameter. This is equivalent to using +/* "reject_rbl_client" once for each such domain. /* .IP permit_naked_ip_address /* Permit the use of a naked IP address (without enclosing []) /* in HELO/EHLO commands. @@ -2632,9 +2632,12 @@ static int generic_checks(SMTPD_STATE *state, ARGV *restrictions, if (*(cpp[1]) == 0) msg_warn("restriction %s requires domain name argument", name); - else if (strcasecmp(state->name, "unknown") != 0) - status = reject_rbl_domain(state, *(cpp += 1), state->name, - SMTPD_NAME_CLIENT); + else { + cpp += 1; + if (strcasecmp(state->name, "unknown") != 0) + status = reject_rbl_domain(state, *cpp, state->name, + SMTPD_NAME_CLIENT); + } } /* @@ -2713,9 +2716,12 @@ static int generic_checks(SMTPD_STATE *state, ARGV *restrictions, } else if (strcasecmp(name, REJECT_RHSBL_SENDER) == 0) { if (cpp[1] == 0) msg_warn("restriction %s requires domain name argument", name); - else if (state->sender && *state->sender) - status = reject_rbl_domain(state, *(cpp += 1), state->sender, - SMTPD_NAME_SENDER); + else { + cpp += 1; + if (state->sender && *state->sender) + status = reject_rbl_domain(state, *cpp, state->sender, + SMTPD_NAME_SENDER); + } } /* @@ -2762,9 +2768,12 @@ static int generic_checks(SMTPD_STATE *state, ARGV *restrictions, } else if (strcasecmp(name, REJECT_RHSBL_RECIPIENT) == 0) { if (cpp[1] == 0) msg_warn("restriction %s requires domain name argument", name); - else if (state->recipient) - status = reject_rbl_domain(state, *(cpp += 1), state->recipient, - SMTPD_NAME_RECIPIENT); + else { + cpp += 1; + if (state->recipient) + status = reject_rbl_domain(state, *cpp, state->recipient, + SMTPD_NAME_RECIPIENT); + } } /*