Error: Ubuntu 11.10 + saslauthd: SASL PLAIN authentication failed: no mechanism available

You have installed Postfix with saslauthd on Ubuntu 11.10 and get the following error in /var/log/mail.log when you try to send an email:

server1 postfix/smtpd[7868]: warning: unknown[1.2.3.4]: SASL PLAIN authentication failed: no mechanism available

 

Solution

saslauthd seems to be buggy in Ubuntu 11.10: https://bugs.launchpad.net/ubuntu/+s...l2/+bug/875440

You can solve the problem by installing the saslauthd packages from Ubuntu 11.04:

apt-get install libsqlite0 db4.8-util libssl0.9.8

cd /tmp
mkdir sasl
cd sasl
wget http://archive.ubuntu.com/ubuntu/pool/main/c/cyrus-sasl2/libsasl2-2_2.1.23.dfsg1-5ubuntu3_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/c/cyrus-sasl2/libsasl2-modules_2.1.23.dfsg1-5ubuntu3_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/c/cyrus-sasl2/libsasl2-modules-sql_2.1.23.dfsg1-5ubuntu3_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/c/cyrus-sasl2/libsasl2-dev_2.1.23.dfsg1-5ubuntu3_amd64.deb http://archive.ubuntu.com/ubuntu/pool/main/c/cyrus-sasl2/sasl2-bin_2.1.23.dfsg1-5ubuntu3_amd64.deb

dpkg -i *.deb

Replace _amd64 with _i386 if you have a 32bit system.

Share this page:

12 Comment(s)

Add comment

Comments

From:

If you have to downgrade the saslauthd packages to get it working properly and later run "apt-get safe-upgrade" then saslauthd will be upgraded and it will break again. To prevent this you can configure dpkg to hold the saslauthd packages. Then you can safely upgrade using apt-get and not have to worry about it. Run the following commands to prevent sasl packages from being upgraded.

echo libsasl2-2 hold | dpkg --set-selections
echo libsasl2-div hold | dpkg --set-selections
echo libsasl2-modules hold | dpkg --set-selections
echo libsasl2-modules-sql hold | dpkg --set-selections
echo sasl2-bin hold | dpkg --set-selections

From: SkyHigh

I also had to change /etc/postfix/sasl/smtpd.conf

pwcheck_method: saslauthd
mech_list: plain login pam
allow_plaintext: true
auxprop_plugin: sql
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: root
sql_passwd: topsecret
sql_database: database
sql_select: select password from emailUser where email = '%u'@'%r'

 

Afterwards you have to restart postfix / saslauthd

 

/etc/init.d/saslauthd start
/etc/init.d/postfix restart

 

Hope this works for you.


From: Petek

I try both. First downgrade vrom saslauthd 2.1.24 to saslauthd 2.1.23

/usr/sbin/saslauthd -v
saslauthd 2.1.23
authentication mechanisms: sasldb getpwent kerberos5 pam rimap shadow ldap

I also try on 2.1.24 only change  /etc/postfix/sasl/smtpd.conf

 I have no more power :(

 

From: Anonymous

Yes, that worked GREAT!

From: Bill

Thanks for this extremely useful post!

 Editing the smtpd.conf and restarting services tested and confirmed working on Ubuntu 11.10 Perfect Server ISPConfig3.

From: toxinf

well, that didn't work

From: DaleHutch

Thanks Falko!

 It worked... Corrected the failure to send.

From: Anonymous

Works very well and solves problem on Ubuntu 11.10. Hopefully the new version of sasl2 will be bug-free.

From:

Thanks doing that and rebooting fixed the problem.

Between the Auth problem and the bastille-firewall problem (var/run now /run), this has been a pain in the rear upgrade. :-(

 

From: evildave

https://bugs.launchpad.net/ubuntu/+source/cyrus-sasl2/+bug/875440/comments/34

states that only some arguments in the config-file changed. Worked for me!

From: Ubuntu 11.10

Because nobody was able to post the real working config file, here it is:

/etc/postfix/sasl/smtpd.conf

pwcheck_method: saslauthd
mech_list: plain login
allow_plaintext: true
auxprop_plugin: sql
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: ispconfig
sql_passwd: <yourpass>
sql_database: dbispconfig
sql_select: select password from mail_user where login = '%u@%r'

From: laurent

Work perfect without downgrading anything, just correcting the conf file but if you followed Falko's great How-To to install postfix with mysql, you have to change from:

sql_select: select password from mail_user where login = '%u@%r'

to

sql_select: select password from mail_user where email = '%u@%r'