Postfix(SASL)/ MySQL:使用MD5encryption?

使用Postfix / SASL和MySQL时,是否可以使用MD5密码encryption来encryption密码? 目前,我的设置是使用MySQL CRYPT()函数,由于各种原因并不理想。

对的,这是可能的。

我猜你正在使用libpam-mysql。 有一个选项可以设置名为crypt。

auth optional pam_mysql.so user=username passwd=password verbose=0 db=thedb table=user usercolumn=userName passwdcolumn=userPassword crypt=3 account required pam_mysql.so user=username passwd=password verbose=0 db=thedb table=user usercolumn=userName passwdcolumn=userPassword crypt=3 

你也可以使用auth所需的

然后在MD5中密码与MD5的密码。

您可以在readme和/ usr / share / doc / libpam-mysql中find文档

我引用了一部分:

隐窝(平原)

 The method to encrypt the user's password: 0 (or "plain") = No encryption. Passwords stored in plaintext. HIGHLY DISCOURAGED. 1 (or "Y") = Use crypt(3) function. 2 (or "mysql") = Use MySQL PASSWORD() function. It is possible that the encryption function used by PAM-MySQL is different from that of the MySQL server, as PAM-MySQL uses the function defined in MySQL's C-client API instead of using PASSWORD() SQL function in the query. 3 (or "md5") = Use plain hex MD5 

在Debian的saslauthdconfiguration文件中,你必须设置,

 MECHANISMS="pam" 

不知道如何将其设置在另一个分布,bur过程必须像这样startet。

/ usr / sbin / saslauthd -a pam

但是我想你已经有了。