[Postfixbuch-users] SASL mit auxprop und MySQL Backend

Oliver Pürsten lists at puersten.de
Mi Nov 28 22:53:23 CET 2007


Patrick Ben Koetter schrieb:
> * Oliver Pürsten <lists at puersten.de>:
>> Hallo Leute,
>>
>> ich versuche eine SASL Authentifizierung gegen eine MySQL Datenbank zu bauen und habe das 
>> Problem das die Authentifizierung nicht funktioniert. Ich habe schon so ziehmlich alles 
>> probiert, es will aber einfach nicht.
>>
>> Vielleicht fällt Euch ja noch was ein.
>>
>> Folgende Hintergrundinfo's:
>>
>> Ich habe mittlerweile schon eine einfache db Tabelle erstellt welche nur username und 
>> password enthält, hier die zur Authentifizierung genutzte smtpd.conf:
>>
>> pwcheck_method: auxprop
>> auxprop_plugin: sql
>> mech_list: PLAIN LOGIN CRAM-MD5 DIGEST-MD5
>> sql_engine: mysql
>> sql_hostnames: 127.0.0.1
>> sql_user: mail
>> sql_passwd: mail
>> sql_database: mail
>> sql_select: SELECT password FROM sasl WHERE username = '%u'
>>
>> Ich teste mit den SASL Tools client und server, was folgendes Ergebnis bei einer 
>> Probesession bringt:
> 
> Hast Du dafür eine sample.conf angelegt? Wenn ja, wo liegt die?
> 
> p at rick

hätte ich erwähnen sollen, ich habe auf die eigentliche smtpd.conf im lib directory per 
symlink verwiesen und diesen dann sample.conf genannt. aus dem verzeichnis mit dem symlink 
starte ich dann auch den server und den client. (ist das quellcode verzeichnis)

regards - oliver

> 
> 
> 
> 
>>
>> #./client -s rcmd -p 8000 -m PLAIN 127.0.0.1
>> receiving capability list... recv: {57}
>> NTLM LOGIN ANONYMOUS PLAIN GSSAPI OTP DIGEST-MD5 CRAM-MD5
>> NTLM LOGIN ANONYMOUS PLAIN GSSAPI OTP DIGEST-MD5 CRAM-MD5
>> please enter an authentication id: test1 at test.de
>> please enter an authorization id: test1 at test.de
>> Password:
>> send: {5}
>> PLAIN
>> send: {1}
>> Y
>> send: {32}
>> test1 at test.de[0]test1 at test.de[0]test
>> authentication failed
>> closing connection
>>
>> #./server -s rcmd -p 8000
>> trying 28, 1, 6
>> trying 2, 1, 6
>> accepted new connection
>> send: {57}
>> NTLM LOGIN ANONYMOUS PLAIN GSSAPI OTP DIGEST-MD5 CRAM-MD5
>> recv: {5}
>> PLAIN
>> recv: {1}
>> Y
>> recv: {32}
>> test1 at test.de[0]test1 at test.de[0]test
>> starting SASL negotiation: user not foundclosing connection
>>
>> Direkter sql in der Datenbank funktioniert ebenfalls:
>>
>> mysql> select password from sasl where username='test1 at test.de';
>> +----------+
>> | password |
>> +----------+
>> | test     |
>> +----------+
>> 1 row in set (0.00 sec)
>>
>> mysql>
>>
>>
>> Besten Dank !
>>
>> Gruß Oliver
>> -- 
>> _______________________________________________
>> Postfixbuch-users -- http://www.postfixbuch.de
>> Heinlein Professional Linux Support GmbH
>>
>> Postfixbuch-users at listi.jpberlin.de
>> https://listi.jpberlin.de/mailman/listinfo/postfixbuch-users
> 




Mehr Informationen über die Mailingliste Postfixbuch-users