dovecot配置pam认证默认是linux服务器的用户名,不是类似邮箱格式demo@nbhao.org这种。如何修改?
dovecot -n 结果类似如下:
# 2.0.9: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-042stab093.4 x86_64 CentOS release 6.6 (Final) auth_mechanisms = login plain disable_plaintext_auth = no mail_location = maildir:~/Maildir mbox_write_locks = fcntl passdb { driver = pam } service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0666 user = postfix } } ssl_cert =
在这里,dovecot启动后登录名只能用系统名,不能包含@nbhao.org 类似的字段,否则会报unknown user的错误。
解决办法
打开 10-auth.conf ,修改如下字段:
auth_username_format = %n
参考链接:https://serverfault.com/questions/646413/how-to-correct-dovecot-user-login-to-use-full-domain-email-in-this-format-myuse