PDA

View Full Version : ubuntu server 14.04 + postfix + saslauth + crypt



daemoncesar
April 2nd, 2016, 05:14 PM
I can not send email encryption. I using postfix + courier-imap + saslauth.


My smtpd.conf




pwcheck_method: saslauthd
auxprop_plugin: sql
mech_list: PLAIN LOGIN CRAM-MD5 DIGEST-MD5 NTLM
srp_mda: md5
password_format: crypt
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: postfix
sql_passwd: postsol
sql_database: postfix
sql_select: select password from mailbox where username='%u@%r'



main.cf


smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes


smtpd_sasl_path = smtpd



/etc/pam.d/smtp




auth required pam_mysql.so user=postfix passwd=postsol host=127.0.0.1 db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=2
account sufficient pam_mysql.so user=postfix passwd=postsol host=127.0.0.1 db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=2



the error:



Apr 2 10:42:01 protus saslauthd[17305]: do_auth : auth failure: [user=root@mydomain.com] [service=smtp] [realm=] [mech=pam] [reason=PAM auth error]




If you use the password normally ( No encryption) works!

daemoncesar
April 2nd, 2016, 06:16 PM
i change /etc/pam.d/smtp (cryp=3)




auth required pam_mysql.so user=postfix passwd=postsol host=127.0.0.1 db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=3
account sufficient pam_mysql.so user=postfix passwd=postsol host=127.0.0.1 db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=3



The value of "crypt" is 3 ?

error:

pam_mysql - non-crypt()ish MD5 hash is not supported in this build.

daemoncesar
April 3rd, 2016, 06:17 PM
root@protus:/etc/postfix/sasl# testsaslauthd -s smtp -u root@domain.com -p passw
0: OK "Success."







But thunderbird does not work ;