mysql身份验证失败_SMTP身份验证失败PAM-MySQL无法进行身份验证
我正在使用Postfix構建郵件服務器,并設置身份驗證以使用Postfixadmin檢查數據庫設置.
我可以通過Courier IMAP進行身份驗證,因為它可以正確地驗證哈希密碼,但我懷疑我的SASL PAM-MySQL SMTP身份驗證機制不能.
我在/var/log/mail.log中收到這些錯誤:
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的內容:
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中用于密碼加密的相關代碼段:
// 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的內容:
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會失敗.那就是窗外……
總結
以上是生活随笔為你收集整理的mysql身份验证失败_SMTP身份验证失败PAM-MySQL无法进行身份验证的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: c语言程序设计报告用于医院食品加工等部,
- 下一篇: android 拼图课程设计,拼图游戏设