Results 1 to 9 of 9

Thread: [SOLVED] Postfix SASL via dovecot fails with "fatal: no SASL authentication mechanism

  1. #1
    Join Date
    Jan 2008
    Beans
    91

    Exclamation [SOLVED] Postfix SASL via dovecot fails with "fatal: no SASL authentication mechanism

    I configured postfix to use SASL to authenticate via dovecot. Pop3 authenticates fine. SMTP does not. I get this in the log file "fatal: no SASL authentication mechanisms"

    These are the facts and how I validated.

    Postfix has support for dovecot sasl:
    postconf -a returns "dovecot" and "cyrus"

    Dovecot creates the auth file for postfix:
    I removed the auth file and restarted dovecot. auth is recreated

    Postfix is looking at the same auth file that dovecot created:
    I stopped postfix and dovecot, removed the auth file and started postfix. Postfix logs "warning: SASL: Connect to private/auth failed: No such file or directory"

    Postfix is configured for sasl in main.cf:
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_type = dovecot
    smtpd_sasl_path = private/auth
    smtpd_sasl_authenticated_header = yes


    auth's mode is correct:
    Results of ls -l /var/spool/postfix/private/auth
    srw-rw---- 1 postfix postfix 0 2008-12-29 19:20 auth
    Dovecot configuration:
    client {
    # Assuming the default Postfix $queue_directory setting
    path = /var/spool/postfix/private/auth
    mode = 0660
    # Assuming the default Postfix user and group
    user = postfix
    group = postfix
    }


    I need to narrow down where the problem is. Right now it looks like a problem with postfix.

    HOW DO I TROUBLESHOOT THIS?
    Is there a way to open the auth socket and validate dovecot is exposing the socket correctly? Are there other configurations I should check?

    Thanks,
    Tim

  2. #2
    Join Date
    Jul 2008
    Location
    Netherlands
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Postfix SASL via dovecot fails with "fatal: no SASL authentication mechanisms"

    Quote Originally Posted by timandjulz View Post
    ls -l /var/spool/postfix/private/auth
    srw-rw---- 1 postfix postfix 0 2008-12-29 19:20 auth
    On where mail-server where I successfully use postfix+dovecot+SASL :

    Code:
     ls -l /var/spool/postfix/private/auth
    srw-rw---- 1 postfix mail 0 Oct 28 02:38 /var/spool/postfix/private/auth
    
    ls -l /var/spool/postfix/auth/dovecot 
    srw-rw---- 1 postfix mail 0 Dec 23 22:50 /var/spool/postfix/auth/dovecot
    Code:
    smtpd_sasl_auth_enable          = yes
    #smtpd_sasl_local_domain        = $myhostname
    smtpd_sasl_exceptions_networks  = $mynetworks
    smtpd_sasl_security_options     = noanonymous
    broken_sasl_auth_clients        = yes
    smtpd_sasl_type                 = dovecot
    # Can be an absolute path, or relative to $queue_directory
    ##smtpd_sasl_path                 = private/auth
    smtpd_sasl_path = auth/dovecot
    Do you use postfix chrooted ? See : /etc/postfix/master.cf
    See also here :
    http://wiki.dovecot.org/HowTo/PostfixAndDovecotSASL
    http://www.postfix.org/SASL_README.html#server_dovecot
    Last edited by albinootje; December 29th, 2008 at 08:52 PM.

  3. #3
    Join Date
    Jan 2008
    Beans
    91

    Re: Postfix SASL via dovecot fails with "fatal: no SASL authentication mechanisms"

    Thanks albinootje. It looks like you have reconfigured to use auth/dovecot instead of private/auth. I assume your dovecot config for "client { }" points to the same folder. Can you paste that?

    Thanks again,
    Tim

  4. #4
    Join Date
    Jul 2008
    Location
    Netherlands
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Postfix SASL via dovecot fails with "fatal: no SASL authentication mechanisms"

    Quote Originally Posted by timandjulz View Post
    Thanks albinootje. It looks like you have reconfigured to use auth/dovecot instead of private/auth. I assume your dovecot config for "client { }" points to the same folder. Can you paste that?
    I forgot to include that at first, but I've just edited my last comment to include it.

  5. #5
    Join Date
    Jul 2008
    Location
    Netherlands
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Postfix SASL via dovecot fails with "fatal: no SASL authentication mechanisms"

    And here's the relevant part of my dovecot.conf file :
    Code:
    }
    auth default {
      mechanisms = plain
      passdb sql {
        args = /etc/dovecot/dovecot-sql.conf
      }
      userdb sql {
        args = /etc/dovecot/dovecot-sql.conf
      }
      userdb prefetch {
      }
      user = nobody
      socket listen {
        master {
          path = /var/run/dovecot/auth-master
          mode = 0600
          user = vmail
          group = mail
        }
        client {
          path = /var/spool/postfix/auth/dovecot
          mode = 0660
          user = postfix
          group = mail
        }
      }
    }

  6. #6
    Join Date
    Jan 2008
    Beans
    91

    Re: Postfix SASL via dovecot fails with "fatal: no SASL authentication mechanisms"

    I switched back to an older config and it is working again. Apparently there was a conflict between the previous authentication method (mysql query vs dovecot). I have no idea what was causing the problem. Troubleshooting something like this is darn near impossible.

    I am closing this thread. Thanks to albinootje for your input.

  7. #7
    Join Date
    Jul 2008
    Location
    Netherlands
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Postfix SASL via dovecot fails with "fatal: no SASL authentication mechanisms"

    Quote Originally Posted by timandjulz View Post
    Troubleshooting something like this is darn near impossible.
    That's not correct.
    I have years of experience with postfix and dovecot, and I can tell you that it all boils down to using the logfiles properly.

    What is however really unpleasant to (not) debug is a setup with Courier Maildrop.

  8. #8
    Join Date
    Apr 2010
    Location
    London
    Beans
    8
    Distro
    Ubuntu 10.04 Lucid Lynx

    Talking Re: Postfix SASL via dovecot fails with "fatal: no SASL authentication mechanisms"

    Quote Originally Posted by albinootje View Post
    On where mail-server where I successfully use postfix+dovecot+SASL :

    Code:
     ls -l /var/spool/postfix/private/auth
    srw-rw---- 1 postfix mail 0 Oct 28 02:38 /var/spool/postfix/private/auth
    
    ls -l /var/spool/postfix/auth/dovecot 
    srw-rw---- 1 postfix mail 0 Dec 23 22:50 /var/spool/postfix/auth/dovecot
    Code:
    smtpd_sasl_auth_enable          = yes
    #smtpd_sasl_local_domain        = $myhostname
    smtpd_sasl_exceptions_networks  = $mynetworks
    smtpd_sasl_security_options     = noanonymous
    broken_sasl_auth_clients        = yes
    smtpd_sasl_type                 = dovecot
    # Can be an absolute path, or relative to $queue_directory
    ##smtpd_sasl_path                 = private/auth
    smtpd_sasl_path = auth/dovecot
    Do you use postfix chrooted ? See : /etc/postfix/master.cf
    See also here :
    http://wiki.dovecot.org/HowTo/PostfixAndDovecotSASL
    http://www.postfix.org/SASL_README.html#server_dovecot


    you are THE man!
    that dovecot wiki troubleshooting guide saved me.

    anyone else who has been having troubles sending mail after following this guide, that wiki article holds the solution.

    Thanks!

  9. #9
    Join Date
    Nov 2011
    Beans
    2

    Re: [SOLVED] Postfix SASL via dovecot fails with "fatal: no SASL authentication mecha

    I struggled with this issue for a while before finding out the correct solution. It is important that you place the queue_directory path before smtpd_sasl_path, that is if your smtpd_sasl_path is relative. In my case:

    queue_directory = /var/spool/postfix
    smtpd_sasl_type = dovecot
    smtpd_sasl_path = private/auth

    did the trick for me.

    Bill

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •