Solved! Debian Wheezy – SASL LOGIN authentication failed: no mechanism available

Solved! Debian Wheezy – SASL LOGIN authentication failed: no mechanism available

I’m not sure why I ever run an `apt-get upgrade` on Debian as I usually spend the next week fixing the issues it’s created. Today’s problem was preventing postfix authenticating smtp users with saslauthd and thus stopping e-mail sending. The log file (/var/log/mail.err) produced the oh so helpful message “SASL LOGIN authentication failed: no mechanism available”.

Google wasn’t much use in diagnosing this as a few people had reported having the issue on Debian but no solution was available. I fixed it by downgrading 5 sasl packages to their Squeeze releases. Commands below:

  1. mkdir /tmp/saslfix
  2. cd /tmp/saslfix
  3.  
  4. wget http://ftp.us.debian.org/debian/pool/main/c/cyrus-sasl2/sasl2-bin_2.1.23.dfsg1-7_i386.deb
  5. wget http://ftp.us.debian.org/debian/pool/main/c/cyrus-sasl2/libsasl2-2_2.1.23.dfsg1-7_i386.deb
  6. wget http://ftp.us.debian.org/debian/pool/main/c/cyrus-sasl2/libsasl2-modules_2.1.23.dfsg1-7_i386.deb
  7. wget http://ftp.us.debian.org/debian/pool/main/c/cyrus-sasl2/libsasl2-modules-sql_2.1.23.dfsg1-7_i386.deb
  8. wget http://ftp.us.debian.org/debian/pool/main/c/cyrus-sasl2/libsasl2-dev_2.1.23.dfsg1-7_i386.deb
  9.  
  10. dpkg -i *.deb
  11.  
  12. /etc/init.d/saslauthd restart
  13. /etc/init.d/postfix restart

13 comments

  1. I have just had a re-occurrence of this issue as caused by doing another upgrade with apt. I assume it is still not fixed.

  2. Ohh! YESSS!.
    I was going crazy with plesk 10.4 + postfix + debian.
    3 days with my domains without mailing.
    After upgrade debian (and plesk) from squeeze to wheezy it stoped to work sending emails with: “SASL LOGIN authentication failed: no mechanism available” error. And sasl (and libsasl* was installed).
    One tip. After downgrade these packages to squeeze, libsasl2-modules-sql and sasl2-bin did dont installed cleanly (dependency problems), but I DONT TOUCH IT ANYMORE until this bug is solved.
    This is a terrible bug in debian wheezy. If it is going to be released in may 2013 I thing this is imperative to be solved.
    Is there any debian bug opened about this issue?
    Thank you again Phil

  3. thanks a lot!

    my mail-server got stuck after todays wheezy-update so i replaced the new sasl-modules with the squeeze ones: it still works.

    your solution saved me a lot of time!

  4. Hi,
    I tried your solution as a quick fix but I don’t like to keep old packages because “it worked before”, because you have to fix the release versions in apt preferences and one day, the whole thing finally explodes and you don’t remember why…)

    As you’re the first link I got on google about this problem, this solution might interest some other people.

    Keep the wheezy standard packages, simply comment one parameter in “/etc/postfix/sasl/smtpd.conf” :
    #######auxprop_plugin:

    Don’t ask me why :)

    Maintaining the whole postfix/courier/pop/imap/postgrey/sasl/tls/whatever is always a pain in ….

    Regards

    • Interesting, however worrying. I use mysql for auth on my system so that line reads:

      auxprop_plugin: mysql

      Commenting it out makes the server accept any credentials for authentication.

      May not be the case with yours but I’d check it, to be sure, else you’ll end up being used for spam.

    • I see your point though about apt issues – installing packages has been a nightmare since I had to hack this.

  5. I tried, but returns error dependence and not install packages. Any suggestions?

    • I get the below when running the command set these days. Doesn’t seem to affect the working of the solution.

      dpkg: dependency problems prevent configuration of libsasl2-2:
      libsasl2-2 depends on libdb4.8; however:
      Package libdb4.8 is not installed.

      dpkg: error processing libsasl2-2 (–install):
      dependency problems – leaving unconfigured
      dpkg: dependency problems prevent configuration of libsasl2-modules:
      libsasl2-modules depends on libsasl2-2 (= 2.1.23.dfsg1-7); however:
      Package libsasl2-2 is not configured yet.

      dpkg: error processing libsasl2-modules (–install):
      dependency problems – leaving unconfigured
      dpkg: dependency problems prevent configuration of libsasl2-modules-sql:
      libsasl2-modules-sql depends on libsasl2-modules (= 2.1.23.dfsg1-7); however:
      Package libsasl2-modules is not configured yet.

      dpkg: error processing libsasl2-modules-sql (–install):
      dependency problems – leaving unconfigured
      dpkg: dependency problems prevent configuration of sasl2-bin:
      sasl2-bin depends on libsasl2-2 (>= 2.1.23.dfsg1-7); however:
      Package libsasl2-2 is not configured yet.
      sasl2-bin depends on libdb4.8; however:
      Package libdb4.8 is not installed.

      dpkg: error processing sasl2-bin (–install):
      dependency problems – leaving unconfigured
      dpkg: dependency problems prevent configuration of libsasl2-dev:
      libsasl2-dev depends on libsasl2-modules (= 2.1.23.dfsg1-7); however:
      Package libsasl2-modules is not configured yet.

      dpkg: error processing libsasl2-dev (–install):
      dependency problems – leaving unconfigured
      Processing triggers for man-db …
      Errors were encountered while processing:
      libsasl2-2
      libsasl2-modules
      libsasl2-modules-sql
      sasl2-bin
      libsasl2-dev

  6. Klaus-Martin Scheuer

    After upgrading to wheezy i had to change /etc/pam.d/smtp:

    auth required /lib/i386-linux-gnu/security/pam_unix.so
    account required /lib/i386-linux-gnu/security/pam_unix.so
    password required /lib/i386-linux-gnu/security/pam_unix.so
    session required /lib/i386-linux-gnu/security/pam_unix.so

    • No go here. I’m using /lib/security/pam_mysql.so but the config you described with a module change didn’t affect the problem.

  7. http://www.debian.org/releases/stable/i386/release-notes.en.txt

    Cyrus SASL SQL backends

    Configuration of SQL engine backends for Cyrus SASL, as provided
    in the libsasl2-modules-sql package, has changed from database
    specific configuration (e.g. mysql) to the generic sql auxprop
    plugin.

    Configuration files for applications using SASL have to be
    updated, for example:

    auxprop_plugin: mysql

    should be replaced by:

    auxprop_plugin: sql
    sql_engine: mysql

    In addition, the SQL query (if used) needs to have %u replaced
    with %u@%r, because user and realm are now provided separately.

    • I know this is over a year old, but THANK YOU. I just did a dist-upgrade to wheezy and couldn’t figure out what had changed. This was exactly it.

    • Thank you for this, much appreciated!

Leave a Reply to Gonzalo Cancel reply

Your email address will not be published. Required fields are marked *