From: Wietse Venema
Date: Tue, 20 Dec 2005 05:00:00 +0000 (-0500)
Subject: postfix-2.3-20051220
X-Git-Tag: v2.3-RC1~33
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8216a9e46519a412b11b4b62b919a13243da735b;p=thirdparty%2Fpostfix.git
postfix-2.3-20051220
---
diff --git a/postfix/.indent.pro b/postfix/.indent.pro
index 1dea5debd..785f16784 100644
--- a/postfix/.indent.pro
+++ b/postfix/.indent.pro
@@ -44,6 +44,9 @@
-TCRYPTO_EX_DATA
-TCTABLE
-TCTABLE_ENTRY
+-TXSASL_CYRUS_CLIENT
+-TXSASL_CYRUS_ERROR_INFO
+-TXSASL_CYRUS_SERVER
-TDELIVER_ATTR
-TDELIVER_REQUEST
-TDELTA_TIME
@@ -235,6 +238,12 @@
-TX509
-TX509_NAME
-TX509_STORE_CTX
+-TXSASL_CLIENT
+-TXSASL_CLIENT_IMPL
+-TXSASL_CLIENT_IMPL_INFO
+-TXSASL_SERVER
+-TXSASL_SERVER_IMPL
+-TXSASL_SERVER_IMPL_INFO
-Tregex_t
-Tregmatch_t
-Tsasl_conn_t
diff --git a/postfix/HISTORY b/postfix/HISTORY
index ebce17863..08c78ebbd 100644
--- a/postfix/HISTORY
+++ b/postfix/HISTORY
@@ -11549,7 +11549,7 @@ Apologies for any names omitted.
logic for address list and fallback relay processing.
Still need to simplify deferred recipient handling.
-20051210
+20051212
Bugfix: after a failed TLS session, the 20051210 SMTP client
code cleanup broke sessions with backup servers, causing the
@@ -11559,8 +11559,71 @@ Apologies for any names omitted.
was Ralf Hildebrandt, detectives Victor Duchovni and Wietse.
File: smtp/smtp_proto.c.
+20051213
+
+ Bugfix: *SQL, proxy and LDAP map types were not defined in
+ user-land commands such as postqueue. Leandro Santi. File:
+ postqueue/postqueue.c.
+
+20051212-14
+
+ Server-side plug-in interface for SASL authentication. This
+ uses Cyrus SASL by default, so nothing has changed except
+ error messages may be more informative. Files:
+ smtpd/smtpd_sasl_proto.c smtpd/smtpd_sasl_glue.c,
+ xsasl/xsasl_server.[hc], xsasl/cyrus_server.[hc]
+ xsasl/cyrus_strerror.c, xsasl/cyrus_log.c, xsasl/cyrus_security.c.
+
+20051215
+
+ Portability: IRIX 6.5.28 defines sa_len as a macro, so it
+ can't be used as a variable identifier. Zach McDanel. Files:
+ dns/dns_rr_to_sa.c, smtpd/smtpd_peer.c, qmqpd/qmqpd_peer.c.
+
+20051216
+
+ Cleanup: removed some scar tissue that was introduced with
+ server-side SASL plug-in support. Files: smtpd_sasl_proto.c,
+ smtpd_sasl_glue.c.
+
+ Client-side plug-in interface for SASL authentication. This
+ uses Cyrus SASL by default, so nothing has changed except
+ error messages may be more informative. Files: smtp_sasl_glue.c,
+ xsasl/xsasl_client.[hc], xsasl/cyrus_client.[hc].
+
+20051217
+
+ Bugfix: when a SASL client password is required by a specific
+ server, defer delivery when no server-announced mechanism
+ survives the smtp_sasl_mechanism_filter, instead of ignoring
+ the SASL announcement and trying to deliver the mail over
+ an unauthenticated connection and risking that mail will
+ be rejected. File: smtp/smtp_sasl_proto.c, smtp/smtp_proto.c.
+
+ Portability: zero the "struct msg" just in case. Both purify
+ (Linux) and valgrind (FreeBSD) complain about uninitialized
+ bits. Files: util/unix_{send,recv}_fd.c.
+
+20051219
+
+ Cleanup: generic smtpd_sasl_path, smtp_sasl_path and
+ lmtp_sasl_path configuration parameters; simplified the
+ SASL plug-in API, and made initial provisions for SASL
+ session encryption. Files: xsasl/*.[hc].
+
+ Feature: "postconf -a" lists the available SASL server
+ plug-in types, and "postconf -A" does the same for the
+ client. Files: postconf.c, xsasl_{client,server}.c.
+
+ Feature: new SMTPD policy attributes "encryption_protocol",
+ "encryption_cypher" and "encryption_keysize", to distinguish
+ plaintext from encrypted connections.
+
Open problems:
+ Reject numeric domains only when strict envelope syntax is
+ turned on.
+
"postsuper -r" no longer resets the message arrival time,
because pickup(8) no longer overrides queue file time stamp
information. This can be a problem when mail "on hold" is
diff --git a/postfix/Makefile.in b/postfix/Makefile.in
index a5a7ecdd4..9c9c7b38b 100644
--- a/postfix/Makefile.in
+++ b/postfix/Makefile.in
@@ -1,7 +1,7 @@
SHELL = /bin/sh
WARN = -Wmissing-prototypes -Wformat
OPTS = 'CC=$(CC)'
-DIRS = src/util src/global src/dns src/tls src/master src/postfix src/smtpstone \
+DIRS = src/util src/global src/dns src/tls src/xsasl src/master src/postfix src/smtpstone \
src/sendmail src/error src/pickup src/cleanup src/smtpd src/local \
src/trivial-rewrite src/qmgr src/oqmgr src/smtp src/bounce \
src/pipe src/showq src/postalias src/postcat src/postconf src/postdrop \
diff --git a/postfix/README_FILES/SASL_README b/postfix/README_FILES/SASL_README
index 86e0bfee6..da0e31b7d 100644
--- a/postfix/README_FILES/SASL_README
+++ b/postfix/README_FILES/SASL_README
@@ -6,9 +6,8 @@ WWAARRNNIINNGG
People who go to the trouble of installing Postfix may have the expectation
that Postfix is more secure than some other mailers. The Cyrus SASL library is
-a lot of code. With SASL authentication enabled in the Postfix SMTP client and
-SMTP server, Postfix becomes as secure as other mail systems that use the Cyrus
-SASL library.
+a lot of code. With this, Postfix becomes as secure as other mail systems that
+use the Cyrus SASL library.
HHooww PPoossttffiixx uusseess SSAASSLL aauutthheennttiiccaattiioonn iinnffoorrmmaattiioonn
@@ -21,14 +20,16 @@ method, and sender address to the maillog file, and optionally grants mail
access via the permit_sasl_authenticated UCE restriction.
When sending mail, Postfix can look up the server hostname or destination
-domain (the address right-hand part) in a table, and if a username/password is
-found, it will use that username and password to authenticate to the server.
+domain (the address right-hand part) in a Postfix SASL password table, and if a
+username/password is found, it will use that username and password to
+authenticate to the server. And as of version 2.3, Postfix can be configured to
+search its SASL password table by the sender email address.
This document covers the following topics:
* What SASL versions are supported
- * Building the SASL library
- * Building Postfix with SASL authentication support
+ * Building the Cyrus SASL library
+ * Building Postfix with Cyrus SASL support
* Enabling SASL authentication in the Postfix SMTP server
* Testing SASL authentication in the Postfix SMTP server
* Trouble shooting the SASL internals
@@ -37,27 +38,17 @@ This document covers the following topics:
WWhhaatt SSAASSLL vveerrssiioonnss aarree ssuuppppoorrtteedd
-Postfix+SASL 1.5.5 was seen working on RedHat 6.1 (pwcheck_method set to shadow
-or sasldb), Solaris 2.7 (pwcheck_method set to shadow or sasldb), and FreeBSD
-3.4 (pwcheck_method set to sasldb). On RedHat 6.1, SASL 1.5.5 insisted on write
-access to /etc/sasldb. Note that this seems to be related to the
-auto_transition switch in SASL. Note also that the Cyrus SASL documentation
-says that it is pointless to enable that if you use "sasldb" for
-"pwcheck_method". Later versions of the SASL 1.5.x series should also work.
+This document describes Postfix with Cyrus SASL version 1 and Cyrus SASL
+version 2. Postfix version 2.3 introduces has a plug-in mechanism for other
+SASL implementations. Support for other implementations is currently not part
+of the Postfix distribution and will be described elsewhere.
-Postfix+SASL 2.1.1 appears to work on Mandrake Linux 8.1 (pwcheck_method set to
-saslauthd or auxprop). Note that the 'auxprop' pwcheck_method replaces the
-'sasldb' method from SASL 1.5.x. Postfix may need write access to /etc/sasldb2
-if you use the auto_transition feature, or if you use an authentication
-mechanism such as OTP (one-time passwords) that needs to update secrets in the
-database.
-
-BBuuiillddiinngg tthhee SSAASSLL lliibbrraarryy
+BBuuiillddiinngg tthhee CCyyrruuss SSAASSLL lliibbrraarryy
Postfix appears to work with cyrus-sasl-1.5.5 or cyrus-sasl-2.1.1, which are
available from:
- ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/.
+ 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/
@@ -67,7 +58,7 @@ Reportedly, Microsoft Internet Explorer version 5 requires the non-standard
SASL LOGIN authentication method. To enable this authentication method, specify
``./configure --enable-login''.
-BBuuiillddiinngg PPoossttffiixx wwiitthh SSAASSLL aauutthheennttiiccaattiioonn ssuuppppoorrtt
+BBuuiillddiinngg PPoossttffiixx wwiitthh CCyyrruuss SSAASSLL ssuuppppoorrtt
To build Postfix with SASL authentication support, the following assumes that
the Cyrus SASL include files are in /usr/local/include, and that the Cyrus SASL
@@ -75,32 +66,34 @@ libraries are in /usr/local/lib.
On some systems this generates the necessary Makefile definitions:
-(for SASL version 1.5.5):
+(for Cyrus SASL version 1.5.5):
% make tidy # if you have left-over files from a previous build
- % make makefiles CCARGS="-DUSE_SASL_AUTH -I/usr/local/include" \
- AUXLIBS="-L/usr/local/lib -lsasl"
+ % make makefiles CCARGS="-DUSE_SASL_AUTH -DUSE_CYRUS_SASL \
+ -I/usr/local/include" AUXLIBS="-L/usr/local/lib -lsasl"
-(for SASL version 2.1.1):
+(for Cyrus SASL version 2.1.1):
% make tidy # if you have left-over files from a previous build
- % make makefiles CCARGS="-DUSE_SASL_AUTH -I/usr/local/include/sasl" \
- AUXLIBS="-L/usr/local/lib -lsasl2"
+ % make makefiles CCARGS="-DUSE_SASL_AUTH -DUSE_CYRUS_SASL \
+ -I/usr/local/include/sasl" AUXLIBS="-L/usr/local/lib -lsasl2"
On Solaris 2.x you need to specify run-time link information, otherwise ld.so
will not find the SASL shared library:
-(for SASL version 1.5.5):
+(for Cyrus SASL version 1.5.5):
% make tidy # if you have left-over files from a previous build
- % make makefiles CCARGS="-DUSE_SASL_AUTH -I/usr/local/include" \
- AUXLIBS="-L/usr/local/lib -R/usr/local/lib -lsasl"
+ % make makefiles CCARGS="-DUSE_SASL_AUTH -DUSE_CYRUS_SASL \
+ -I/usr/local/include" AUXLIBS="-L/usr/local/lib \
+ -R/usr/local/lib -lsasl"
-(for SASL version 2.1.1):
+(for Cyrus SASL version 2.1.1):
% make tidy # if you have left-over files from a previous build
- % make makefiles CCARGS="-DUSE_SASL_AUTH -I/usr/local/include/sasl" \
- AUXLIBS="-L/usr/local/lib -R/usr/local/lib -lsasl2"
+ % make makefiles CCARGS="-DUSE_SASL_AUTH -DUSE_CYRUS_SASL \
+ -I/usr/local/include/sasl" AUXLIBS="-L/usr/local/lib \
+ -R/usr/local/lib -lsasl2"
EEnnaabblliinngg SSAASSLL aauutthheennttiiccaattiioonn iinn tthhee PPoossttffiixx SSMMTTPP sseerrvveerr
@@ -123,76 +116,101 @@ and later):
Note: the SASL login names will be shared with the entire world.
-In /usr/local/lib/sasl/smtpd.conf (SASL version 1.5.5) or /usr/local/lib/sasl2/
-smtpd.conf (SASL version 2.1.1) you need to specify how the server should
-validate client passwords.
+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.
Note: some Postfix distributions are modified and look for the smtpd.conf file
in /etc/postfix.
-Note: some Cyrus SASL distributions are modified and look for the smtpd.conf
-file in /etc/sasl2.
+Note: some Cyrus SASL distributions look for the smtpd.conf file in /etc/sasl2.
-In order to authenticate against the UNIX password database, try:
+ * To authenticate against the UNIX password database, try:
-(SASL version 1.5.5)
+ (Cyrus SASL version 1.5.5)
- /usr/local/lib/sasl/smtpd.conf:
- pwcheck_method: pwcheck
+ /usr/local/lib/sasl/smtpd.conf:
+ pwcheck_method: pwcheck
-(SASL version 2.1.1)
+ (Cyrus SASL version 2.1.1)
- /usr/local/lib/sasl2/smtpd.conf:
- pwcheck_method: pwcheck
+ /usr/local/lib/sasl2/smtpd.conf:
+ pwcheck_method: pwcheck
-The name of the file in /usr/local/lib/sasl (SASL version 1.5.5) or /usr/local/
-lib/sasl2 (SASL version 2.1.1) used by the SASL library for configuration can
-be set with:
+ 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
+ /etc/postfix/main.cf:
+ smtpd_sasl_application_name = smtpd
+
+ 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)
+
+ /usr/local/lib/sasl/smtpd.conf:
+ pwcheck_method: saslauthd
+
+ (Cyrus SASL version 2.1.1)
-The pwcheck daemon is contained in the cyrus-sasl source tarball.
+ /usr/local/lib/sasl2/smtpd.conf:
+ pwcheck_method: saslauthd
-IMPORTANT: postfix processes need to have group read+execute permission for the
-/var/pwcheck directory, otherwise authentication attempts will fail.
+ 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".
-Alternately, in SASL 1.5.26 and later (including 2.1.1), try:
+ * To authenticate against Cyrus SASL's own password database:
-(SASL version 1.5.26)
+ (Cyrus SASL version 1.5.5)
- /usr/local/lib/sasl/smtpd.conf:
- pwcheck_method: saslauthd
+ /usr/local/lib/sasl/smtpd.conf:
+ pwcheck_method: sasldb
-(SASL version 2.1.1)
+ (Cyrus SASL version 2.1.1)
- /usr/local/lib/sasl2/smtpd.conf:
- pwcheck_method: saslauthd
+ /usr/local/lib/sasl2/smtpd.conf:
+ pwcheck_method: auxprop
-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".
+ 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
+ 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
+ read access to the sasldb file - you may have to play games with group
+ access permissions. With the OTP authentication mechanism, the SMTP server
+ also needs WRITE access to /etc/sasldb2 or /etc/sasldb (or the back end SQL
+ database, if used).
-In order to authenticate against SASL's own password database:
+ IMPORTANT: To get sasldb running, make sure that you set the SASL domain
+ (realm) to a fully qualified domain name.
-(SASL version 1.5.5)
+ EXAMPLE:
- /usr/local/lib/sasl/smtpd.conf:
- pwcheck_method: sasldb
+ (Cyrus SASL version 1.5.5)
-(SASL version 2.1.1)
+ % saslpasswd -c -u `postconf -h myhostname` exampleuser
- /usr/local/lib/sasl2/smtpd.conf:
- pwcheck_method: auxprop
+ (Cyrus SASL version 2.1.1)
-This will use the SASL password file (default: /etc/sasldb in version 1.5.5, or
-/etc/sasldb2 in version 2.1.1), 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 read access to the sasldb file - you
-may have to play games with group access permissions. With the OTP
-authentication mechanism, the SMTP server also needs write access to /etc/
-sasldb2 or /etc/sasldb (or the back end SQL database, if used).
+ % 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).
+
+ 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
+ Postfix variable smtpd_sasl_local_domain controls the realm used by smtpd:
+
+ /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
@@ -203,42 +221,27 @@ 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. This is only possible with SASL version
-2.1.1 or later:
-
- /usr/local/lib/sasl2/smtpd.conf:
- mech_list: plain login
-
-For the same reasons you might want to limit the list of plugins used for
-authentication. With SASL version 1.5.5 your only choice is to delete the
-corresponding libraries from /usr/local/lib/sasl. With SASL version 2.1.1:
-
- /usr/local/lib/sasl2/smtpd.conf:
- pwcheck_method: auxprop
- auxprop_plugin: sql
-
-IMPORTANT: To get sasldb running, make sure that you set the SASL domain
-(realm) to a fully qualified domain name.
+of mechanisms advertised by Postfix.
-EXAMPLE:
+ * With older Cyrus SASL versions you remove the corresponding library files
+ from the SASL plug-in directory (and again whenever the system is updated).
-(SASL version 1.5.5)
+ * With Cyrus SASL version 2.1.1 or later:
- % saslpasswd -c -u `postconf -h myhostname` exampleuser
+ /usr/local/lib/sasl2/smtpd.conf:
+ mech_list: plain login
-(SASL version 2.1.1)
-
- % saslpasswd2 -c -u `postconf -h myhostname` exampleuser
+For the same reasons you might want to limit the list of plugins used for
+authentication.
-You can find out SASL's idea about the realms of the users in sasldb with
-sasldblistusers (SASL version 1.5.5) or sasldblistusers2 (SASL version 2.1.1).
+ * With Cyrus SASL version 1.5.5 your only choice is to delete the
+ corresponding library files from the SASL plug-in directory.
-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 Postfix
-variable smtpd_sasl_local_domain controls the realm used by smtpd:
+ * With SASL version 2.1.1:
- /etc/postfix/main.cf:
- smtpd_sasl_local_domain = $myhostname
+ /usr/local/lib/sasl2/smtpd.conf:
+ pwcheck_method: auxprop
+ auxprop_plugin: sql
To run software chrooted with SASL support is an interesting exercise. It
probably is not worth the trouble.
@@ -317,6 +320,20 @@ that is specified with the relayhost parameter or with a transport(5) table.
[mail.myisp.net] username:password
[mail.myisp.net]:submission username:password
+Postfix version 2.3 supports-per-sender SASL password information. To search
+the Postfix SASL password by sender before it searches by destination, specify:
+
+ /etc/postfix/main.cf:
+ smtp_sender_dependent_authentication = yes
+ smtp_sasl_auth_enable = yes
+ smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
+
+ /etc/postfix/sasl_passwd:
+ user@example.com username:password
+ bar.com username
+ [mail.myisp.net] username:password
+ [mail.myisp.net]:submission username:password
+
Note: some SMTP servers support PLAIN or LOGIN authentication only. By default,
the Postfix SMTP client does not use authentication methods that send plaintext
passwords, and defers delivery with the following error message:
@@ -324,16 +341,22 @@ passwords, and defers delivery with the following error message:
plaintext authentication specify, for example:
/etc/postfix/main.cf:
- smtp_sasl_security_options =
+ smtp_sasl_security_options = noanonymous
-The SASL client password file is opened before the SMTP server enters the
-optional chroot jail, so you can keep the file in /etc/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.
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
smtp_sasl_mechanism_filter parameter to further restrict the list of server
-mechanisms that the smtp(8) client will take into consideration.
+mechanisms that the smtp(8) client will take into consideration:
+
+ /etc/postfix/main.cf:
+ 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.
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
@@ -344,9 +367,11 @@ CCrreeddiittss
* Postfix SASL support was originally implemented by Till Franke of SuSE
Rhein/Main AG.
* Wietse trimmed down the code to only the bare necessities.
- * Support for SASL version 2 was contributed by Jason Hoos.
+ * Support for Cyrus SASL version 2 was contributed by Jason Hoos.
* Liviu Daia added smtpd_sasl_application_name, split
reject_sender_login_mismatch into
reject_authenticated_sender_login_mismatch and
reject_unauthenticated_sender_login_mismatch, and revised the docs.
+ * Wietse made another iteration through the code to add plug-in support for
+ multiple implementations.
diff --git a/postfix/README_FILES/SMTPD_POLICY_README b/postfix/README_FILES/SMTPD_POLICY_README
index 0a21779cb..2bfbef504 100644
--- a/postfix/README_FILES/SMTPD_POLICY_README
+++ b/postfix/README_FILES/SMTPD_POLICY_README
@@ -51,13 +51,18 @@ a delegated SMTPD access policy request:
client_name=another.domain.tld
reverse_client_name=another.domain.tld
instance=123.456.7
+ PPoossttffiixx vveerrssiioonn 22..22 aanndd llaatteerr::
sasl_method=plain
sasl_username=you
sasl_sender=
+ size=12345
ccert_subject=solaris9.porcupine.org
ccert_issuer=Wietse Venema
ccert_fingerprint=C2:9D:F4:87:71:73:73:D9:18:E7:C2:F3:C1:DA:6E:04
- size=12345
+ PPoossttffiixx vveerrssiioonn 22..33 aanndd llaatteerr::
+ encryption_protocol=TLSv1/SSLv3
+ encryption_cipher=DHE-RSA-AES256-SHA
+ encryption_keysize=256
[empty line]
Notes:
@@ -93,10 +98,16 @@ Notes:
sends the END-OF-DATA command.
* The "sasl_*" attributes (Postfix 2.2 and later) specify information about
- how the client was authenticated via SASL.
+ how the client was authenticated via SASL. These attributes are empty in
+ case of no SASL authentication.
* The "ccert_*" attributes (Postfix 2.2 and later) specify information about
- how the client was authenticated via TLS.
+ how the client was authenticated via TLS. These attributes are empty in
+ case of no certificate authentication.
+
+ * The "encryption_*" attributes (Postfix 2.3 and later) specify information
+ about how the connection is encrypted. With plaintext connections the
+ protocol and cypher attributes are empty and the keysize is zero.
The following is specific to SMTPD delegated policy requests:
diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES
index c479bb594..df9b5f944 100644
--- a/postfix/RELEASE_NOTES
+++ b/postfix/RELEASE_NOTES
@@ -17,6 +17,42 @@ Incompatibility with Postfix 2.1 and earlier
If you upgrade from Postfix 2.1 or earlier, read RELEASE_NOTES-2.2
before proceeding.
+Incompatibility with snapshot 20051220
+======================================
+
+The Postfix-with-Cyrus-SASL build procedure has changed. You now
+need to specify -DUSE_CYRUS_SASL in addition to -DUSE_SASL_AUTH or
+else you end up without any Cyrus SASL support. The error messages
+are:
+
+ unsupported SASL server implementation: cyrus
+ unsupported SASL client implementation: cyrus
+
+Major changes with snapshot 20051220
+====================================
+
+Plug-in support for SASL authentication in the SMTP server and in
+the SMTP+LMTP client. With this, Postfix can support multiple SASL
+implementations without source code patches. Some distributors may
+even make SASL support a run-time linking option, just like they
+do with Postfix lookup tables.
+
+Hints and tips for plug-in developers are in the xsasl/README file.
+
+For backwards compatibility the default plug-in type is Cyrus SASL,
+so everything should behave like it did before. Some error messages
+are slightly different, but these are generally improvements.
+
+The "postconf -a" command shows what plug-in implementations are
+available for the SMTP server, and "postconf -A" does the same for
+the SMTP+LMTP client. Plug-in implementations are selected with
+the smtpd_sasl_type, smtp_sasl_type and lmtp_sasl_type configuration
+parameters.
+
+Other new configuration parameters are smtpd_sasl_path, smtp_sasl_path
+and lmtp_sasl_path. These are better left alone; they are introduced
+for the convenience of other SASL implementations.
+
Incompatibility with snapshot 20051208
======================================
diff --git a/postfix/html/SASL_README.html b/postfix/html/SASL_README.html
index 438709dac..4a720afc9 100644
--- a/postfix/html/SASL_README.html
+++ b/postfix/html/SASL_README.html
@@ -19,10 +19,9 @@
WARNING
- People who go to the trouble of installing Postfix may have
-the expectation that Postfix is more secure than some other mailers.
-The Cyrus SASL library is a lot of code. With SASL authentication
-enabled in the Postfix SMTP client and SMTP server, Postfix becomes
+
People who go to the trouble of installing Postfix may have the
+expectation that Postfix is more secure than some other mailers.
+The Cyrus SASL library is a lot of code. With this, Postfix becomes
as secure as other mail systems that use the Cyrus SASL library.
@@ -38,9 +37,11 @@ optionally grants mail access via the What SASL versions are supported
-Building the SASL library
+Building the Cyrus SASL library
-Building Postfix with SASL authentication
+Building Postfix with Cyrus SASL
support
Enabling SASL authentication in the
@@ -70,31 +71,20 @@ Postfix SMTP client
- Postfix+SASL 1.5.5 was seen working on RedHat 6.1 (pwcheck_method
-set to shadow or sasldb), Solaris 2.7 (pwcheck_method set to shadow
-or sasldb), and FreeBSD 3.4 (pwcheck_method set to sasldb). On
-RedHat 6.1, SASL 1.5.5 insisted on write access to /etc/sasldb.
-Note that this seems to be related to the auto_transition switch
-in SASL. Note also that the Cyrus SASL documentation says that it
-is pointless to enable that if you use "sasldb" for "pwcheck_method".
-Later versions of the SASL 1.5.x series should also work.
-
- Postfix+SASL 2.1.1 appears to work on Mandrake Linux 8.1
-(pwcheck_method set to saslauthd or auxprop). Note that the
-'auxprop' pwcheck_method replaces the 'sasldb' method from SASL
-1.5.x. Postfix may need write access to /etc/sasldb2 if you use
-the auto_transition feature, or if you use an authentication
-mechanism such as OTP (one-time passwords) that needs to update
-secrets in the database.
-
-
+ This document describes Postfix with Cyrus SASL version 1 and
+Cyrus SASL version 2. Postfix version 2.3 introduces has a plug-in
+mechanism for other SASL implementations. Support for other
+implementations is currently not part of the Postfix distribution
+and will be described elsewhere.
+
+
Postfix appears to work with cyrus-sasl-1.5.5 or cyrus-sasl-2.1.1,
which are available from:
-ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/.
+ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/
@@ -107,8 +97,7 @@ version 2.1.1.
non-standard SASL LOGIN authentication method. To enable this
authentication method, specify ``./configure --enable-login''.
-
+
To build Postfix with SASL authentication support, the following
assumes that the Cyrus SASL include files are in /usr/local/include,
@@ -119,20 +108,20 @@ and that the Cyrus SASL libraries are in /usr/local/lib.
-- (for SASL version 1.5.5):
+
- (for Cyrus SASL version 1.5.5):
-
% make tidy # if you have left-over files from a previous build
-% make makefiles CCARGS="-DUSE_SASL_AUTH -I/usr/local/include" \
- AUXLIBS="-L/usr/local/lib -lsasl"
+% make makefiles CCARGS="-DUSE_SASL_AUTH -DUSE_CYRUS_SASL \
+ -I/usr/local/include" AUXLIBS="-L/usr/local/lib -lsasl"
- - (for SASL version 2.1.1):
+
- (for Cyrus SASL version 2.1.1):
-
% make tidy # if you have left-over files from a previous build
-% make makefiles CCARGS="-DUSE_SASL_AUTH -I/usr/local/include/sasl" \
- AUXLIBS="-L/usr/local/lib -lsasl2"
+% make makefiles CCARGS="-DUSE_SASL_AUTH -DUSE_CYRUS_SASL \
+ -I/usr/local/include/sasl" AUXLIBS="-L/usr/local/lib -lsasl2"
@@ -142,20 +131,22 @@ otherwise ld.so will not find the SASL shared library:
-- (for SASL version 1.5.5):
+
- (for Cyrus SASL version 1.5.5):
-
% make tidy # if you have left-over files from a previous build
-% make makefiles CCARGS="-DUSE_SASL_AUTH -I/usr/local/include" \
- AUXLIBS="-L/usr/local/lib -R/usr/local/lib -lsasl"
+% make makefiles CCARGS="-DUSE_SASL_AUTH -DUSE_CYRUS_SASL \
+ -I/usr/local/include" AUXLIBS="-L/usr/local/lib \
+ -R/usr/local/lib -lsasl"
- - (for SASL version 2.1.1):
+
- (for Cyrus SASL version 2.1.1):
-
% make tidy # if you have left-over files from a previous build
-% make makefiles CCARGS="-DUSE_SASL_AUTH -I/usr/local/include/sasl" \
- AUXLIBS="-L/usr/local/lib -R/usr/local/lib -lsasl2"
+% make makefiles CCARGS="-DUSE_SASL_AUTH -DUSE_CYRUS_SASL \
+ -I/usr/local/include/sasl" AUXLIBS="-L/usr/local/lib \
+ -R/usr/local/lib -lsasl2"
@@ -195,20 +186,22 @@ SMTP server
Note: the SASL login names will be shared with the entire world.
- In /usr/local/lib/sasl/smtpd.conf (SASL version 1.5.5) or
-/usr/local/lib/sasl2/smtpd.conf (SASL version 2.1.1) you need to
+
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.
Note: some Postfix distributions are modified and look for
the smtpd.conf file in /etc/postfix.
- Note: some Cyrus SASL distributions are modified and look for
-the smtpd.conf file in /etc/sasl2.
+ Note: some Cyrus SASL distributions look for the smtpd.conf
+file in /etc/sasl2.
+
+
- In order to authenticate against the UNIX password database, try:
+-
To authenticate against the UNIX password database, try:
-- (SASL version 1.5.5)
+
- (Cyrus SASL version 1.5.5)
-
/usr/local/lib/sasl/smtpd.conf:
@@ -216,7 +209,7 @@ the smtpd.conf file in /etc/sasl2.
- - (SASL version 2.1.1)
+
- (Cyrus SASL version 2.1.1)
-
/usr/local/lib/sasl2/smtpd.conf:
@@ -225,14 +218,15 @@ the smtpd.conf file in /etc/sasl2.
- The name of the file in /usr/local/lib/sasl (SASL version 1.5.5)
-or /usr/local/lib/sasl2 (SASL version 2.1.1) used by the SASL
+
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
+ smtpd_sasl_application_name = smtpd
@@ -242,18 +236,19 @@ library for configuration can be set with:
permission for the /var/pwcheck directory, otherwise authentication
attempts will fail.
- Alternately, in SASL 1.5.26 and later (including 2.1.1), try:
+ -
Alternately, in Cyrus SASL 1.5.26 and later (including
+2.1.1), try:
-- (SASL version 1.5.26)
+
- (Cyrus SASL version 1.5.26)
-
/usr/local/lib/sasl/smtpd.conf:
pwcheck_method: saslauthd
- - (SASL version 2.1.1)
+
- (Cyrus SASL version 2.1.1)
-
/usr/local/lib/sasl2/smtpd.conf:
@@ -267,17 +262,17 @@ 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".
- In order to authenticate against SASL's own password database:
+
-
To authenticate against Cyrus SASL's own password database:
-- (SASL version 1.5.5)
+
- (Cyrus SASL version 1.5.5)
-
/usr/local/lib/sasl/smtpd.conf:
pwcheck_method: sasldb
- - (SASL version 2.1.1)
+
- (Cyrus SASL version 2.1.1)
-
/usr/local/lib/sasl2/smtpd.conf:
@@ -286,63 +281,29 @@ start saslauthd with "-a pam".
- This will use the SASL password file (default: /etc/sasldb in
+
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 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 read access to the sasldb file - you may have to play games
with group access permissions. With the OTP authentication mechanism,
-the SMTP server also needs write access to /etc/sasldb2 or /etc/sasldb
+the SMTP server also needs WRITE access to /etc/sasldb2 or /etc/sasldb
(or the back end SQL database, if used).
- 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. This is only possible with SASL version 2.1.1 or later:
-
-
-
-
-/usr/local/lib/sasl2/smtpd.conf:
- mech_list: plain login
-
-
-
- For the same reasons you might want to limit the list of plugins
-used for authentication. With SASL version 1.5.5 your only choice is to
-delete the corresponding libraries from /usr/local/lib/sasl. With SASL
-version 2.1.1:
-
-
-
-/usr/local/lib/sasl2/smtpd.conf:
- pwcheck_method: auxprop
- auxprop_plugin: sql
-
-
-
IMPORTANT: To get sasldb running, make sure that you set the SASL
domain (realm) to a fully qualified domain name.
EXAMPLE:
-- (SASL version 1.5.5)
+
- (Cyrus SASL version 1.5.5)
-
% saslpasswd -c -u `postconf -h myhostname` exampleuser
- - (SASL version 2.1.1)
+
- (Cyrus SASL version 2.1.1)
-
% saslpasswd2 -c -u `postconf -h myhostname` exampleuser
@@ -351,8 +312,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 (SASL version 1.5.5) or
-sasldblistusers2 (SASL version 2.1.1).
+in sasldb with sasldblistusers (Cyrus SASL version 1.5.5) or
+sasldblistusers2 (Cyrus SASL version 2.1.1).
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
@@ -366,6 +327,59 @@ 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.
+
+
+
+ For the same reasons you might want to limit the list of plugins
+used for authentication.
+
+
+
To run software chrooted with SASL support is an interesting
exercise. It probably is not worth the trouble.
@@ -470,6 +484,25 @@ table.
+ Postfix version 2.3 supports-per-sender SASL password
+information. To search the Postfix SASL password by sender
+before it searches by destination, specify:
+
+
+
+/etc/postfix/main.cf:
+ smtp_sender_dependent_authentication = yes
+ smtp_sasl_auth_enable = yes
+ smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
+
+/etc/postfix/sasl_passwd:
+ user@example.com username:password
+ bar.com username
+ [mail.myisp.net] username:password
+ [mail.myisp.net]:submission username:password
+
+
+
Note: some SMTP servers support PLAIN or LOGIN authentication only.
By default, the Postfix SMTP client does not use authentication
methods that send plaintext passwords, and defers delivery with
@@ -480,11 +513,11 @@ for example:
/etc/postfix/main.cf:
- smtp_sasl_security_options =
+ smtp_sasl_security_options = noanonymous
- The SASL client password file is opened before the SMTP server
+
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.
@@ -493,7 +526,17 @@ 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 smtp_sasl_mechanism_filter parameter to further
restrict the list of server mechanisms that the smtp(8) client will take
-into consideration.
+into consideration:
+
+
+
+/etc/postfix/main.cf:
+ 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.
The Postfix SMTP client is backwards compatible with SMTP
servers that use the non-standard "AUTH=method..." syntax in response
@@ -509,13 +552,16 @@ of SuSE Rhein/Main AG.
Wietse trimmed down the code to only the bare necessities.
- Support for SASL version 2 was contributed by Jason Hoos.
+ Support for Cyrus SASL version 2 was contributed by Jason Hoos.
- Liviu Daia added smtpd_sasl_application_name, split
+ Liviu Daia added smtpd_sasl_application_name, split
reject_sender_login_mismatch into
reject_authenticated_sender_login_mismatch and
reject_unauthenticated_sender_login_mismatch, and revised the docs.
+ Wietse made another iteration through the code to add
+plug-in support for multiple implementations.
+