1
0

More than 5 years have passed since last update.

postfix でメール送信先を制限(固定)する

Posted at

概要

開発環境等で特定の宛先にしかメールを送信したくない場合の設定メモ

設定内容

# vi /etc/postfix/main.cf

//以下を追加
canonical_maps = regexp:/etc/postfix/canonical.regexp
# vi /etc/postfix/canonical.regexp

#全てのメール
/^.+$/ xxx@example.com

#特定ドメインを除外
!/.+\@(hogehoge\.co\.jp|.*\.hogehoge\.jp)/ xxx@example.com

#送信先ドメインを変更
/@.+$/ @example.com

# /etc/init.d/postfix reload
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0