Linux

CentOS 6 上的 Dovecot 更新後無法使用

  • July 18, 2016

我最近將 CentOS 更新到 6.8 版(最終版)。我不確定dovecot是否停止工作或稍後停止工作。我在正確的密碼登錄和錯誤密碼的“失敗”登錄中**什麼也看不到。**我從來沒有碰過 /etc/pam.d - 應該是作業系統的預設值。它以前工作過。我不知道為什麼它現在不起作用。secure

我正在使用 dovecot + sendmail。Sendmail 正在通過 sasl->PAM 進行身份驗證,並且工作正常。

我試過 passdbshadow看看有什麼問題,但沒有成功。

這可能是巧合,但由於某種原因,強制執行 md 檢查(在所有分區上使用 raid 1)

更新: raid 檢查完成後 dmesg 顯示了這一點。

auth[14058]: segfault at 9c ip 000000000040f8e0 sp 00007ffe99788070 error 4 in auth[400000+37000]
auth[14133]: segfault at 8c ip 000000000040f8e0 sp 00007ffc7ec2ee60 error 4 in auth[400000+37000]

在 dmesg 充滿這些消息之前:“延遲 md4 的數據檢查直到 md3 完成”,所以我看不到段錯誤……

配置:

# dovecot -n
# 2.0.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-642.1.1.el6.centos.plus.x86_64 x86_64 CentOS release 6.8 (Final)
auth_debug = yes
auth_gssapi_hostname = $ALL
auth_verbose = yes
log_path = /var/log/dovecot.log
mail_debug = yes
mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u
mbox_write_locks = fcntl
passdb {
 args = failure_show_msg=yes dovecot
 driver = pam
}
passdb {
 driver = shadow
}
protocols = imap pop3
service auth-worker {
 user = root
}
service auth {
 user = root
}
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_key = </etc/pki/dovecot/private/dovecot.pem
userdb {
 driver = passwd
}
verbose_proctitle = yes

鴿舍日誌:

Jul 18 02:18:12 auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth
Jul 18 02:18:12 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libauthdb_ldap.so
Jul 18 02:18:12 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
Jul 18 02:18:12 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libmech_gssapi.so
Jul 18 02:18:12 auth: Debug: auth client connected (pid=24897)
Jul 18 02:18:16 auth: Debug: client in: AUTH    1       PLAIN   service=imap    secured lip=5.9.143.206 rip=176.12.6.242        lport=143       rport=64099
Jul 18 02:18:16 auth: Debug: client out: CONT   1
Jul 18 02:18:16 auth: Debug: client in: CONT<hidden>
Jul 18 02:18:16 auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth
Jul 18 02:18:16 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libauthdb_ldap.so
Jul 18 02:18:16 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
Jul 18 02:18:16 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libmech_gssapi.so
Jul 18 02:18:16 auth: Debug: pam(npelov,176.12.6.242): lookup service=dovecot
Jul 18 02:18:16 auth: Debug: pam(npelov,176.12.6.242): #1/1 style=1 msg=Password:
Jul 18 02:18:19 auth: Info: pam(npelov,176.12.6.242): pam_authenticate() failed: Authentication failure (password mismatch?)
Jul 18 02:18:19 master: Error: service(auth): child 24898 killed with signal 11 (core dumps disabled)
Jul 18 02:18:19 auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth
Jul 18 02:18:19 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libauthdb_ldap.so
Jul 18 02:18:19 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
Jul 18 02:18:19 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libmech_gssapi.so
Jul 18 02:18:19 auth: Debug: auth client connected (pid=24897)
Jul 18 02:18:19 auth: Debug: client in: AUTH    2       PLAIN   service=imap    secured lip=5.9.143.206 rip=176.12.6.242        lport=143       rport=64099     resp=<hidden>
Jul 18 02:18:19 auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth
Jul 18 02:18:19 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libauthdb_ldap.so
Jul 18 02:18:19 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
Jul 18 02:18:19 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libmech_gssapi.so
Jul 18 02:18:19 auth: Debug: pam(npelov,176.12.6.242): lookup service=dovecot
Jul 18 02:18:19 auth: Debug: pam(npelov,176.12.6.242): #1/1 style=1 msg=Password:
Jul 18 02:18:20 auth: Info: pam(npelov,176.12.6.242): pam_authenticate() failed: Authentication failure (password mismatch?)
Jul 18 02:18:20 master: Error: service(auth): child 25050 killed with signal 11 (core dumps disabled)
Jul 18 02:18:24 auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth
Jul 18 02:18:24 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libauthdb_ldap.so
Jul 18 02:18:24 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
Jul 18 02:18:24 auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libmech_gssapi.so
Jul 18 02:18:24 auth: Debug: auth client connected (pid=24897)

手動測試:

# openssl s_client -connect <host>:993
CONNECTED(00000003)
..............................................
..............................................
..............................................
a1 LOGIN npelov validpassword
a1 NO [UNAVAILABLE] Temporary authentication failure.
* OK Waiting for authentication process to respond..

聽起來您遇到了某種軟磁碟故障,該故障觸發了磁碟的檢查/重建,並且該故障損壞了 dovecot 安裝的一部分。

我也會:

  • 如果可能,請檢查磁碟的 SMART 性能/執行狀況計數器,可能即將發生災難性硬體故障
  • rpm -Va使用;驗證其他包的文件 任何大小不正確或校驗和錯誤的二進製文件也可能已損壞

重新安裝 dovecot 數據包解決了問題:

# yum reinstall dovecot
# service dovecot restart

更新: smart 不報告任何錯誤。

引用自:https://serverfault.com/questions/790359