mysql身份验证失败_SMTP身份验证失败PAM-MySQL无法进行身份验证
我正在使用Postfix構(gòu)建郵件服務(wù)器,并設(shè)置身份驗(yàn)證以使用Postfixadmin檢查數(shù)據(jù)庫設(shè)置.
我可以通過Courier IMAP進(jìn)行身份驗(yàn)證,因?yàn)樗梢哉_地驗(yàn)證哈希密碼,但我懷疑我的SASL PAM-MySQL SMTP身份驗(yàn)證機(jī)制不能.
我在/var/log/mail.log中收到這些錯(cuò)誤:
pam_unix(smtp:auth): check pass; user unknown
Aug 22 03:23:08 omitted saslauthd[26402]: pam_unix(smtp:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
Aug 22 03:23:10 omitted saslauthd[26402]: DEBUG: auth_pam: pam_authenticate failed: Authentication failure
Aug 22 03:23:10 omitted saslauthd[26402]: do_auth : auth failure: [user=user@domain.com] [service=smtp] [realm=domain.com] [mech=pam] [reason=PAM auth error]
以下是/etc/pam.d/smtp的內(nèi)容:
auth required pam_mysql.so user=postfixadmin passwd=omitted host=127.0.0.1 db=postfixadmin table=mailbox usercolumn=username passwdcolumn=password crypt=2
account sufficient pam_mysql.so user=postfixadmin passwd=omitted host=127.0.0.1 db=postfixadmin table=mailbox usercolumn=username passwdcolumn=password crypt=2
以下是/etc/postfixadmin/config.inc.php中用于密碼加密的相關(guān)代碼段:
// Encrypt
// In what way do you want the passwords to be crypted?
// md5crypt = internal postfix admin md5
// md5 = md5 sum of the password
// system = whatever you have set as your PHP system default
// cleartext = clear text passwords (ouch!)
// mysql_encrypt = useful for PAM integration
// authlib = support for courier-authlib style passwords
// dovecot:CRYPT-METHOD = use dovecotpw -s 'CRYPT-METHOD'. Example: dovecot:CRAM-MD5
$CONF['encrypt'] = 'mysql_encrypt';
這是我的/etc/postfix/sasl/smtp.conf的內(nèi)容:
pwcheck_method: saslauthd
mech_list: plain login
log_level: 7
allow_plaintext: true
auxprop_plugin: sql
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: postfixadmin
sql_passwd: omitted
sql_database: postfixadmin
sql_select: select password from mailbox where username='%u@%r'
我嘗試使用MD5哈希,但Courier會(huì)失敗.那就是窗外……
總結(jié)
以上是生活随笔為你收集整理的mysql身份验证失败_SMTP身份验证失败PAM-MySQL无法进行身份验证的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: c语言程序设计报告用于医院食品加工等部,
- 下一篇: linux cmake编译源码,linu