如何把dovecot pam认证的登录名改成邮箱格式demo@nbhao.org
发表时间:2018-09-29 9:31 | 分类:Linux | 浏览:1,301 次
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