Find the answer to your Linux question:
Results 1 to 4 of 4
I'm running Fedora. I'm trying to get cyrus-sasl to authenticate through mysql for imap. If I set it to sasl_pwcheck_method: saslauthd it works fine. When I change it, below is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2007
    Posts
    3

    cyrus-sasl mysql problem


    I'm running Fedora. I'm trying to get cyrus-sasl to authenticate through mysql for imap. If I set it to sasl_pwcheck_method: saslauthd it works fine. When I change it, below is what happens and my setup.

    Here's my tail /var/log/maillog

    Feb 9 15:53:18 localhost imap[2643]: badlogin: blang.maxyourstats.com [127.0.0.1] plaintext maxyourstats0001 SASL(-13): user not found: checkpass failed

    I get that after running

    imtest -a maxyourstats0001 localhost

    and getting

    S: L01 NO Login failed: authentication failure
    Authentication failed. generic failure
    Security strength factor: 0


    Here's some setup info:

    mysql> select * from accountuser;
    | username | password | prefix | domain_name |
    | maxyourstats0001 | testpw | maxyourstats | maxyourstats.com |

    /etc/imapd.conf
    tls_cert_file: /etc/pki/cyrus-imapd/cyrus-imapd.pem
    tls_key_file: /etc/pki/cyrus-imapd/cyrus-imapd.pem
    tls_ca_file: /etc/pki/tls/certs/ca-bundle.crt
    postmaster: postmaster
    configdirectory: /var/lib/imap
    partition-default: /var/spool/imap
    # admins: cyrus # no admins!
    allowanonymouslogin: no
    allowplaintext: yes
    #sasl_mech_list: PLAIN
    servername: blang.maxyourstats.com
    autocreatequota: 10000
    reject8bit: no
    quotawarn: 90
    timeout: 30
    poptimeout: 10
    dracinterval: 0
    drachost: localhost
    sievedir: /usr/sieve
    sendmail: /usr/sbin/sendmail
    sieve_maxscriptsize: 32
    sieve_maxscripts: 5
    #unixhierarchysep: yes
    sasl_pwcheck_method: auxprop
    sasl_auxprop_plugin: sql
    sql_engine: mysql
    sasl_auto_transition: no
    sasl_sql_hostnames: localhost
    sasl_sql_user: user //changed for post
    sasl_sql_password: password //changed for post
    sasl_sql_database: mail
    sasl_sql_statement: select password from accountuser where username = '%u'
    sasl_sql_verbose: true
    sasl_mech_list: login plain

    I set mysql to log, and when I login with the mysql client and run queries they show up in the log, so logging works. However when I run the imtest command and try to authenticate imap, nothing ever appears in the mysqld.log, so it's like cyrus-imapd isn't even trying to talk to mysql.

    Any suggestions? Need any other config files?

  2. #2
    Just Joined!
    Join Date
    Feb 2007
    Posts
    3
    For anyone interested I solved my problem. I used saslauthd and set it to use PAM_MYSQL which works fine.

  3. #3
    Just Joined!
    Join Date
    Feb 2010
    Posts
    1
    Quote Originally Posted by robodeath View Post
    For anyone interested I solved my problem. I used saslauthd and set it to use PAM_MYSQL which works fine.
    I have the same issue. How did you solved the problem with mysql and pam_mysql?
    thanks

  4. #4
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Hello and welcome to the forums, mami!

    Please start a new thread of your own with the details of any problems that you are having because this one is over 3 years old.

    Thank you.
    oz

Posting Permissions

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