]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.3-20050517
authorWietse Venema <wietse@porcupine.org>
Tue, 17 May 2005 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:31:11 +0000 (06:31 +0000)
13 files changed:
postfix/COMPATIBILITY
postfix/HISTORY
postfix/html/error.8.html
postfix/man/man8/error.8
postfix/src/cleanup/cleanup_api.c
postfix/src/error/error.c
postfix/src/global/mail_params.c
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h
postfix/src/smtp/smtp_sasl_glue.c
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd_dsn_fix.c
postfix/src/smtpd/smtpd_sasl_glue.c

index 354931975a92f9e0ae5086c78342a3fa89e0ec7e..b48862241991f345dfeeabfc73e8bd2659eed834 100644 (file)
@@ -14,7 +14,7 @@ db tables     yes (compile time option)
 dbm tables     yes (compile time option)
 delivered-to   yes (configurable with prepend_delivered_header)
 dsn            almost (supports enhanced status codes and DSN format bounces)
-errors-to:     yes (disabled by default since Postfix 2.1)
+errors-to:     no (removed with Postfix 2.2)
 esmtp          yes
 etrn support   yes (per-destination log for authorized destinations only)
 fcntl locking  yes (runtime configurable)
index 729de2949f74443b132f26bb04b90307fec34445..65058fc004a4ed49fe07a7be607a22a110487d1b 100644 (file)
@@ -10747,8 +10747,23 @@ Apologies for any names omitted.
        error mailer information is used for senders or recipients.
        Files: smtpd/smtpd_check.c, smtpd/smtpd_dsn_fix.[hc].
 
+20050512
+
+       Feature: support for more SASL logging call-backs, if these
+       are defined in the compile-time environment. Files:
+       smtpd/smtpd_sasl_glue.c, smtp/smtp_sasl_glue.c.
+
+20050513
+
+       Workaround: Postfix now uses "localdomain" as the default
+       domain name when $myhostname is not in "host.domain" form.
+       Files: global/mail_params.[hc].
+
 Open problems:
 
+       Feature: need "soft-bounce before fall-back relay" for
+       SOHO type operations.
+
        Med: disable header address rewriting after XCLIENT?
        Introduce a better concept of original submission?
 
index ab31a7d5a9bba6af9d3e6975a0d5d24d15485a2a..c70ff5f0196e5f431438da69e596482d337a359e 100644 (file)
@@ -37,7 +37,7 @@ ERROR(8)                                                              ERROR(8)
        privilege.
 
 <b>STANDARDS</b>
-       None.
+       <a href="http://www.faqs.org/rfcs/rfc3463.html">RFC 3463</a> (Enhanced Status Codes)
 
 <b>DIAGNOSTICS</b>
        Problems and transactions are logged to <b>syslogd</b>(8).
index 6f10a50079b5451fa033537e4f472f4849025829..62804888a8a8db87e7fc4e703da79a0cc58b02b3 100644 (file)
@@ -39,7 +39,7 @@ to the network, and can be run chrooted at fixed low privilege.
 .SH "STANDARDS"
 .na
 .nf
-None.
+RFC 3463 (Enhanced Status Codes)
 .SH DIAGNOSTICS
 .ad
 .fi
