Menu

pam_mysql cuts off domain name after email

Help
2009-01-09
2013-04-17
  • ovencleaner

    ovencleaner - 2009-01-09

    Running postfix Cyrus-SASL using the pam module to go to mysql.

    I am logging in as joeblow@domain.com, but for some reason the domain is getting stripped off? It

    auth.log
    do_auth         : auth failure: [user=joeblow] [service=smtp] [realm=idquickview.com] [mech=pam] [reason=PAM auth error]

    mysql.log
    SELECT password FROM mailbox WHERE username = 'joeblow'

    It should be doing:
    SELECT password FROM mailbox WHERE username = 'joeblow@domain.com'

    Any ideas?

    /etc/pam.d/smtp
    auth required pam_mysql.so user=postfix passwd=mypasswd host=127.0.0.1 db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=0

    /etc/default/saslauthd:
    #
    # Settings for saslauthd daemon
    # Please read /usr/share/doc/sasl2-bin/README.Debian for details.
    #

    # Should saslauthd run automatically on startup? (default: no)
    START=yes

    # Description of this saslauthd instance. Recommended.
    # (suggestion: SASL Authentication Daemon)
    DESC="SASL Authentication Daemon"

    # Short name of this saslauthd instance. Strongly recommended.
    # (suggestion: saslauthd)
    NAME="saslauthd"

    # Which authentication mechanisms should saslauthd use? (default: pam)
    #
    # Available options in this Debian package:
    # getpwent  -- use the getpwent() library function
    # kerberos5 -- use Kerberos 5
    # pam       -- use PAM
    # rimap     -- use a remote IMAP server
    # shadow    -- use the local shadow password file
    # sasldb    -- use the local sasldb database file
    # ldap      -- use LDAP (configuration is in /etc/saslauthd.conf)
    #
    # Only one option may be used at a time. See the saslauthd man page
    # for more information.
    #
    # Example: MECHANISMS="pam"
    MECHANISMS="pam"

    # Additional options for this mechanism. (default: none)
    # See the saslauthd man page for information about mech-specific options.
    MECH_OPTIONS=""

    # How many saslauthd processes should we run? (default: 5)
    # A value of 0 will fork a new process for each connection.
    THREADS=5

    # Other options (default: -c -m /var/run/saslauthd)
    # Note: You MUST specify the -m option or saslauthd won't run!
    #
    # See /usr/share/doc/sasl2-bin/README.Debian for Debian-specific information.
    # See the saslauthd man page for general information about these options.
    #
    # Example for postfix users: "-c -m /var/spool/postfix/var/run/saslauthd"
    OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd"

     
    • go-soft

      go-soft - 2009-08-06

      Hello,

      i have exactly the same problem. Did you find a solution?

       
  • Alessandro

    Alessandro - 2012-08-11

    Just for future users…

    try adding the parameter "-r" to "/etc/default/saslauthd" and restart saslauth.

    /etc/default/saslauthd:

    OPTIONS="-r -c -m /var/spool/postfix/var/run/saslauthd"

    then:

    /etc/init.d/saslauthd restart

    regards!

    a.

     

Log in to post a comment.