Postfix + SASL problem

Discussion in 'Installation/Configuration' started by thim, Feb 2, 2007.

  1. thim

    thim New Member

    Dear,

    I have made an manual installation of Postfix 2.3.7.
    Before everything was running smoothly but now we always get the following SMTP login error.
    Code:
    Feb  2 18:00:21 gonzo postfix/smtpd[15947]: connect from unknown[85.10.86.188]
    Feb  2 18:00:21 gonzo postfix/smtpd[15947]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
    Feb  2 18:00:21 gonzo postfix/smtpd[15947]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
    Feb  2 18:00:21 gonzo postfix/smtpd[15947]: warning: unknown[85.10.86.188]: SASL LOGIN authentication failed: authentication failure
    
    I want to authenticate using MySQL in combination with the authdeamon.
    My POP / IMAP authentication is working but my SMTP login returns the error above.

    In my /usr/lib64/sasl2/smtpd.conf

    I have following code:

    Code:
    pwcheck_method: authdaemond
    log_level: 3
    mech_list: PLAIN LOGIN
    authdaemond_path:/usr/var/spool/authdaemon/socket
    I don't wont to use the Berkley DB method, i want to use the authdaemon.

    I have googled till I drop but can't find an solution anywhere.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    I guess your new Postfix is expecting smtpd.conf somewhere else.
    Can you specify the location when you configure Postfix (before compilation)?
     
  3. thim

    thim New Member

    Hi Falko,

    We used the postfix source package from http://postfix-mudd.nobandwidth.net/en/available-packages/ to compile postfix.

    We configured and compiled postfix in '/usr/src/redhat/SOURCES'
    When I was looking at the 'postfix.spec' file I saw that this version of Postfix was copying the 'smtpd.conf' file in '/usr/lib/sasl2/smtpd.conf'. So after installing , I modified this file with our configuration:
    Code:
    pwcheck_method: authdaemond
    log_level: 3
    mech_list: PLAIN LOGIN
    authdaemond_path:/usr/var/spool/authdaemon/socket
    This is the complete error message:
    Code:
    Feb  3 22:35:46 gonzo postfix/smtpd[4321]: connect from unknown[81.165.135.66]
    Feb  3 22:35:46 gonzo postfix/smtpd[4321]: warning: SASL authentication failure: realm changed: authentication aborted
    Feb  3 22:35:46 gonzo postfix/smtpd[4321]: warning: unknown[81.165.135.66]: SASL DIGEST-MD5 authentication failed: authentication failure
    Feb  3 22:35:46 gonzo postfix/smtpd[4321]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
    Feb  3 22:35:46 gonzo postfix/smtpd[4321]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
    Feb  3 22:35:46 gonzo postfix/smtpd[4321]: warning: unknown[81.165.135.66]: SASL LOGIN authentication failed: authentication failure
    Feb  3 22:35:46 gonzo postfix/smtpd[4321]: lost connection after AUTH from unknown[81.165.135.66]
    Feb  3 22:35:46 gonzo postfix/smtpd[4321]: disconnect from unknown[81.165.135.66]
    We compiled postfix with:
    Code:
    CCARGS=' -DHAS_LDAP -DHAS_PCRE -I/usr/include/pcre -DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl -I/usr/kerberos/include -DUSE_TLS -I/usr/include/openssl'
    AUXLIBS=' -L/usr/lib -lldap -llber -lpcre -L/usr/lib64/mysql -lmysqlclient -lm -L/usr/lib/sasl2 -lsasl2 -lssl -lcrypto -lz'
    We are running CentOS 4.4 64bit.
    We installed this software / libraries:
    Code:
    postfix.x86_64                           2:2.3.6-1.pcre.mysql_p installed
    courier-authlib.x86_64                   0.58-1                 installed
    courier-authlib-devel.x86_64             0.58-1                 installed
    courier-authlib-mysql.x86_64             0.58-1                 installed
    courier-imap.x86_64                      4.1.1-1                installed
    cyrus-sasl.x86_64                        2.1.19-5.EL4           installed
    cyrus-sasl.i386                          2.1.19-5.EL4           installed
    cyrus-sasl-devel.x86_64                  2.1.19-5.EL4           installed
    cyrus-sasl-md5.x86_64                    2.1.19-5.EL4           installed
    cyrus-sasl-plain.i386                    2.1.19-5.EL4           installed
    cyrus-sasl-plain.x86_64                  2.1.19-5.EL4           installed
    cyrus-sasl-sql.i386                      2.1.19-5.EL4           installed
    cyrus-sasl-sql.x86_64                    2.1.19-5.EL4           installed
    Hope you can help to solve this, because this is an hard one to solve..

    Thanks in advance!
     
  4. thim

    thim New Member

    Owkay, we solved it!!
    After setting in '/etc/postfix/master.cf' the -D option after our SMTP rule. Then looking to our log file I noticed the error:
    logger: open("/usr/lib64/sasl2/smptd.conf", O_RDONLY) = -1 ENOENT (No such file or directory)

    Conclusion, we had a typo in out '/etc/postfix/main.cf' :eek:

    Code:
    smtpd_sasl_path                 = sm[COLOR="Red"][B]pt[/B][/COLOR]d
    In place of:
    Code:
    smtpd_sasl_path                 = sm[COLOR="Red"][B]tp[/B][/COLOR]d
    I know it's stupid, but when you already configuring and tweaking your mail server for days such typo's are so easy to overlook..


    Thx Falco for noticing us about the smtpd.conf path!
     

Share This Page