index 050cd57b7e4c329ef1bc5bf2822ebbaddad7c216..ce7c1db619213296451d5d89d9d29226f4565560 100644 (file)
@@ -218,6 +218,8 @@ int     cleanup_flush(CLEANUP_STATE *state)
      */
     if (state->errs == 0 && (state->flags & CLEANUP_FLAG_DISCARD) == 0) {
        if ((state->flags & CLEANUP_FLAG_HOLD) != 0) {
+            myfree(state->queue_name);
+                  state->queue_name = MAIL_QUEUE_HOLD;
            mail_stream_ctl(state->handle,
                            MAIL_STREAM_CTL_QUEUE, MAIL_QUEUE_HOLD,
                            MAIL_STREAM_CTL_CLASS, 0,
index 9fc83cc145134ab62bd86f8baf70acf720b65629..386433f2a00b54c3c35134768ff5cdaa8cd8fbd0 100644 (file)
@@ -29,7 +29,7 @@
 /*     The \fBerror\fR(8) mailer is not security-sensitive. It does not talk
 /*     to the network, and can be run chrooted at fixed low privilege.
 /* STANDARDS
-/*     None.
+/*     RFC 3463 (Enhanced Status Codes)
 /* DIAGNOSTICS
 /*     Problems and transactions are logged to \fBsyslogd\fR(8).
 /*
index a43d5715cb5ec70f79274bcc61d958a4ae3b460a..5d2b92118940bceec4668910201b6eb94f5eb9fb 100644 (file)
@@ -310,16 +310,13 @@ static const char *check_myhostname(void)
 
     /*
      * If the local machine name is not in FQDN form, try to append the
-     * contents of $mydomain.
+     * contents of $mydomain. Use a default domain as a final workaround.
      */
     name = get_hostname();
     if ((dot = strchr(name, '.')) == 0) {
        if ((domain = mail_conf_lookup_eval(VAR_MYDOMAIN)) == 0)
-           msg_warn("My hostname %s is not a fully qualified name - set %s or %s in %s/%s",
-                    name, VAR_MYHOSTNAME, VAR_MYDOMAIN,
-                    var_config_dir, MAIN_CONF_FILE);
-       else
-           name = concatenate(name, ".", domain, (char *) 0);
+           domain = DEF_MYDOMAIN;
+       name = concatenate(name, ".", domain, (char *) 0);
     }
     return (name);
 }
@@ -331,11 +328,10 @@ static const char *check_mydomainname(void)
     char   *dot;
 
     /*
-     * Use the hostname when it is not a FQDN ("foo"), or when the hostname
-     * actually is a domain name ("foo.com").
+     * Use a default domain when the hostname is not a FQDN ("foo").
      */
-    if ((dot = strchr(var_myhostname, '.')) == 0 || strchr(dot + 1, '.') == 0)
-       return (var_myhostname);
+    if ((dot = strchr(var_myhostname, '.')) == 0)
+       return (DEF_MYDOMAIN);
     return (dot + 1);
 }
 
index 9cd1a99006d54f4e6a50ae2b0f7313a8d62592fa..fb59e3d160d82e327ff1f09c74d459d467d76608 100644 (file)
@@ -114,6 +114,7 @@ extern char *var_mydest;
 extern char *var_myhostname;
 
 #define VAR_MYDOMAIN           "mydomain"      /* my domain name */
+#define DEF_MYDOMAIN           "localdomain"
 extern char *var_mydomain;
 
  /*
index 94daaa2bc1b010e04c16fe9ca00ce4a06033b458..9c4606d4d72ffe656f2a360d2260e097e8964461 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change the patchlevel and the release date. Snapshots change the
   * release date only.
   */
-#define MAIL_RELEASE_DATE      "20050510"
+#define MAIL_RELEASE_DATE      "20050517"
 #define MAIL_VERSION_NUMBER    "2.3"
 
 #define VAR_MAIL_VERSION       "mail_version"
index ca9b6203bf159232481b0e9e974db86c4aa5bf48..a34b3842f5dc1823c33c26d4d290e8040ed7b566 100644 (file)
@@ -201,17 +201,36 @@ static int smtp_sasl_log(void *unused_context, int priority,
                                 const char *message)
 {
     switch (priority) {
-       case SASL_LOG_ERR:              /* unusual errors */
-       case SASL_LOG_WARN:             /* non-fatal warnings */
+    case SASL_LOG_ERR:                         /* unusual errors */
+    case SASL_LOG_WARN:                        /* non-fatal warnings */
        msg_warn("SASL authentication problem: %s", message);
        break;
     case SASL_LOG_NOTE:                        /* other info */
        if (msg_verbose)
            msg_info("SASL authentication info: %s", message);
        break;
-#if SASL_VERSION_MAJOR >= 2
+#ifdef SASL_LOG_FAIL
     case SASL_LOG_FAIL:                        /* authentication failures */
        msg_warn("SASL authentication failure: %s", message);
+       break;
+#endif
+#ifdef SASL_LOG_DEBUG
+    case SASL_LOG_DEBUG:
+       if (msg_verbose > 1)
+           msg_info("SASL authentication debug: %s", message);
+       break;
+#endif
+#ifdef SASL_LOG_TRACE
+    case SASL_LOG_TRACE:
+       if (msg_verbose > 1)
+           msg_info("SASL authentication trace: %s", message);
+       break;
+#endif
+#ifdef SASL_LOG_PASS
+    case SASL_LOG_PASS:
+       if (msg_verbose > 1)
+           msg_info("SASL authentication pass: %s", message);
+       break;
 #endif
     }
     return (SASL_OK);
index 93e0734259501bf8b0e4548a4142e0f43e73f69a..f96230ebae24461bf382a86c92cb12a1dd5974e1 100644 (file)
@@ -1832,7 +1832,7 @@ static void rcpt_reset(SMTPD_STATE *state)
     state->rcpt_overshoot = 0;
 }
 
-/* comment_sanitize - clesn up comment string */
+/* comment_sanitize - clean up comment string */
 
 static void comment_sanitize(VSTRING *comment_string)
 {
index 48cb4b4fc2328ed39edd759fbdbc24329f497d03..bf37f9c3351476c9218bc1b83ef5fc6a4cb43263 100644 (file)
@@ -29,7 +29,7 @@
 /*     same smtpd access map entry or rbl reply template is used
 /*     for both address and non-address information.
 /* .PP
-/*     No transformation is done when reporting a non-address DSN
+/*     A non-address DSN is not transformed
 /*     when reporting sender or recipient address status information,
 /*     as there are many legitimate instances of such usage.
 /*
@@ -96,6 +96,9 @@ const char *smtpd_dsn_fix(const char *status, const char *reply_class)
     struct dsn_map *dp;
     const char *result = status;
 
+    /*
+     * Update an address-specific DSN according to what is being rejected.
+     */
     if (ISDIGIT(status[0]) && strncmp(status + 1, ".1.", 3) == 0) {
 
        /*
@@ -134,7 +137,13 @@ const char *smtpd_dsn_fix(const char *status, const char *reply_class)
            msg_info("mapping DSN status %s into %s status %c%s",
                     status, reply_class, status[0], result + 1);
        return (result);
-    } else {
+    }
+
+    /*
+     * Don't update a non-address DSN. There are many legitimate uses for
+     * these while rejecting address or non-address information.
+     */
+    else {
        return (status);
     }
 }
index 1869b3c72ea6947cdf02c43ca9ab19eba5e95e90..cd97b31773b355387493668c069b7374e4ad021e 100644 (file)
@@ -165,18 +165,36 @@ static int smtpd_sasl_log(void *unused_context, int priority,
                                  const char *message)
 {
     switch (priority) {
-       case SASL_LOG_ERR:
-       case SASL_LOG_WARN:
+    case SASL_LOG_ERR:
+    case SASL_LOG_WARN:
        msg_warn("SASL authentication problem: %s", message);
        break;
     case SASL_LOG_NOTE:
        if (msg_verbose)
            msg_info("SASL authentication info: %s", message);
        break;
-#if SASL_VERSION_MAJOR >= 2
+#ifdef SASL_LOG_FAIL
     case SASL_LOG_FAIL:
        msg_warn("SASL authentication failure: %s", message);
        break;
+#endif
+#ifdef SASL_LOG_DEBUG
+    case SASL_LOG_DEBUG:
+       if (msg_verbose > 1)
+           msg_info("SASL authentication debug: %s", message);
+       break;
+#endif
+#ifdef SASL_LOG_TRACE
+    case SASL_LOG_TRACE:
+       if (msg_verbose > 1)
+           msg_info("SASL authentication trace: %s", message);
+       break;
+#endif
+#ifdef SASL_LOG_PASS
+    case SASL_LOG_PASS:
+       if (msg_verbose > 1)
+           msg_info("SASL authentication pass: %s", message);
+       break;
 #endif
     }
     return SASL_OK;