При отправке сообщения Postfix ругается на аутентификацию
Oct 4 11:02:02 postfix postfix/smtpd[21764]: warning: unknown[192.168.206.20]: SASL CRAM-MD5 authentication failed: PDc4NzM1NDI1ODIyNjAxOTcuMTQ3NTU2ODEyMEBwb3N0Zml4Pg==
Oct 4 11:02:02 postfix postfix/smtpd[21764]: disconnect from unknown[192.168.206.20
На стороне postfix
mysql> INSERT INTO users (email, password) VALUES ('support@domain.ru', ENCRYPT('passwd'));
mysql> select * from users where email="support@domain.ru";
+---------------------+---------------+
| email | password |
+---------------------+---------------+
| support@domain.ru | X77m94lRCLxtM |
+---------------------+---------------+
1 row in set (0.00 sec)
t# cat dovecot-sql.conf
driver = mysql
connect = host=127.0.0.1 dbname=mail user=mail password=pass
default_pass_scheme = CRYPT
password_query = SELECT email AS user, password FROM users WHERE email = '%u'
# cat dovecot.conf |grep auth_mechanisms
auth_mechanisms = plain login cram-md5 digest-md5
# cat smtpd.conf
pwcheck_method: saslauthd
mech_list: DIGEST-MD5 CRAM-MD5 PLAIN LOGIN
allow_plaintext: true
auxprop_plugin: mysql
sql_hostnames: 127.0.0.1
sql_user: mail
sql_passwd: passwd
sql_database: mail
sql_select: SELECT password FROM users WHERE email = '%u'
Механизм аутентификации digest-md5 работает!