后缀/ dovecot说“postmaster_address设置不给”,但它是

我试图configurationpostfix和dovecot与存储在MySQL中的虚拟域一起工作,但是当邮件从postfix传递到dovecot的时候,我一直在遇到这个问题。

Apr 26 11:54:40 smtp postfix/pipe[13165]: 20CCE1C30D5: to=<[email protected]>, relay=dovecot, delay=45846, delays=45846/0.28/0/0.14, dsn=4.3.0, status=deferred (temporary failure. Command output: lda: Error: user [email protected]: Error reading configuration: Invalid settings: postmaster_address setting not given lda: Fatal: Internal error occurred. Refer to server log for more information. ) 

现在,因为我知道Google是如何工作的,所以我发现了很多参考资料:“你需要在15-lda.conf中添加postmaster_address选项到lda协议行。

这是doveconf -n的输出

 # 2.2.9: /etc/dovecot/dovecot.conf # OS: Linux 3.13.0-49-generic i686 Ubuntu 14.04.2 LTS ext4 auth_debug = yes auth_mechanisms = plain login auth_verbose = yes disable_plaintext_auth = no last_valid_uid = 5000 mail_debug = yes mail_gid = vmail mail_location = maildir:/var/mail/virtmail/%d/%n mail_uid = vmail managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave namespace inbox { inbox = yes list = yes location = maildir:/var/mail/virtmail/%d/%n mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = separator = / subscriptions = yes type = private } passdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename sieve = ~/.dovecot.sieve sieve_dir = ~/sieve } postmaster_address = [email protected] protocols = imap pop3 sieve service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0666 user = postfix } unix_listener /var/spool/postfix/private/dovecot-auth { group = postfix mode = 0660 user = postfix } unix_listener auth-userdb { group = vmail mode = 0600 user = vmail } } ssl_cert = </etc/ssl/private/home.piku.org.uk.crt ssl_cipher_list = ALL:!LOW:!SSLv2:ALL:!aNULL:!ADH:!eNULL:!EXP:RC4+RSA:+HIGH:+MEDIUM ssl_key = </etc/ssl/private/home.piku.org.uk.key userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } protocol imap { imap_client_workarounds = delay-newmail mail_max_userip_connections = 100 } protocol pop3 { mail_max_userip_connections = 10 pop3_client_workarounds = outlook-no-nuls oe-ns-eoh } protocol lda { deliver_log_format = msgid=%m: %$ mail_plugins = sieve sieve postmaster_address = postmaster quota_full_tempfail = yes rejection_reason = Your message to <%t> was automatically rejected:%n%r } 

我的/etc/postfix/master.cf包含这个连接到dovecot

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

我还能检查什么导致这个错误?

我修好了,但是修复并不是那么明显。

有一个失踪的postmaster_address设置不是实际的问题。 dovecot-lda不看正确的configuration文件是真正的问题

然而,更深层次的问题似乎是我随机在Google上发现的“function” https://bugs.launchpad.net/ubuntu/+source/dovecot/+bug/671065

deliverconfiguration(LDA)存储在'/etc/dovecot/conf.d/01-mail-stack-delivery.conf'中。 由于dovecot的deliver忽略了include_try和!include中包含的文件,所以这个问题基本上被破坏了。 这个问题显示了这个错误:

 Fatal: postmaster_address setting not given 

并通过添加-c /etc/dovecot/conf.d/01-mail-stack-delivery.confmaster.cf中的dovecot-lda命令行来解决(虽然然后您必须使conf.d和文件本身是世界可读的,所以非根dovecot-lda可以读取它,这感觉像一个可怕的黑客,而不是一个实际的解决scheme…但现在我有工作邮件。

我在这里留下这个答案,以防有其他人在这种情况下使用Ubuntu。 你可以花更less的时间比我修理它。

对我来说更好的答案是补充

 postmaster_address=postmaster at DOMAIN 

显然在你的域名中replace你的域名为“域名”

/etc/dovecot/dovecot.conf

然后重新启动dovecot

 service dovecot restart 

不是我的答案…我只是在这里find它: https : //github.com/mail-in-a-box/mailinabox/issues/31 ,它解决了我的问题。