[Postfixbuch-users] SASL LOGIN authentication failed

Jaeckel, Bert - DSV/TVI Bert.Jaeckel at tvi-services.de
Do Aug 3 13:38:44 CEST 2006


>> >Von: postfixbuch-users-bounces at listi.jpberlin.de 
>> >[mailto:postfixbuch-users-bounces at listi.jpberlin.de] Im 
>> >Auftrag von Patrick Ben Koetter
>> >Gesendet: Donnerstag, 3. August 2006 12:45
>> >An: postfixbuch-users at listi.jpberlin.de
>> >Betreff: Re: [Postfixbuch-users] SASL LOGIN authentication failed
>> >
>> >
>> >Lass mal bei beiden Programmen das "-m PLAIN" weg. Dann 
>sollten sie selber
>> >aushandeln, welchen Mechanismus sie nehmen werden. Irritierend ist
>> >allerdings jetzt schon, dass der Client sagt er hätte "(n)o 
>worthy mechs"
>> >gefunden.
>> >
>> Terminal 1:
>> [root at mail01 cyrus-sasl-mysql]# /usr/bin/sasl2-sample-server 
>-s rcmd -p 8000 PLAIN
>
>So ist es richtig:
>
># /usr/bin/sasl2-sample-server -s rcmd -p 8000
>trying 10, 1, 6
>trying 2, 1, 6
>bind: Address already in use
>accepted new connection
>send: {11}
>PLAIN LOGIN
>recv: {5}
>PLAIN
>recv: {1}
>Y
>recv: {45}
>wuff[0]wuff[0]sabber
>successful authentication 'wuff'
>closing connection
>

Diesmal:
[root at mail01 cyrus-sasl-mysql]# /usr/bin/sasl2-sample-server -s rcmd -p 8000
trying 10, 1, 6
trying 2, 1, 6
bind: Address already in use
accepted new connection
send: {0}

client didn't choose mechanism
closing connection

>
>> Terminal 2:
>> 
>> [root at mail01 sasl2]# /usr/bin/sasl2-sample-client -s rcmd -p 
>8000 PLAIN localhost
>> receiving capability list... recv: {0}
>
>Auch nicht richtig. Mach es bitte so:
>
>$ /usr/bin/sasl2-sample-client -s rcmd -p 8000 localhost
>receiving capability list... recv: {11}
>PLAIN LOGIN
>PLAIN LOGIN
>please enter an authentication id: wuff
>please enter an authorization id: wuff
>Password:
>send: {5}
>PLAIN
>send: {1}
>Y
>send: {45}
>wuff[0]wuff[0]sabber
>successful authentication
>closing connection
>

Diesmal:
[root at mail01 sasl2]# /usr/bin/sasl2-sample-client -s rcmd -p 8000 localhost
receiving capability list... recv: {0}


starting SASL negotiation: no mechanism available
SASL(-4): no mechanism available: No worthy mechs found
closing connection

>
>> >Was gibt das?
>> ># cat /usr/lib/sasl2/sample.conf
>> 
>> [root at mail01 sasl2]# cat /usr/lib/sasl2/sample.conf
>> pwcheck_method: auxprop
>> auxprop_plugin: sql
>> mech_list: plain login cram-md5 digest-md5
>> sql_engine: mysql
>> sql_hostnames: web01
>> sql_user: postfix
>> sql_passwd: supergeheim
>> sql_database: mailbase
>> sql_select: select password from mailusers where account='%u@%r'
>> log_level: 7
>
>In der smtpd.conf standen vorher andere Daten drin und die 
>sample.conf ist nur
>ein symlink auf die smtpd.conf. Hast Du editiert, um nichts zu 
>verraten?

Hatte nur den hostname und das passwd editiert.

>
>So nebenbei:
>Hast Du getestet, ob Du Dich als sql_user mit sql_passwd an 
>die MySQL anmelden
>darfst? SELECT ist als sql_user auch gelungen?

Die Verbindung zur Datenbak mit dem sql_user und dem Password funktioniert ohne Probleme, ich hab mir den Inhalt der gesamten DB ausgeben lassen und auch Querys die ich für Postfix verwende getestet und erhielt immer die richtigen Ergebnisse.


>
>Was gibt das:
># cat /etc/postfix/makedefs.out
>

[root at mail01 sasl2]# cat /etc/postfix/makedefs.out
# Do not edit -- this file documents how Postfix was built for your machine.
SYSTYPE = LINUX2
AR      = ar
ARFL    = rv
RANLIB  = ranlib
SYSLIBS = -L/usr/lib -lldap -llber -lpcre -L/usr/lib/mysql -lmysqlclient -lm -L/usr/lib/sasl2 -lsasl2 -L/usr/kerberos/lib -lssl -lcrypto -ldl -lz  -pie -Wl,-z,relro -ldb -lnsl -lresolv
CC      = gcc $(WARN) -fPIC -DHAS_LDAP -DLDAP_DEPRECATED=1 -DHAS_PCRE -I/usr/include/pcre -DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl -DUSE_TLS -I/usr/kerberos/include
OPT     = -O
DEBUG   = -g
AWK     = awk
STRCASE =
EXPORT  = AUXLIBS=' -L/usr/lib -lldap -llber -lpcre -L/usr/lib/mysql -lmysqlclient -lm -L/usr/lib/sasl2 -lsasl2 -L/usr/kerberos/lib -lssl -lcrypto -ldl -lz  -pie -Wl,-z,relro' CCARGS='-fPIC -DHAS_LDAP -DLDAP_DEPRECATED=1 -DHAS_PCRE -I/usr/include/pcre -DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl -DUSE_TLS -I/usr/kerberos/include ' OPT='-O' DEBUG='-g'
WARN    = -Wall -Wno-comment -Wformat -Wimplicit -Wmissing-prototypes \
        -Wparentheses -Wstrict-prototypes -Wswitch -Wuninitialized \
        -Wunused


Bert

>p at rick
>
>-- 
>Das Postfix-Buch
><http://www.postfix-buch.com>
>saslfinger (debugging SMTP AUTH):
><http://postfix.state-of-mind.de/patrick.koetter/saslfinger/>
>-- 
>_______________________________________________
>Postfixbuch-users mailingliste
>Heinlein Professional Linux Support GmbH
>
>Postfixbuch-users at listi.jpberlin.de
>http://listi.jpberlin.de/mailman/listinfo/postfixbuch-users
>



Mehr Informationen über die Mailingliste Postfixbuch-users