Dovecot:auth套接字权限

从我的后缀设置我运行交付作为nobody:没有人,它不能连接到dovecot的auth-worker套接字。 那是我的鸽舍configuration:

# 2.0.13: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-lts x86_64 auth_mechanisms = plain login auth_username_format = %Lu disable_plaintext_auth = no first_valid_gid = 65534 mail_location = maildir:/var/spool/vmail/%d/%u/ mail_privileged_group = postfix passdb { args = /etc/dovecot/dovecot-sql.conf driver = sql } protocols = imap pop3 service auth { user = nobody unix_listener login/auth-master { mode = 0666 } unix_listener login/auth { group = postfix user = postfix mode = 0660 } } ssl = no userdb { args = /etc/dovecot/dovecot-sql.conf driver = sql } verbose_proctitle = yes protocol imap { imap_client_workarounds = delay-newmail tb-extra-mailbox-sep } protocol pop3 { pop3_client_workarounds = outlook-no-nuls oe-ns-eoh pop3_uidl_format = %08Xu%08Xv } protocol lda { postmaster_address = [email protected] sendmail_path = /usr/sbin/sendmail } 

这就是我在日志中的内容:

 Aug 5 10:10:21 localhost dovecot: lda: Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: Permission denied (euid=99(nobody) egid=99(nobody) missing +r perm: /var/run/dovecot/auth-userdb, euid is not dir owner) Aug 5 10:10:21 localhost dovecot: lda: Fatal: Internal error occurred. Refer to server log for more information. 

我试着去做

 unix_listener auth-worker { user = nobody } 

service auth部分,但dovecot无法运行此消息: doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf: duplicate listener: /var/run/dovecot/auth-worker

我该如何解决这个问题?

谢谢。

问题与auth-userdb权限和所有权解决如下:

 service auth { unix_listener auth-userdb { mode = 0660 # socket access mode user = nobody # set uid to nobody group = nobody # set gid to nobody } } 

auth-worker权限和所有权问题非常棘手,我只有在阅读dovecot的源代码后才知道如何解决这个问题。 也许有一些网页描述这个问题,但我没有find任何。 正如我发现auth-worker是一个服务,它的套接字权限可能是这样设置的:

 service auth-worker { unix_listener auth-worker { user = nobody # same as above, mode and group are supported too } } 

根据错误信息,您的/var/run/dovecot/目录的所有者是错误的。 解决这个问题,并开心。