From 539bd6df8f55d2b89a5e100946041e3fc1a60ff1 Mon Sep 17 00:00:00 2001
From: Wietse Venema
Turn on client-side SASL authentication, and specify a table with -per-host or per-destination username and password information. +
Turn on client-side SASL authentication, and specify a table +with per-host or per-destination username and password information. Postfix first looks up the server hostname; if no entry is found, -then Postfix looks up the destination domain name (usually, the -right-hand part of an email address).
+then Postfix looks up the destination domain name. Usually, this +is the right-hand part of an email address, but it can also be a +hostname or address enclosed in [], with an optional ":port", as +specified with relayhost in with transport_maps.diff --git a/postfix/html/postconf.5.html b/postfix/html/postconf.5.html index e70eb9994..efdedf980 100644 --- a/postfix/html/postconf.5.html +++ b/postfix/html/postconf.5.html @@ -5994,6 +5994,8 @@ auth, etc.) that the SMTP client will ignore in the EHLO response from a remote SMTP server. See smtp_discard_ehlo_keywords for details. +@@ -454,8 +456,10 @@ right-hand part of an email address). smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd /etc/postfix/sasl_passwd: - foo.com username:password - bar.com username + foo.com username:password + bar.com username + [mail.myisp.net] username:password + [mail.myisp.net]:submission username:password
This feature is available in Postfix 2.2 and later.
+ @@ -6004,6 +6006,8 @@ details. auth, etc.) that the SMTP client will ignore in the EHLO response from a remote SMTP server. +This feature is available in Postfix 2.2 and later.
+Notes:
This feature is available in Postfix 2.2 and later.
+ @@ -7477,6 +7483,8 @@ to a remote SMTP client. See Enabling SASL authentication in the Postfix SMTP client -Turn on client-side SASL authentication, and specify a table with -per-host or per-destination username and password information. +
Turn on client-side SASL authentication, and specify a table +with per-host or per-destination username and password information. Postfix first looks up the server hostname; if no entry is found, -then Postfix looks up the destination domain name (usually, the -right-hand part of an email address).
+then Postfix looks up the destination domain name. Usually, this +is the right-hand part of an email address, but it can also be a +hostname or address enclosed in [], with an optional ":port", as +specified with relayhost in with transport_maps.diff --git a/postfix/proto/postconf.proto b/postfix/proto/postconf.proto index 549bbc312..18bddab76 100644 --- a/postfix/proto/postconf.proto +++ b/postfix/proto/postconf.proto @@ -7616,6 +7616,8 @@ and virtual_alias_maps. auth, etc.) that the SMTP client will ignore in the EHLO response from a remote SMTP server. +@@ -454,8 +456,10 @@ right-hand part of an email address). smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd /etc/postfix/sasl_passwd: - foo.com username:password - bar.com username + foo.com username:password + bar.com username + [mail.myisp.net] username:password + [mail.myisp.net]:submission username:password
This feature is available in Postfix 2.2 and later.
+Notes:
This feature is available in Postfix 2.2 and later.
+Notes:
Lookup tables, indexed by the remote SMTP server address, with @@ -7653,6 +7658,8 @@ auth, etc.) that the SMTP client will ignore in the EHLO response from a remote SMTP server. See smtp_discard_ehlo_keywords for details.
+This feature is available in Postfix 2.2 and later.
+ %PARAM smtpd_discard_ehlo_keyword_address_mapsLookup tables, indexed by the remote SMTP client address, with @@ -7661,6 +7668,8 @@ auth, etc.) that the SMTP server will not send in the EHLO response to a remote SMTP client. See smtpd_discard_ehlo_keywords for details.
+This feature is available in Postfix 2.2 and later.
+ %PARAM connection_cache_service scacheThe name of the scache(8) connection cache service. This service diff --git a/postfix/src/cleanup/cleanup_envelope.c b/postfix/src/cleanup/cleanup_envelope.c index e4b31661c..8396e10aa 100644 --- a/postfix/src/cleanup/cleanup_envelope.c +++ b/postfix/src/cleanup/cleanup_envelope.c @@ -298,6 +298,7 @@ static void cleanup_envelope_process(CLEANUP_STATE *state, int type, msg_warn("%s: message rejected: bad rewriting context: %.100s", state->queue_id, attr_value); state->errs |= CLEANUP_STAT_BAD; + myfree(sbuf); return; } } diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 0914990ea..b6236a6c9 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 "20050422" +#define MAIL_RELEASE_DATE "20050426" #define MAIL_VERSION_NUMBER "2.3" #define VAR_MAIL_VERSION "mail_version" diff --git a/postfix/src/smtp/smtp_connect.c b/postfix/src/smtp/smtp_connect.c index 74b8d51a8..73fecccc2 100644 --- a/postfix/src/smtp/smtp_connect.c +++ b/postfix/src/smtp/smtp_connect.c @@ -568,7 +568,6 @@ int smtp_connect(SMTP_STATE *state) (*(cpp) && (cpp) >= (sites)->argv + (non_fallback_sites)) for (cpp = sites->argv; SMTP_RCPT_LEFT(state) > 0 && (dest = *cpp) != 0; cpp++) { - state->final_server = (cpp[1] == 0); /* * Parse the destination. Default is to use the SMTP port. Look up @@ -593,7 +592,11 @@ int smtp_connect(SMTP_STATE *state) /* XXX We could be an MX host for this destination... */ } else { addr_list = smtp_domain_addr(domain, misc_flags, why, &i_am_mx); + /* If we're MX host, don't connect to non-MX backups. */ + if (i_am_mx) + cpp[1] = 0; } + state->final_server = (cpp[1] == 0); /* * When session caching is enabled, store the first good session for @@ -683,8 +686,7 @@ int smtp_connect(SMTP_STATE *state) if ((state->session = session) != 0) { if (++sess_count == var_smtp_mxsess_limit) next = 0; - state->final_server = (next == 0 && (cpp[1] == 0 || (i_am_mx - && IS_FALLBACK_RELAY(cpp + 1, sites, non_fallback_sites)))); + state->final_server = (cpp[1] == 0 && next == 0); if (addr->pref == domain_best_pref) session->features |= SMTP_FEATURE_BEST_MX; if ((session->features & SMTP_FEATURE_FROM_CACHE) != 0