I'm trying to set up the mail server. I have problem with my SMTP authentication using sasl. I'm using postfixadmin to create my mailboxes, the password is in some kind of md5, postfixadmin config.inc.php:

$CONF['encrypt'] = 'md5crypt';
$CONF['authlib_default_flavor'] = 'md5raw';

the sasl is configured like that (/etc/postfix/sasl/smtpd.conf):

pwcheck_method: auxprop
auxprop_plugin: sql
sql_engine: mysql
mech_list: plain login cram-md5 digest-md5
sql_hostnames: 127.0.0.1
sql_user: postfix
sql_passwd: ****
sql_database: postfix
sql_select: SELECT password FROM mailbox WHERE username = '%u@%r'
log_level: 7

If I want to authenticate (let's say from Thunderbird) with my password, I can't. If I use hashed password from MySQL I can authenticate and send an email. So I think the problem is with hash algorithm. Do you know how to set up the SASL (or postfixadmin) to work fine together. I don't want to store my passwords in plain text...

link|improve this question
feedback

2 Answers

up vote 1 down vote accepted

auxprop can't deal with encrypted passwords, you should use PAM authentication mechanism and pam_mysql plugin.

link|improve this answer
feedback

Thank you Alex, you were completely right. It's work for me with pam authentication. I've used these two tutorials for setting this up:

http://blog.doylenet.net/?p=236 http://linux.justinhartman.com/Postfix_and_Courier_Installation_using_MySQL

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.