postfix is configured to to authenticate the users with sasl. cyrus-sasl is compiled with mysql but refuses to load mysql support at run time, and so cannot look up password information in a mysql db despite being configured to do so. Reproducible: Always Steps to Reproduce: This error was repoduced on the same gentoo install using both stable and masked versions of cyrus-sasl and postfix. I Currently only have the one sparc system to test this on and so can't say for sure that it will occur on all systems, but I did the following to set this up: 1.Setup postfix. This was largely done as in the Virtual Mailhosting guide (http://www.gentoo.org/doc/en/virt-mail-howto.xml), but for updating the positions of some of the config files 2.Setup /etc/sasl2/smtpd.conf as bellow: pwcheck_method: auxprop auxprop_plugin: sql mech_list: PLAIN LOGIN sql_engine: mysql sql_hostnames: localhost sql_database: mailsql sql_user: mailsql sql_passwd: xxxxxxx sql_select: SELECT clear FROM users WHERE email='%u@%r' sql_usessl: no sql_verbose: yes This setup should attempt to look up passwords in a mysql database for auth. 3.Restart relevant daemons and try sending mail using smtp from an untrusted host. Actual Results: The mail client and postfix logs will show that auth failed, despite the password matching that in the database. Upon inspection of the mysql logs it becomes apparent that sasl never looks in the mysql db. Additionally, /var/log/messages shows the following: May 26 12:22:52 strange postfix/smtpd[11673]: SQL engine 'mysql ' not supported May 26 12:22:52 strange postfix/smtpd[11673]: auxpropfunc error no mechanism available May 26 12:22:52 strange postfix/smtpd[11673]: _sasl_plugin_load failed on sasl_auxprop_plug_init for plugin: sql Both cyrus-sasl and postfix were compiled with the mysql use flag set, and inspection of the portage logs for the cyrus-sasl build shows no obvious errors with mysql during configure. Expected Results: sasl should look up the passwords in the mysql db and authenticate the user sucessfully. Portage 2.0.51.19 (default-linux/sparc/sparc64/2005.0, gcc-3.3.5, glibc-2.3.3.20040420-r2, 2.4.28-sparc-r1 sparc64) ================================================================= System uname: 2.4.28-sparc-r1 sparc64 sun4u Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.4-r1 [2.3.4 (#1, Mar 27 2005, 14:44:20)] dev-lang/python: 2.3.4-r1 sys-apps/sandbox: [Not Present] sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.8.5-r3, 1.5, 1.9.5, 1.6.3, 1.7.9-r1, 1.4_p6 sys-devel/binutils: 2.15.92.0.2-r1 sys-devel/libtool: 1.5.16 virtual/os-headers: 2.4.23 ACCEPT_KEYWORDS="sparc" AUTOCLEAN="yes" CFLAGS="-O2 -mcpu=ultrasparc" CHOST="sparc-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -mcpu=ultrasparc" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig buildpkg ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="sparc arts avi bash-completion berkdb bitmap-fonts crypt cups dlloader doc encode esd fbcon foomaticdb fortran gcc64 gif gnome gtk gtk2 imap imlib jpeg kde libwww mad maildir mikmod motif mpeg mysql ncurses nls oggvorbis opengl oss pam pam-mysql pdflib perl png python readline sasl sdl spell ssl tcpd tiff truetype truetype-fonts type1-fonts vhosts xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
This bug is caused by trailing whitespace after variable values in the /etc/sasl2/smtp.conf file. Remove this whitespace to resolve the issue.