Hello,

Debian Sarge, Postfix 2.3.8.

A relevans konfig:

broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = 
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.pem
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.pem
smtpd_tls_loglevel = 2
smtpd_use_tls = yes

/usr/lib/sasl2/smtpd.conf:

pwcheck_method: auxprop
auxprop_plugin: sql
allow_plaintext: true

sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: --- replaced ---
sql_passwd: --- replaced ---
sql_database: postfix
sql_select: select crypted from users where user='%u'
sql_verbose: yes
log_level: 7


Ha kiprobalom:

# testsaslauthd -u airween -p jelszo -s smtp
0: OK "Success."

es a mysql logjaban ez van:

...Query   SELECT crypted FROM users WHERE user = 'airween'

Ha kliensbol probalok authentikalni, akkor az nem megy, az
auth.log-ban ez van:

sql plugin Parse the username airween 
sql plugin try and connect to a host 
sql plugin trying to open db 'postfix' on host '127.0.0.1' 
sql plugin Parse the username airween 
sql plugin try and connect to a host 
sql plugin trying to open db 'postfix' on host '127.0.0.1' 
begin transaction
sql plugin create statement from userPassword airween szerver.valami 
sql plugin doing query select crypted from users where user='airween'; 
sql plugin create statement from cmusaslsecretCRAM-MD5 airween szerver.valami 
sql plugin doing query select crypted from users where user='airween'; 
sql plugin create statement from cmusaslsecretPLAIN airween szerver.valami 
sql plugin doing query select crypted from users where user='airween'; 

A mysql.logban pedig ez a query latszik (3x):
...Query select crypted from users where user='airween'

Tehat latszolag ua a lekerdezes, de az smtp nem tud
authentikalni.

A /etc/default/saslauthd tartalma:

START=yes
MECHANISMS="pam"

a /etc/pam.d/smtp tartalma:

auth optional pam_mysql.so user=postfix passwd=jelszo db=postfix \
 table=users usercolumn=user passwdcolumn=crypted crypt=Y \
 host=127.0.0.1 debug
auth required pam_mysql.so user=postfix passwd=jelszo db=postfix \
 table=users usercolumn=user passwdcolumn=crypted crypt=Y \
 host=127.0.0.1 debug

Mit nezek el, miert nem megy?


Koszi:

a.

_________________________________________________
linux lista      -      [email protected]
http://mlf2.linux.rulez.org/mailman/listinfo/linux

válasz