Postfix 2.10 から中継制限の設定が変わった (smtpd_recipient_restrictions はダメ)!
Ubuntu 13.04 を使ってRailsを動かす環境を作っていたのですが、ひさびさにはまり何時間もロスしてしまったので書いておきます。
Postfixで SMTPで認証を行い任意のIPアドレスからメール中継を可能にする設定は、2.09までは main.cf に
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
と指定します。検索すると、どこにもこの記述ができてきます。しかし Postfix 2.10 では 554 Relay access denied エラーになってしまいます・・・・
以前に設定した Ubuntu 12.04 (Postfix 2.09)の環境では上手く動作します。うぅぅぅ・・
いろいろと検索し、やっと http://www.postfix.org/SMTPD_ACCESS_README.html に答えが書いてありました
NOTE: Postfix versions before 2.10 did not have smtpd_relay_restrictions. They combined the mail relay and spam blocking policies, under smtpd_recipient_restrictions. ....
ということで、 smtpd_relay_restrictions を設定しましょう!
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination