またまた備忘録です。
web開発をしていると、当然のことながらメールの送受信環境が必要になる。今回はひとまずメール送信環境を構築します。
環境
環境は以下の通り。
OS: Fedora10
構築
インストール
# yum install postfix
sendmailを削除
同じニッチに存在するsendmailの停止とFedora起動時のsendmail起動のストップ。
# /etc/init.d/sendmail stop
# chkconfig --del sendmail
sendmailとpostfixの切り替え
postfixに切り替える。Fedoraはsendmailとpostfixの切り替えを下記コマンドで可能。
# alternatives --config mta
/etc/postfix/main.cfの修正
myhostname = host.example.jpmydomain = example.jp
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks_style = subnet
mynetworks = 127.0.0.0/8
自動起動
/etc/init.d/postfix start
chkconfig postfix on
参考
- Mail:開発マシンでのOP25B対策
- Mail:送信メールサーバー(Postfix)をつくり、メールの送信の準備をする。
- http://www.easy-in.net/archives/14/:CentOSへのPostfixインストール]
