
設定ファイル変更時
accessファイル編集後、access.db化
makemap hash /etc/mail/access.db < /etc/mail/access
sendmail.mcファイル編集後、ハッシュ化
m4 sendmail.mc > sendmail.cf
再起動
/etc/init.d/sendmail [restart|condrestart]
キューの制御
sendmail -dp キューの確認
sendmail -q キューの再配送
sendmail -q -v キューの再配送(詳細)
※mailqコマンドを使うとキューの確認はできるが、再配送はできなかった。
sendmail ルールセットをテストする
# /usr/lib/sendmail -bt
-C cfファイルを指定することができる。ない場合は現在のsendmail.cfを参照する。
>3,0 mail_address
canonify input: **** @ gmail . com
Canonify2 input: **** < @ gmail . com >
Canonify2 returns: **** < @ gmail . com . >
canonify returns: **** < @ gmail . com . >
parse input: **** < @ gmail . com . >
Parse0 input: **** < @ gmail . com . >
Parse0 returns: **** < @ gmail . com . >
ParseLocal input: **** < @ gmail . com . >
ParseLocal returns: **** < @ gmail . com . >
Parse1 input: **** < @ gmail . com . >
Mailertable input: < gmail . com > **** < @ gmail . com . >
Mailertable input: gmail . < com > **** < @ gmail . com . >
Mailertable returns: **** < @ gmail . com . >
Mailertable returns: **** < @ gmail . com . >
MailerToTriple input: < **** . **** . net > **** < @ gmail . com . >
MailerToTriple returns: $# relay $@ **** . **** . net $: **** < @ gmail . com . >
Parse1 returns: $# relay $@ **** . **** . net $: **** < @ gmail . com . >
parse returns: $# relay $@ **** . **** . net $: **** < @ gmail . com . >
このチェックでは、mail_addressへの配送がリレーサーバを経由していることがチェックできる。
※参考
http://www.asi.co.jp/techinfo/unix/sendmail.html
http://docs.oracle.com/cd/E19683-01/817-0162/mailadmin-195/index.html