From b8299e028cf0b31433ca84e789f46d3b29d1f4fa Mon Sep 17 00:00:00 2001
From: Wietse Venema
Date: Mon, 12 Mar 2007 00:00:00 -0500
Subject: [PATCH] postfix-2.4.0-RC5
---
postfix/HISTORY | 18 ++
postfix/README_FILES/SASL_README | 158 ++++++++++--------
postfix/README_FILES/TUNING_README | 2 +-
postfix/TODO | 4 +
postfix/conf/access | 79 +++++----
postfix/conf/aliases | 4 +-
postfix/conf/canonical | 15 +-
postfix/conf/header_checks | 227 ++++++++++++-------------
postfix/conf/virtual | 103 ++++++------
postfix/html/SASL_README.html | 182 ++++++++++----------
postfix/html/TUNING_README.html | 23 +--
postfix/html/access.5.html | 79 +++++----
postfix/html/aliases.5.html | 4 +-
postfix/html/bounce.5.html | 4 +-
postfix/html/canonical.5.html | 15 +-
postfix/html/cidr_table.5.html | 1 -
postfix/html/header_checks.5.html | 229 +++++++++++++-------------
postfix/html/postconf.5.html | 5 +-
postfix/html/virtual.5.html | 101 ++++++------
postfix/man/man5/access.5 | 22 +--
postfix/man/man5/aliases.5 | 4 +-
postfix/man/man5/bounce.5 | 3 +-
postfix/man/man5/canonical.5 | 14 +-
postfix/man/man5/cidr_table.5 | 1 -
postfix/man/man5/header_checks.5 | 5 +-
postfix/man/man5/postconf.5 | 5 +-
postfix/man/man5/virtual.5 | 7 +
postfix/proto/SASL_README.html | 182 ++++++++++----------
postfix/proto/TUNING_README.html | 3 +-
postfix/proto/access | 22 +--
postfix/proto/aliases | 4 +-
postfix/proto/bounce | 3 +-
postfix/proto/canonical | 14 +-
postfix/proto/cidr_table | 1 -
postfix/proto/header_checks | 5 +-
postfix/proto/postconf.proto | 5 +-
postfix/proto/virtual | 7 +
postfix/src/cleanup/cleanup_init.c | 2 +-
postfix/src/cleanup/cleanup_message.c | 2 +-
postfix/src/cleanup/cleanup_out.c | 3 +-
postfix/src/global/mail_version.h | 4 +-
postfix/src/smtp/Makefile.in | 44 +----
postfix/src/smtp/legacy.c | 205 -----------------------
postfix/src/smtp/levels.c | 194 ----------------------
postfix/src/smtp/smtp_proto.c | 9 +-
postfix/src/util/attr_print0.c | 2 +-
postfix/src/util/attr_print64.c | 2 +-
postfix/src/util/attr_print_plain.c | 2 +-
postfix/src/util/sane_accept.c | 6 +-
49 files changed, 861 insertions(+), 1174 deletions(-)
delete mode 100644 postfix/src/smtp/legacy.c
delete mode 100644 postfix/src/smtp/levels.c
diff --git a/postfix/HISTORY b/postfix/HISTORY
index b1fa92ed0..0ed26a406 100644
--- a/postfix/HISTORY
+++ b/postfix/HISTORY
@@ -13321,6 +13321,24 @@ Apologies for any names omitted.
reported "illegal seek" instead of "file too large". File:
postdrop/postdrop.c.
+20070310
+
+ Cleanup: specify "undisclosed_recipients_header =" to disable
+ Postfix's "To: undisclosed-recipients:;" header for mail
+ that lists no recipient. The To: header is not required as
+ of RFC 2822. The undisclosed_recipients_header parameter
+ value can now be an empty string, a value that was not
+ allowed with earlier Postfix versions. With Postfix 2.5 it
+ will be empty by default. Files: cleanup/cleanup.c,
+ cleanup/cleanup_message.c.
+
+20070312
+
+ Backwards compatibility: don't pad short message header
+ records when Milter support is turned off. This maintains
+ compatibility with Postfix versions that pre-date Milter
+ support. File: cleanup/cleanup_out.c.
+
Wish list:
Update message content length when adding/removing headers.
diff --git a/postfix/README_FILES/SASL_README b/postfix/README_FILES/SASL_README
index 5cf940db4..efc0eebfe 100644
--- a/postfix/README_FILES/SASL_README
+++ b/postfix/README_FILES/SASL_README
@@ -86,18 +86,18 @@ Notes:
BBuuiillddiinngg tthhee CCyyrruuss SSAASSLL lliibbrraarryy
-Postfix appears to work with cyrus-sasl-1.5.5 or cyrus-sasl-2.1.1, which are
+Postfix appears to work with cyrus-sasl-1.5.x or cyrus-sasl-2.1.x, which are
available from:
ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/
IMPORTANT: if you install the Cyrus SASL libraries as per the default, you will
-have to symlink /usr/lib/sasl -> /usr/local/lib/sasl for version 1.5.5 or /usr/
-lib/sasl2 -> /usr/local/lib/sasl2 for version 2.1.1.
+have to symlink /usr/lib/sasl -> /usr/local/lib/sasl for version 1.5.x or /usr/
+lib/sasl2 -> /usr/local/lib/sasl2 for version 2.1.x.
-Reportedly, Microsoft Internet Explorer version 5 requires the non-standard
-SASL LOGIN authentication method. To enable this authentication method, specify
-``./configure --enable-login''.
+Reportedly, Microsoft Outlook (Express) requires the non-standard LOGIN
+authentication method. To enable this authentication method, specify ``./
+configure --enable-login''.
BBuuiillddiinngg PPoossttffiixx wwiitthh CCyyrruuss SSAASSLL ssuuppppoorrtt
@@ -106,13 +106,13 @@ include, and that the Cyrus SASL libraries are in /usr/local/lib.
On some systems this generates the necessary Makefile definitions:
-(for Cyrus SASL version 1.5.5):
+(for Cyrus SASL version 1.5.x):
% make tidy # if you have left-over files from a previous build
% make makefiles CCARGS="-DUSE_SASL_AUTH -DUSE_CYRUS_SASL \
-I/usr/local/include" AUXLIBS="-L/usr/local/lib -lsasl"
-(for Cyrus SASL version 2.1.1):
+(for Cyrus SASL version 2.1.x):
% make tidy # if you have left-over files from a previous build
% make makefiles CCARGS="-DUSE_SASL_AUTH -DUSE_CYRUS_SASL \
@@ -121,14 +121,14 @@ On some systems this generates the necessary Makefile definitions:
On Solaris 2.x you need to specify run-time link information, otherwise ld.so
will not find the SASL shared library:
-(for Cyrus SASL version 1.5.5):
+(for Cyrus SASL version 1.5.x):
% make tidy # if you have left-over files from a previous build
% make makefiles CCARGS="-DUSE_SASL_AUTH -DUSE_CYRUS_SASL \
-I/usr/local/include" AUXLIBS="-L/usr/local/lib \
-R/usr/local/lib -lsasl"
-(for Cyrus SASL version 2.1.1):
+(for Cyrus SASL version 2.1.x):
% make tidy # if you have left-over files from a previous build
% make makefiles CCARGS="-DUSE_SASL_AUTH -DUSE_CYRUS_SASL \
@@ -158,8 +158,8 @@ Note: the SASL login names will be shared with the entire world.
Older Microsoft SMTP client software implements a non-standard version of the
AUTH protocol syntax, and expects that the SMTP server replies to EHLO with
-"250 AUTH=stuff" instead of "250 AUTH stuff". To accommodate such clients (in
-addition to conformant clients) use the following:
+"250 AUTH=mechanism-list" instead of "250 AUTH mechanism-list". To accommodate
+such clients (in addition to conformant clients) use the following:
/etc/postfix/main.cf:
broken_sasl_auth_clients = yes
@@ -201,71 +201,83 @@ authentication server.
CCyyrruuss SSAASSLL ccoonnffiigguurraattiioonn ffoorr tthhee PPoossttffiixx SSMMTTPP sseerrvveerr
-In /usr/local/lib/sasl/smtpd.conf (Cyrus SASL version 1.5.5) or /usr/local/lib/
-sasl2/smtpd.conf (Cyrus SASL version 2.1.1) you need to specify how the server
-should validate client passwords.
+You need to configure how the Cyrus SASL library should authenticate a client's
+username and password. These settings must be stored in a separate
+configuration file.
+
+The name of the configuration file (default: smtpd.conf) will be constructed
+from a value sent by Postfix to the Cyrus SASL library, which adds the suffix
+.conf. The value is configured using one of the following variables:
+
+ /etc/postfix/main.cf:
+ # Postfix 2.3 and later
+ smtpd_sasl_path = smtpd
+ # Postfix < 2.3
+ smtpd_sasl_application_name = smtpd
+
+Cyrus SASL searches for the configuration file in /usr/local/lib/sasl/ (Cyrus
+SASL version 1.5.5) or /usr/local/lib/sasl2/ (Cyrus SASL version 2.1.x).
Note: some Postfix distributions are modified and look for the smtpd.conf file
-in /etc/postfix.
+in /etc/postfix/sasl.
Note: some Cyrus SASL distributions look for the smtpd.conf file in /etc/sasl2.
- * To authenticate against the UNIX password database, try:
+ * To authenticate against the UNIX password database, use:
- (Cyrus SASL version 1.5.5)
+ (Cyrus SASL version 1.5.x)
/usr/local/lib/sasl/smtpd.conf:
pwcheck_method: pwcheck
- (Cyrus SASL version 2.1.1)
-
- /usr/local/lib/sasl2/smtpd.conf:
- pwcheck_method: pwcheck
-
- The name of the file in /usr/local/lib/sasl (Cyrus SASL version 1.5.5) or /
- usr/local/lib/sasl2 (Cyrus SASL version 2.1.1) used by the SASL library for
- configuration can be set with:
-
- /etc/postfix/main.cf:
- smtpd_sasl_application_name = smtpd (Postfix < 2.3)
- smtpd_sasl_path = smtpd (Postfix 2.3 and later)
-
- The pwcheck daemon is contained in the cyrus-sasl source tarball.
-
- IMPORTANT: postfix processes need to have group read+execute permission for
- the /var/pwcheck directory, otherwise authentication attempts will fail.
+ IMPORTANT: pwcheck establishes a UNIX domain socket in /var/pwcheck and
+ waits for authentication requests. Postfix processes must have
+ read+execute permission to this directory or authentication attempts
+ will fail.
- * Alternately, in Cyrus SASL 1.5.26 and later (including 2.1.1), try:
+ The pwcheck daemon is contained in the cyrus-sasl source tarball.
(Cyrus SASL version 1.5.26)
/usr/local/lib/sasl/smtpd.conf:
pwcheck_method: saslauthd
- (Cyrus SASL version 2.1.1)
+ (Cyrus SASL version 2.1.x)
/usr/local/lib/sasl2/smtpd.conf:
pwcheck_method: saslauthd
+ mech_list: PLAIN LOGIN
The saslauthd daemon is also contained in the cyrus-sasl source tarball. It
is more flexible than the pwcheck daemon, in that it can authenticate
against PAM and various other sources. To use PAM, start saslauthd with "-
a pam".
+ IMPORTANT: saslauthd usually establishes a UNIX domain socket in /var/run/
+ saslauthd and waits for authentication requests. postfix processes must
+ have read+execute permission to this directory or authentication attempts
+ will fail.
+
+ Note: The directory where saslauthd puts the socket is configurable. See
+ the command-line option "-m /path/to/socket" in the saslauthd --help
+ listing.
+
* To authenticate against Cyrus SASL's own password database:
- (Cyrus SASL version 1.5.5)
+ (Cyrus SASL version 1.5.x)
/usr/local/lib/sasl/smtpd.conf:
- pwcheck_method: sasldb
+ pwcheck_method: sasldb
- (Cyrus SASL version 2.1.1)
+ (Cyrus SASL version 2.1.x)
/usr/local/lib/sasl2/smtpd.conf:
- pwcheck_method: auxprop
+ pwcheck_method: auxprop
+ auxprop_plugin: sasldb
+ mech_list: PLAIN LOGIN CRAM-MD5 DIGEST-MD5
This will use the Cyrus SASL password file (default: /etc/sasldb in version
- 1.5.5, or /etc/sasldb2 in version 2.1.1), which is maintained with the
+ 1.5.x, or /etc/sasldb2 in version 2.1.x), which is maintained with the
saslpasswd or saslpasswd2 command (part of the Cyrus SASL software). On
some poorly-supported systems the saslpasswd command needs to be run
multiple times before it stops complaining. The Postfix SMTP server needs
@@ -279,17 +291,17 @@ Note: some Cyrus SASL distributions look for the smtpd.conf file in /etc/sasl2.
EXAMPLE:
- (Cyrus SASL version 1.5.5)
+ (Cyrus SASL version 1.5.x)
% saslpasswd -c -u `postconf -h myhostname` exampleuser
- (Cyrus SASL version 2.1.1)
+ (Cyrus SASL version 2.1.x)
% saslpasswd2 -c -u `postconf -h myhostname` exampleuser
You can find out SASL's idea about the realms of the users in sasldb with
- sasldblistusers (Cyrus SASL version 1.5.5) or sasldblistusers2 (Cyrus SASL
- version 2.1.1).
+ sasldblistusers (Cyrus SASL version 1.5.x) or sasldblistusers2 (Cyrus SASL
+ version 2.1.x).
On the Postfix side, you can have only one realm per smtpd instance, and
only the users belonging to that realm would be able to authenticate. The
@@ -298,21 +310,19 @@ Note: some Cyrus SASL distributions look for the smtpd.conf file in /etc/sasl2.
/etc/postfix/main.cf:
smtpd_sasl_local_domain = $myhostname
-IMPORTANT: all users must be able to authenticate using ALL authentication
-mechanisms advertised by Postfix, otherwise the negotiation might end up with
-an unsupported mechanism, and authentication would fail. For example if you
-configure SASL to use saslauthd for authentication against PAM (pluggable
-authentication modules), only the PLAIN and LOGIN mechanisms are supported and
-stand a chance to succeed, yet the SASL library would also advertise other
-mechanisms, such as DIGEST-MD5. This happens because those mechanisms are made
-available by other plugins, and the SASL library have no way to know that your
-only valid authentication source is PAM. Thus you might need to limit the list
-of mechanisms advertised by Postfix.
+IMPORTANT: The Cyrus SASL password verification services pwcheck and saslauthd
+can only support the plaintext mechanisms PLAIN or LOGIN. However, the Cyrus
+SASL library doesn't know this, and will happily advertise other authentication
+mechanisms that the SASL library implements, such as DIGEST-MD5. As a result,
+if an SMTP client chooses any mechanism other than PLAIN or LOGIN while pwcheck
+or saslauthd are used, authentication will fail. Thus you may need to limit the
+list of mechanisms advertised by Postfix.
* With older Cyrus SASL versions you remove the corresponding library files
from the SASL plug-in directory (and again whenever the system is updated).
- * With Cyrus SASL version 2.1.1 or later:
+ * With Cyrus SASL version 2.1.x or later the mech_list variable can specify a
+ list of authentication mechanisms that Cyrus SASL may offer:
/usr/local/lib/sasl2/smtpd.conf:
mech_list: plain login
@@ -320,14 +330,14 @@ of mechanisms advertised by Postfix.
For the same reasons you might want to limit the list of plugins used for
authentication.
- * With Cyrus SASL version 1.5.5 your only choice is to delete the
+ * With Cyrus SASL version 1.5.x your only choice is to delete the
corresponding library files from the SASL plug-in directory.
- * With SASL version 2.1.1:
+ * With SASL version 2.1.x:
/usr/local/lib/sasl2/smtpd.conf:
- pwcheck_method: auxprop
- auxprop_plugin: sql
+ pwcheck_method: auxprop
+ auxprop_plugin: sql
To run software chrooted with SASL support is an interesting exercise. It
probably is not worth the trouble.
@@ -371,15 +381,17 @@ base64-encoded form.
TTrroouubbllee sshhoooottiinngg tthhee SSAASSLL iinntteerrnnaallss
In the Cyrus SASL sources you'll find a subdirectory named "sample". Run make
-there, "su" to the user postfix (or whatever your mail_owner directive is set
-to):
+there, then create a symbolic link from sample.conf to smtpd.conf in your Cyrus
+SASL library directory /usr/local/lib/sasl2. "su" to the user postfix (or
+whatever your mail_owner directive is set to):
% su postfix
-then run the resulting sample server and client in separate terminals. Strace /
-ktrace / truss the server to see what makes it unhappy, and fix the problem.
-Repeat the previous step until you can successfully authenticate with the
-sample client. Only then get back to Postfix.
+then run the resulting sample server and client in separate terminals. The
+sample applications send log messages to the syslog facility auth. Check the
+log to fix the problem or run strace / ktrace / truss on the server to see what
+makes it unhappy. Repeat the previous step until you can successfully
+authenticate with the sample client. Only then get back to Postfix.
EEnnaabblliinngg SSAASSLL aauutthheennttiiccaattiioonn iinn tthhee PPoossttffiixx SSMMTTPP cclliieenntt
@@ -401,6 +413,11 @@ that is specified with the relayhost parameter or with a transport(5) table.
[mail.myisp.net] username:password
[mail.myisp.net]:submission username:password
+The Postfix SASL client password file is opened before the SMTP server enters
+the optional chroot jail, so you can keep the file in /etc/postfix and set
+permissions read / write only for root to keep the username:password
+combinations away from other system users.
+
Postfix version 2.3 supports-per-sender SASL password information. To search
the Postfix SASL password by sender before it searches by destination, specify:
@@ -424,9 +441,6 @@ plaintext authentication specify, for example:
/etc/postfix/main.cf:
smtp_sasl_security_options = noanonymous
-The Postfix SASL client password file is opened before the SMTP server enters
-the optional chroot jail, so you can keep the file in /etc/postfix.
-
Note: Some SMTP servers support authentication mechanisms that, although
available on the client system, may not in practice work or possess the
appropriate credentials to authenticate to the server. It is possible via the
@@ -437,7 +451,7 @@ mechanisms that the smtp(8) client will take into consideration:
smtp_sasl_mechanism_filter = !gssapi, !external, static:all
In the above example, Postfix will decline to use mechanisms that require
-special infrastructure such as Kerberos.
+special infrastructure such as Kerberos or TLS.
The Postfix SMTP client is backwards compatible with SMTP servers that use the
non-standard "AUTH=method..." syntax in response to the EHLO command; there is
@@ -458,4 +472,6 @@ CCrreeddiittss
smtpd_sasl_path.
* The Dovecot SMTP server-only plug-in was originally implemented by Timo
Sirainen of Procontrol, Finland.
+ * Patrick Ben Koetter revised this document for Postfix 2.4 and made much
+ needed updates.
diff --git a/postfix/README_FILES/TUNING_README b/postfix/README_FILES/TUNING_README
index c544ffc2a..000f98d21 100644
--- a/postfix/README_FILES/TUNING_README
+++ b/postfix/README_FILES/TUNING_README
@@ -141,7 +141,7 @@ Postfix version 2.0 and earlier:
MMeeaassuurreess aaggaaiinnsstt cclliieennttss tthhaatt mmaakkee ttoooo mmaannyy ccoonnnneeccttiioonnss
-Note: this feature is not included with Postfix version 2.1.
+Note: the anvil(8) service was introduced with Postfix version 2.2.
The Postfix smtpd(8) server can limit the number of simultaneous connections
from the same SMTP client, as well as the number of connections that a client
diff --git a/postfix/TODO b/postfix/TODO
index 843574f18..2b036642d 100644
--- a/postfix/TODO
+++ b/postfix/TODO
@@ -17,3 +17,7 @@ What needs to be done before Postfix 2.4.0 is finished:
- Remove MacOS X examples. They have not been updated.
- Is "postmap -qf" still needed with regexp/pcre maps?
+
+- Update TUNING_README smtpd_client_*_limit feature list (add TLS).
+
+- Update TUNING_README file descriptor tuning.
diff --git a/postfix/conf/access b/postfix/conf/access
index 2e26b50b6..54bc7188e 100644
--- a/postfix/conf/access
+++ b/postfix/conf/access
@@ -11,11 +11,12 @@
# postmap -q - /etc/postfix/access
- Postfix appears to work with cyrus-sasl-1.5.5 or cyrus-sasl-2.1.1,
+
Postfix appears to work with cyrus-sasl-1.5.x or cyrus-sasl-2.1.x,
which are available from:
@@ -160,11 +160,11 @@ which are available from:
IMPORTANT: if you install the Cyrus SASL libraries as per the
default, you will have to symlink /usr/lib/sasl -> /usr/local/lib/sasl
-for version 1.5.5 or /usr/lib/sasl2 -> /usr/local/lib/sasl2 for
-version 2.1.1.
+for version 1.5.x or /usr/lib/sasl2 -> /usr/local/lib/sasl2 for
+version 2.1.x.
- Reportedly, Microsoft Internet Explorer version 5 requires the
-non-standard SASL LOGIN authentication method. To enable this
+
Reportedly, Microsoft Outlook (Express) requires the
+non-standard LOGIN authentication method. To enable this
authentication method, specify ``./configure --enable-login''.
@@ -178,7 +178,7 @@ and that the Cyrus SASL libraries are in /usr/local/lib.
-- (for Cyrus SASL version 1.5.5):
+
- (for Cyrus SASL version 1.5.x):
-
% make tidy # if you have left-over files from a previous build
@@ -186,7 +186,7 @@ and that the Cyrus SASL libraries are in /usr/local/lib.
-I/usr/local/include" AUXLIBS="-L/usr/local/lib -lsasl"
- - (for Cyrus SASL version 2.1.1):
+
- (for Cyrus SASL version 2.1.x):
-
% make tidy # if you have left-over files from a previous build
@@ -201,7 +201,7 @@ otherwise ld.so will not find the SASL shared library:
-- (for Cyrus SASL version 1.5.5):
+
- (for Cyrus SASL version 1.5.x):
-
% make tidy # if you have left-over files from a previous build
@@ -210,7 +210,7 @@ otherwise ld.so will not find the SASL shared library:
-R/usr/local/lib -lsasl"
- - (for Cyrus SASL version 2.1.1):
+
- (for Cyrus SASL version 2.1.x):
-
% make tidy # if you have left-over files from a previous build
@@ -258,8 +258,9 @@ SMTP server
Older Microsoft SMTP client software implements a non-standard
version of the AUTH protocol syntax, and expects that the SMTP
-server replies to EHLO with "250 AUTH=stuff" instead of "250 AUTH
-stuff". To accommodate such clients (in addition to conformant
+server replies to EHLO with "250 AUTH=mechanism-list" instead of
+"250 AUTH mechanism-list". To accommodate such clients (in addition
+to conformant
clients) use the following:
@@ -318,22 +319,41 @@ the Dovecot authentication server.
- In /usr/local/lib/sasl/smtpd.conf (Cyrus SASL version 1.5.5) or
-/usr/local/lib/sasl2/smtpd.conf (Cyrus SASL version 2.1.1) you need to
-specify how the server should validate client passwords.
+ You need to configure how the Cyrus SASL library should
+authenticate a client's username and password. These settings must
+be stored in a separate configuration file.
+
+ The name of the configuration file (default: smtpd.conf) will
+be constructed from a value sent by Postfix to the Cyrus SASL
+library, which adds the suffix .conf. The value is configured using
+one of the following variables:
+
+
+
+/etc/postfix/main.cf:
+ # Postfix 2.3 and later
+ smtpd_sasl_path = smtpd
+ # Postfix < 2.3
+ smtpd_sasl_application_name = smtpd
+
+
+
+ Cyrus SASL searches for the configuration file in /usr/local/lib/sasl/
+(Cyrus SASL version 1.5.5) or /usr/local/lib/sasl2/ (Cyrus SASL
+version 2.1.x).
Note: some Postfix distributions are modified and look for
-the smtpd.conf file in /etc/postfix.
+the smtpd.conf file in /etc/postfix/sasl.
Note: some Cyrus SASL distributions look for the smtpd.conf
file in /etc/sasl2.
--
To authenticate against the UNIX password database, try:
+ -
To authenticate against the UNIX password database, use:
-- (Cyrus SASL version 1.5.5)
+
- (Cyrus SASL version 1.5.x)
-
/usr/local/lib/sasl/smtpd.conf:
@@ -341,39 +361,13 @@ file in /etc/sasl2.
- - (Cyrus SASL version 2.1.1)
-
-
-
-/usr/local/lib/sasl2/smtpd.conf:
- pwcheck_method: pwcheck
-
-
-
-
- The name of the file in /usr/local/lib/sasl (Cyrus SASL version
-1.5.5) or /usr/local/lib/sasl2 (Cyrus SASL version 2.1.1) used by
-the SASL
-library for configuration can be set with:
-
-
-
-/etc/postfix/main.cf:
- smtpd_sasl_application_name = smtpd (Postfix < 2.3)
- smtpd_sasl_path = smtpd (Postfix 2.3 and later)
-
-
+ IMPORTANT: pwcheck establishes a UNIX domain socket in /var/pwcheck
+and waits for authentication requests. Postfix processes must have
+read+execute permission to this directory or authentication attempts
+will fail.
The pwcheck daemon is contained in the cyrus-sasl source tarball.
- IMPORTANT: postfix processes need to have group read+execute
-permission for the /var/pwcheck directory, otherwise authentication
-attempts will fail.
-
- -
Alternately, in Cyrus SASL 1.5.26 and later (including
-2.1.1), try:
-
-
-
- (Cyrus SASL version 1.5.26)
-
@@ -381,11 +375,12 @@ attempts will fail.
pwcheck_method: saslauthd
- - (Cyrus SASL version 2.1.1)
+
- (Cyrus SASL version 2.1.x)
-
/usr/local/lib/sasl2/smtpd.conf:
pwcheck_method: saslauthd
+ mech_list: PLAIN LOGIN
@@ -395,27 +390,38 @@ tarball. It is more flexible than the pwcheck daemon, in that it
can authenticate against PAM and various other sources. To use PAM,
start saslauthd with "-a pam".
+ IMPORTANT: saslauthd usually establishes a UNIX domain socket
+in /var/run/saslauthd and waits for authentication requests. postfix
+processes must have read+execute permission to this directory or
+authentication attempts will fail.
+
+ Note: The directory where saslauthd puts the socket is configurable.
+See the command-line option "-m /path/to/socket" in the saslauthd
+--help listing.
+
-
To authenticate against Cyrus SASL's own password database:
-- (Cyrus SASL version 1.5.5)
+
- (Cyrus SASL version 1.5.x)
-
/usr/local/lib/sasl/smtpd.conf:
- pwcheck_method: sasldb
+ pwcheck_method: sasldb
- - (Cyrus SASL version 2.1.1)
+
- (Cyrus SASL version 2.1.x)
-
/usr/local/lib/sasl2/smtpd.conf:
- pwcheck_method: auxprop
+ pwcheck_method: auxprop
+ auxprop_plugin: sasldb
+ mech_list: PLAIN LOGIN CRAM-MD5 DIGEST-MD5
This will use the Cyrus SASL password file (default: /etc/sasldb in
-version 1.5.5, or /etc/sasldb2 in version 2.1.1), which is maintained
+version 1.5.x, or /etc/sasldb2 in version 2.1.x), which is maintained
with the saslpasswd or saslpasswd2 command (part of the Cyrus SASL
software). On some poorly-supported systems the saslpasswd command needs
to be run multiple times before it stops complaining. The Postfix SMTP
@@ -430,13 +436,13 @@ domain (realm) to a fully qualified domain name.
EXAMPLE:
-- (Cyrus SASL version 1.5.5)
+
- (Cyrus SASL version 1.5.x)
-
% saslpasswd -c -u `postconf -h myhostname` exampleuser
- - (Cyrus SASL version 2.1.1)
+
- (Cyrus SASL version 2.1.x)
-
% saslpasswd2 -c -u `postconf -h myhostname` exampleuser
@@ -445,8 +451,8 @@ domain (realm) to a fully qualified domain name.
You can find out SASL's idea about the realms of the users
-in sasldb with sasldblistusers (Cyrus SASL version 1.5.5) or
-sasldblistusers2 (Cyrus SASL version 2.1.1).
+in sasldb with sasldblistusers (Cyrus SASL version 1.5.x) or
+sasldblistusers2 (Cyrus SASL version 2.1.x).
On the Postfix side, you can have only one realm per smtpd
instance, and only the users belonging to that realm would be able to
@@ -462,18 +468,14 @@ realm used by smtpd:
- IMPORTANT: all users must be able to authenticate using ALL
-authentication mechanisms advertised by Postfix, otherwise the
-negotiation might end up with an unsupported mechanism, and
-authentication would fail. For example if you configure SASL to
-use saslauthd for authentication against PAM (pluggable
-authentication modules), only the PLAIN and LOGIN mechanisms are
-supported and stand a chance to succeed, yet the SASL library would also
-advertise other mechanisms, such as DIGEST-MD5. This happens because
-those mechanisms are made available by other plugins, and the SASL
-library have no way to know that your only valid authentication source
-is PAM. Thus you might need to limit the list of mechanisms advertised
-by Postfix.
+ IMPORTANT: The Cyrus SASL password verification services pwcheck
+and saslauthd can only support the plaintext mechanisms PLAIN or
+LOGIN. However, the Cyrus SASL library doesn't know this, and will
+happily advertise other authentication mechanisms that the SASL
+library implements, such as DIGEST-MD5. As a result, if an SMTP
+client chooses any mechanism other than PLAIN or LOGIN while pwcheck
+or saslauthd are used, authentication will fail. Thus you may need
+to limit the list of mechanisms advertised by Postfix.
+ The Postfix SASL client password file is opened before the SMTP
+server enters the optional chroot jail, so you can keep the file
+in /etc/postfix and set permissions read / write only for root to
+keep the username:password combinations away from other system
+users.
+
Postfix version 2.3 supports-per-sender SASL password
information. To search the Postfix SASL password by sender
before it searches by destination, specify:
@@ -645,10 +658,6 @@ for example:
- The Postfix SASL client password file is opened before the SMTP server
-enters the optional chroot jail, so you can keep the file in
-/etc/postfix.
-
Note: Some SMTP servers support authentication mechanisms that,
although available on the client system, may not in practice work or
possess the appropriate credentials to authenticate to the server. It
@@ -664,7 +673,7 @@ into consideration:
In the above example, Postfix will decline to use mechanisms
-that require special infrastructure such as Kerberos.
+that require special infrastructure such as Kerberos or TLS.
The Postfix SMTP client is backwards compatible with SMTP
servers that use the non-standard "AUTH=method..." syntax in response
@@ -694,6 +703,9 @@ smtpd_sasl_application_name into smtpd
- The Dovecot SMTP server-only plug-in was originally implemented by
Timo Sirainen of Procontrol, Finland.
+
- Patrick Ben Koetter revised this document for Postfix 2.4 and
+made much needed updates.
+