当访问auth-userdb时,Dovecot(使用Postfix)configuration连接被拒绝

…这是一个很难描述的标题。 这个描述应该强调这个问题。

上下文

  • 我正在按照Workaround.org 教程安装一个后缀dovecot(加上一些额外的插件)堆栈。
  • 在Ubuntu 12.04机器上运行(虚拟机有Vagrant / Chef)
  • Dovecot v2.0.19
  • 后缀v2.9.6

CONF。 档

10主

.... service auth { unix_listener auth-userdb { mode = 0644 user = vmail group = vmail } ... 

编辑 – 其他configuration信息(一些重叠)

 service auth { # auth_socket_path points to this userdb socket by default. It's typically # used by dovecot-lda, doveadm, possibly imap process, etc. Its default # permissions make it readable only by root, but you may need to relax these # permissions. Users that have access to this socket are able to get a list # of all usernames and get results of everyone's userdb lookups. unix_listener auth-userdb { mode = 0644 user = vmail group = vmail } # Postfix smtp-auth unix_listener /var/spool/postfix/private/auth { mode = 0660 user = postfix group = postfix } # Auth process is run as this user. #user = $default_internal_user user = dovecot } 

AUTH-SQL

 userdb { driver = static args = uid=vmail gid=vmail home=/var/vmail/%d/%n allow_all_users=yes } 

ls -la / var / run / dovecot / auth-userdb

 srw-r--r-- 1 vmail vmail 0 Jun 20 13:04 /var/run/dovecot/auth-userdb 

Postfix master.cf

 dovecot unix - nn - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -d ${recipient} 

问题

我非常仔细地跟着教程,只改变了一些小的东西。 我到达“testing邮件传递”并运行echo test | mail [email protected] echo test | mail [email protected]

邮件没有到达,因为find /var/vmail没有显示任何东西。

在服务器系统日志中存在以下错误:

 postfix/pickup[16842]: 019023A06AB: uid=1000 from=<vagrant> postfix/cleanup[19542]: 019023A06AB: message-id= <20130620140358.019023A06AB@mail-server-berkshelf> postfix/qmgr[16843]: 019023A06AB: from=<[email protected]>, size=382, nrcpt=1 (queue active) dovecot: lda: Debug: Loading modules from directory: /usr/lib/dovecot/modules dovecot: lda: Debug: Module loaded: /usr/lib/dovecot/modules/lib90_sieve_plugin.so dovecot: lda: Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: Connection refused dovecot: lda: Fatal: Internal error occurred. Refer to server log for more information. postfix/pipe[19545]: 019023A06AB: to=<[email protected]>, relay=dovecot, delay=1.2, delays=0.04/0.01/0/1.1, dsn=4.3.0, status=deferred (temporary failure) 

“连接被拒绝”错误应该是我正在攻击的错误,对吧? 我在很多地方search了解这里发生了什么,但没有遇到任何有用的东西。

任何人都可以提供任何线索或见解? 一个解决scheme将是伟大的,但我很高兴接受一些新的想法尝试。

连接拒绝错误确实是这个问题。 在unix套接字上拒绝连接并不是非常直观的,但是它表明在套接字上没有任何监听(通常,进程已经死了,或者给出的地址本身不是套接字)。 这应该永远不会是一个权限问题,除非由于权限,dovecot无法打开套接字进行侦听。

尝试停止dovecot和postfix,删除/var/run/dovecot/auth-userdb的套接字文件,然后再次启动postfix和dovecot(确保用户dovecot作为/var/run/dovecot权限/var/run/dovecot )。 通常这会解决这类问题。

Netstat也将显示unix域套接字。 检查其输出(使用netstat -nvlap | less并searchpath或for dovecot)以确保dovecot正在侦听。