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)
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?
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).
.SH "STANDARDS"
.na
.nf
-None.
+RFC 3463 (Enhanced Status Codes)
.SH DIAGNOSTICS
.ad
.fi
*/
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,
/* 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).
/*
/*
* 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);
}
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);
}
extern char *var_myhostname;
#define VAR_MYDOMAIN "mydomain" /* my domain name */
+#define DEF_MYDOMAIN "localdomain"
extern char *var_mydomain;
/*
* 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"
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);
state->rcpt_overshoot = 0;
}
-/* comment_sanitize - clesn up comment string */
+/* comment_sanitize - clean up comment string */
static void comment_sanitize(VSTRING *comment_string)
{
/* 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.
/*
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) {
/*
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);
}
}
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;