web-dev-qa-db-ja.com

postfix / dovecotは「postmaster_address設定が指定されていません」と言っていますが、

MySQLに格納されている仮想ドメインと連携するようにpostfixとdovecotを設定しようとしていますが、メールが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のldaプロトコル行にpostmaster_addressオプションを追加する必要がある」への多くの参照を見つけました。

それは、ここに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
}

my / etc/postfix/master.cf dovecotに接続するためにこれが含まれています

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

このエラーの原因を確認するために他に何を確認できますか?

6
Piku

私はそれを修正しましたが、修正はそれほど明白ではありませんでした。

欠落しているpostmaster_address設定があることは、実際の問題ではありませんでした。 dovecot-ldaが正しい設定ファイルを表示しないことが実際の問題でした

しかし、より深い問題は、私がランダムにGoogleで見つけたこの「機能」であるようです https://bugs.launchpad.net/ubuntu/+source/dovecot/+bug/671065 ここで

deliver設定(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はそれを読み取ることができます。これは実際の解決策というよりは恐ろしいハックのように感じられます...しかし、今はメールが機能しています。

この状況に陥るUbuntuを使用している人がいる場合に備えて、ここではこの回答を残します。私が修正した時間よりも少ない時間を費やしていただけますか。

9
Piku

私にとってより良い答えは追加することでした

postmaster_address=postmaster at DOMAIN

あなたの "DOMAIN"を実際のドメインに置き換えてください

/etc/dovecot/dovecot.conf

そしてdovecotを再起動します

service dovecot restart

私の答えではありません...私はここでそれを見つけました: https://github.com/mail-in-a-box/mailinabox/issues/31 そしてそれは私の問題を修正しました。

2
mattybee