[japanese(日本語)]
1.sendmai forward setting.
sendmail.cf (sendmail.mc) , you can change SMART_HOST’s behaviof by using “[“.
[example] If you wanto to make sendmail forward always to mailserver.hoge.com, you should write the setting as follows.
DS[mailserver.hoge.com]
If you don’t use “[“, sendmail will decide the forward destination by searching MX record.
so It is no guarantee to forward mailserver.hoge.com.
2. stop forwarding except for specific domain.
(1)add alias
#echo 'trash: /dev/null' >> /etc/aliases
#newaliases
(2)modify mailertable
#vi /etc/mail/mailertable
hoge.jp.com smtp:[forwarding mail server]
. local:trash
(using "[ ]" to avoid searching MX record )
(3)convert mailertable
#makemap hash /etc/mail/mailertable < /etc/mail/mailertable
(4)resart sendmail
#/etc/rc.d/init.d/sendmail restart
3. If you could’t access DNS, and you want to forward another SMTP by sendmail.
make /etc/mail/service.switch. and write down as follows.
hosts files