From: Wietse Venema Date: Tue, 3 May 2005 05:00:00 +0000 (-0500) Subject: postfix-2.3-20050503 X-Git-Tag: v2.3-RC1~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c637755779e396ab7fb261aeef9987d00c4a358;p=thirdparty%2Fpostfix.git postfix-2.3-20050503 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index e13e6c4be..053cb8d16 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -10710,6 +10710,15 @@ Apologies for any names omitted. support in the EHLO response, as described in RFC 2034. File: smtpd/smtpd.c. +20050503 + + Propagate enhanced status code from error(8) mailer to SMTP + server replies. File: smtpd/smtpd_check.c. + + Cleanup: more consistent format of smtpd warning logging, + so that it is easier to sort. Files: smtpd/smtpd.c, + smtpd/smtpd_check.c. + Open problems: Med: disable header address rewriting after XCLIENT? diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index 93daf420a..c298c1751 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -17,6 +17,19 @@ Incompatibility with Postfix 2.1 and earlier If you upgrade from Postfix 2.1 or earlier, read RELEASE_NOTES-2.2 before proceeding. +Incompatibility with snapshot 20050503 +====================================== + +The format of some "warning:" messages in the maillog has changed +so that they are easier to sort: + +- The logging now talks about "access table", instead of using three +different expressions "access table", "access map" and "SMTPD access +map" for the same thing. + +- "non-SMTP command" is now logged BEFORE the client name/address +and the offending client input, instead of at the end. + Incompatibility with snapshot 20050329 ====================================== diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index edaba91ee..f79e40c82 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. */ -#define MAIL_RELEASE_DATE "20050429" +#define MAIL_RELEASE_DATE "20050503" #define MAIL_VERSION_NUMBER "2.3" #define VAR_MAIL_VERSION "mail_version" diff --git a/postfix/src/smtpd/smtpd.c b/postfix/src/smtpd/smtpd.c index 112f9afc4..8fcef56d0 100644 --- a/postfix/src/smtpd/smtpd.c +++ b/postfix/src/smtpd/smtpd.c @@ -3089,7 +3089,7 @@ static void smtpd_proto(SMTPD_STATE *state, const char *service) if (is_header(argv[0].strval) || (*var_smtpd_forbid_cmds && string_list_match(smtpd_forbid_cmds, argv[0].strval))) { - msg_warn("%s sent non-SMTP command: %.100s", + msg_warn("non-SMTP command from %s: %.100s", state->namaddr, vstring_str(state->buffer)); smtpd_chat_reply(state, "221 2.7.0 Error: I can break rules, too. Goodbye."); break; diff --git a/postfix/src/smtpd/smtpd_check.c b/postfix/src/smtpd/smtpd_check.c index 28b820704..424bbe4ee 100644 --- a/postfix/src/smtpd/smtpd_check.c +++ b/postfix/src/smtpd/smtpd_check.c @@ -1897,11 +1897,11 @@ static int check_table_result(SMTPD_STATE *state, const char *table, return (SMTPD_CHECK_DUNNO); #endif if (*cmd_text == 0) { - msg_warn("access map %s entry \"%s\" has FILTER entry without value", + msg_warn("access table %s entry \"%s\" has FILTER entry without value", table, datum); return (SMTPD_CHECK_DUNNO); } else if (strchr(cmd_text, ':') == 0) { - msg_warn("access map %s entry \"%s\" requires transport:destination", + msg_warn("access table %s entry \"%s\" requires transport:destination", table, datum); return (SMTPD_CHECK_DUNNO); } else { @@ -1961,7 +1961,7 @@ static int check_table_result(SMTPD_STATE *state, const char *table, return (SMTPD_CHECK_DUNNO); #endif if (strchr(cmd_text, '@') == 0) { - msg_warn("access map %s entry \"%s\" requires user@domain target", + msg_warn("access table %s entry \"%s\" requires user@domain target", table, datum); return (SMTPD_CHECK_DUNNO); } else { @@ -2013,7 +2013,7 @@ static int check_table_result(SMTPD_STATE *state, const char *table, return (SMTPD_CHECK_DUNNO); #endif if (*cmd_text == 0 || is_header(cmd_text) == 0) { - msg_warn("access map %s entry \"%s\" requires header: text", + msg_warn("access table %s entry \"%s\" requires header: text", table, datum); return (SMTPD_CHECK_DUNNO); } else { @@ -2066,7 +2066,7 @@ static int check_table_result(SMTPD_STATE *state, const char *table, * XXX Don't use passwd files or address rewriting maps as access tables. */ if (strchr(value, ':') != 0) { - msg_warn("SMTPD access map %s has entry with lookup table: %s", + msg_warn("access table %s has entry with lookup table: %s", table, value); msg_warn("do not specify lookup tables inside SMTPD access maps"); msg_warn("define a restriction class and specify its name instead."); @@ -2079,7 +2079,7 @@ static int check_table_result(SMTPD_STATE *state, const char *table, * Don't get carried away with recursion. */ if (state->recursion > 100) { - msg_warn("SMTPD access map %s entry %s causes unreasonable recursion", + msg_warn("access table %s entry %s causes unreasonable recursion", table, value); longjmp(smtpd_check_buf, smtpd_check_reject(state, MAIL_ERROR_SOFTWARE, 451, "4.3.5", @@ -2106,7 +2106,7 @@ static int check_table_result(SMTPD_STATE *state, const char *table, longjmp(smtpd_check_buf, status); } if (restrictions->argc == 0) { - msg_warn("SMTPD access map %s entry %s has empty value", + msg_warn("access table %s entry %s has empty value", table, value); status = SMTPD_CHECK_OK; } else { @@ -4100,6 +4100,7 @@ static int check_rcpt_maps(SMTPD_STATE *state, const char *recipient, const char *reply_class) { const RESOLVE_REPLY *reply; + DSN_SPLIT dp; if (msg_verbose) msg_info(">>> CHECKING RECIPIENT MAPS <<<"); @@ -4141,15 +4142,17 @@ static int check_rcpt_maps(SMTPD_STATE *state, const char *recipient, * unknown recipients in virtual alias domains will both resolve to * "error:user unknown". */ - if (strcmp(STR(reply->transport), MAIL_SERVICE_ERROR) == 0) + if (strcmp(STR(reply->transport), MAIL_SERVICE_ERROR) == 0) { + dsn_split(&dp, strcmp(reply_class, SMTPD_NAME_SENDER) == 0 ? + "5.1.0" : "5.1.1", STR(reply->nexthop)); return (smtpd_check_reject(state, MAIL_ERROR_BOUNCE, (reply->flags & RESOLVE_CLASS_ALIAS) ? var_virt_alias_code : 550, - strcmp(reply_class, SMTPD_NAME_SENDER) == 0 ? - "5.1.0" : "5.1.1", + DSN_CODE(dp.dsn), "<%s>: %s rejected: %s", recipient, reply_class, - STR(reply->nexthop))); + dp.text)); + } /* * Search the recipient lookup tables of the respective address class.