編集Top > postfix2
vi /etc/rc.conf
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
でsendmailを止める
# cd /usr/ports/mail/postfix24
# make install clean
SASL2とTLSを任意でon
# vi /usr/local/etc/postfix/main.cf
ホストネームを指定
myhostname = mail.postfix.domain
ドメインネームを指定
mydomain = domain.tld
ローカルからのメール送信時に@以降に付与する値
myorigin = $mydomain
メールを受け取る範囲を指定する
inet_interfaces = all
ドメインでの受信を許可
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
許可するネットワークの指定
mynetworks = 168.100.189.0/28, 127.0.0.0/8
dir形式に変更
home_mailbox = Maildir/
サーバ情報の秘匿
smtpd_banner = mail.$mydomain ESMTP unknown

smtpauthの有効
smtpd_sasl_auth_enable = yes
ローカルの指定
smtpd_sasl_local_domain = $mydomain
匿名と暗号化されていない通信を拒否
smtpd_sasl_security_options = noanonymous, noplaintext
smtpauthをサポートしていないクライアントの対応
broken_sasl_auth_clients = yes
リレーの可否
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
permit_mynetworks mynetworksを許可
permit_sasl_authenticated smtpauthを許可
reject_unauth_destination それ以外を拒否
最終更新:2010年02月01日 10:05