Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In /etc/postfix/sasl/smtpd.conf I have:

auxprop_plugin: sql
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_database: mail
sql_user: mailadmin
sql_passwd: secret
sql_select: SELECT password FROM users WHERE smtp_username = '%u'
sql_usessl: no

This is working if I place a plain text password in the password field, but the database uses passwords stored with the MySQL ENCRYPT() function. Since the Query selects the password, rather than using the password in the where clause, how do I check that the user supplied password when ENCRYPT()ed matches the encrypted password in the database?

Is it possible to change the query to use ENCRYPT()ed passwords?

share|improve this question
1  
serverfault.com/questions/81958/… –  quanta May 28 '12 at 7:43
    
@quanta Thanks, I'll try that out later. –  Nick May 29 '12 at 18:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.