]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.3-20050503
authorWietse Venema <wietse@porcupine.org>
Tue, 3 May 2005 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:31:09 +0000 (06:31 +0000)
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/src/global/mail_version.h
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd_check.c

index e13e6c4befb6017f2ab11faa99d365dd9ebb373a..053cb8d16003fcb23d6f4680e92f94b856a368fb 100644 (file)
@@ -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?
index 93daf420a4b07139608dde2a78e175b73572581f..c298c17517ff97712414778f2cc3156274b6835d 100644 (file)
@@ -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
 ======================================
 
index edaba91ee7d736dffd6c83107f2a1e9623c436b5..f79e40c82c514c5dc45960350f886137fbb34143 100644 (file)
@@ -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"
index 112f9afc4cd3b3f497b498b0bd60bd25e5383200..8fcef56d063657bf172e12417ae407ccc6749222 100644 (file)
@@ -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;
index 28b82070448c61ce58e222bb7a0f9aa6489bf2fb..424bbe4ee54468da7107bc1ef735b926af39d2a0 100644 (file)
@@ -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.