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

Want to support HowtoForge? Become a subscriber!
Submitted by falko (Contact Author) (Forums) on Fri, 2011-10-28 09:19. :: Errors

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[]: SASL PLAIN authentication failed: no mechanism available



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.

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Ubuntu 11.10 (not registered) on Thu, 2012-04-12 11:49.

Because nobody was able to post the real working config file, here it is:/etc/postfix/sasl/smtpd.conf

pwcheck_method: saslauthdmech_list: plain login
allow_plaintext: true
auxprop_plugin: sql
sql_engine: mysql
sql_user: ispconfig
sql_passwd: <yourpass>
sql_database: dbispconfig
sql_select: select password from mail_user where login = '%u@%r'
Submitted by laurent (not registered) on Fri, 2012-04-13 18:13.

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'


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


Submitted by patrick3853 (registered user) on Mon, 2012-02-20 18:36.

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
Submitted by evildave (not registered) on Thu, 2012-02-02 14:36.


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

Submitted by jbat66 (registered user) on Sun, 2011-11-27 23:50.

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. :-(


Submitted by Anonymous (not registered) on Tue, 2011-11-15 15:58.
Works very well and solves problem on Ubuntu 11.10. Hopefully the new version of sasl2 will be bug-free.
Submitted by DaleHutch (not registered) on Tue, 2011-11-08 05:51.

Thanks Falko!

 It worked... Corrected the failure to send.

Submitted by toxinf (not registered) on Sun, 2011-10-30 12:18.
well, that didn't work
Submitted by SkyHigh (not registered) on Mon, 2011-10-31 22:52.

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_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.

Submitted by Bill (not registered) on Fri, 2012-04-27 09:34.

Thanks for this extremely useful post!

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

Submitted by Anonymous (not registered) on Sat, 2011-12-10 07:24.
Yes, that worked GREAT!
Submitted by Petek (not registered) on Mon, 2011-11-07 23:32.

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 :(