Archive: 2014/08/29

postfixの忘れ物

6月にTrusty化した「さくらのVPS」の自前サーバ。

新しい開発案件用にテストメールアカウントを作成し、外部から送信したところエラー発生。/var/log/mail.logをチェックしたところ

Aug 28 12:49:21 vps postfix/local[30170]: 21266220B29: to=, relay=local, delay=0.51, delays=0.44/0.01/0/0.06, dsn=5.3.0, status=bounced (command line usage error. Command output: /usr/lib/dovecot/deliver: invalid option -- 'n' Usage: dovecot-lda [-c ] [-a
] [-d ] [-p ] [-f ] [-m ] [-e] [-k] )
という事らしい。

言うに事欠いてinvalid optionって何よ?しかもpostfixじゃなくてdovecot-ldaですか?

という事で調べてみたところ、/etc/postfix/main.cfmailbox_commandの記述が問題らしい。dovecotのバージョンアップに追従できないらしく、/etc/dovecot/conf.d/01-dovecot-postfix.confも無くなっているので、

yano@vps:~$ diff /etc/postfix/main.cf.20140607 /etc/postfix/main.cf
75c75,76
< mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/conf.d/01-dovecot-postfix.conf -n -m "${EXTENSION}"
---
> # mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/conf.d/01-dovecot-postfix.conf -n -m "${EXTENSION}"
> mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/conf.d/15-lda.conf -m "${EXTENSION}"
…な感じで改修し、無事に送受信できるようになった。
Aug 28 13:52:45 vps postfix/smtpd[31583]: connect from relay.shared-server.net[211.13.204.74]
Aug 28 13:52:45 vps postfix/smtpd[31583]: EE2A2220C89: client=relay.shared-server.net[211.13.204.74]
Aug 28 13:52:45 vps postfix/cleanup[31590]: EE2A2220C89: message-id=<62CFC27BDBFD84test-sender@nalab.jp>
Aug 28 13:52:45 vps postfix/qmgr[31398]: EE2A2220C89: from=, size=1704, nrcpt=1 (queue active)
Aug 28 13:52:45 vps postfix/smtpd[31583]: disconnect from relay.shared-server.net[211.13.204.74]
Aug 28 13:52:46 vps dovecot: lda(test): msgid=<62CFC27BDBFD84test-sender@nalab.jp>: save failed to open mailbox alert: Mailbox doesn't exist: alert
Aug 28 13:52:46 vps dovecot: lda(test): msgid=<62CFC27BDBFD84test-sender@nalab.jp>: saved mail to INBOX
Aug 28 13:52:46 vps postfix/local[31591]: EE2A2220C89: to=, relay=local, delay=0.1, delays=0.07/0/0/0.03, dsn=2.0.0, status=sent (delivered to command: /usr/lib/dovecot/deliver -c /etc/dovecot/conf.d/15-lda.conf -m "${EXTENSION}")
Aug 28 13:52:46 vps postfix/qmgr[31398]: EE2A2220C89: removed