2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-08-30 05:38:06 +00:00

postfix-2.3-20050517

This commit is contained in:
Wietse Venema 2005-05-17 00:00:00 -05:00 committed by Viktor Dukhovni
parent bb1d259c3e
commit aac8d9207b
13 changed files with 84 additions and 24 deletions

View 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)

View 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?

View 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).

View 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

View 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,

View 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).
/*

View 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);
}

View 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;
/*

View 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"

View 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);

View 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)
{

View 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);
}
}

View 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;