HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=4)
-   -   Postfix + SASL problem (http://www.howtoforge.com/forums/showthread.php?t=10305)

thim 2nd February 2007 18:06

Postfix + SASL problem
 
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.

falko 3rd February 2007 14:33

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

thim 4th February 2007 13:16

Hi Falko,

We used the postfix source package from http://postfix-mudd.nobandwidth.net/...able-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!

thim 4th February 2007 18:05

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' :o

Code:

smtpd_sasl_path                = smptd
In place of:
Code:

smtpd_sasl_path                = smtpd
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!


All times are GMT +2. The time now is 00:02.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.