閉じる

Domain of sender address

ISPのほうでメールサーバの引っ越しをしたら社内サーバからのメールが届かなくなった。

Postfixから ISPへ投げる時点で認証が必要になったようなので Postfixの設定を変える事でとりあえずメールは届くようになった…「Undelivered Mail Returned to Sender」という通知として…_no

通知の内容としては以下の通り。

This is the mail system at host lachesis.localdomain.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The mail system

<XXXX@exsample.com> (expanded from <root>): host
mail.exsample.com[000.000.000.000] said: 553 5.1.8
<root@lachesis.localdomain>... Domain of sender address
root@lachesis.localdomain does not exist (in reply to MAIL FROM command)

要はメールの差出人がローカルドメインになっているから弾きましたよと。

fromを自分のアカウントのドメインに設定してやると届くのは確認できたけど、cron等が出すメールについてどうすればいいかわからず、「postfix ドメインの書き換え」ってなキーワードで調べた結果、smtp_generic_mapsというパラメータを設定すればいいことがわかった。

echo smtp_generic_maps = hash:/etc/postfix/generic >>/etc/postfix/main.cf
echo root@lachesis.localdomain XXXX@exsample.com >>/etc/postfix/generic
postmap /etc/postfix/generic

どこまで書き換えればいいのかわからなかったので、当面必要とされるアドレスをまんま書き換えてみた。

コメントを残す

メールアドレスが公開されることはありません。必須項目には印がついています *

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)