Postfix の transport には,宛て先のアドレスまで 書けるのでうまくいくかも.
transport に登録したユーザは,IronPort に smtp で転送されるようにする.
すべて mail1 にておこなう. 0) sendmail を止める. iptables のテーブルを変更して,25ポートを受け付けないようにする.
1) postfix のパッケージをインストールする
# up2date postfix # up2date redhat-switch-mail # /usr/sbin/postfix stop # chkconfig postfix off (<-- 念のため)
1) redhat-switch-mail にて, システムの MTA を Postfix に変更する.
# /usr/sbin/postfix stop # chkconfig postfix off (<-- 念のため)
2) /etc/postfix/main.cf を編集する.
myhostname=mail1.example.jp mydomain = example.jp myorigin = $myhostname # inet_interfaces = localhost <-- コメントアウトする mydestination = $myhostname, localhost.$mydomain mynetworks = 172.16.1.2/32, 172.16.2.0/25, 127.0.0.0/8 <-- mail2 と IronPort relay_domains = $mydomain # TRANSPORT MAP # # Insert text from sample-transport.cf if you need explicit routing. transport_maps = hash:/etc/postfix/transport
その他
smtpd_helo_required = yes disable_vrfy_command = yes strict_rfc821_envelopes = yes
3) /etc/postfix/transport に以下のような行を加える. (3行目以下が,SPAM SCAN をする宛て先ユーザ)
example.jp smtp:[mail2.example.jp] .example.jp smtp:[mail2.example.jp] username1@example.jp smtp:[ironport.example.jp] username2@example.jp smtp:[ironport.example.jp] ...
4)
postmap /etc/postfix/transport
で反映させる.
# postfix check
# postcat -q quieue-id
# postsuper -d queiue-id