CentOS 4.2 に postfix 設定
●メールサーバー設定(
http://uniunix.net/contents/postfix.html ← 閉鎖されてた)
◎Postfixの設定
rpm -q postfix ←Postfixがインストールされてるかの確認
yum install postfix ←上記でインストールされていない場合
service sendmail stop ←sendmailの停止
chkconfig sendmail off ←自動起動しないように設定
alternatives --config mta ←次に通常使用するMTAをPostfixに変更(操作必要)
chkconfig --level 345 postfix on ←自動起動の設定
service postfix start ←postfixの開始
yum -y remove sendmail ←sendmailの削除
vi /etc/postfix/main.cf
いろいろ変更した箇所
-------------------------
myhostname = mail.hogehoge.jp
mydomain = hogehoge.jp
myorigin = $mydomain
inet_interfaces = all
#inet_interfaces = localhost
#mydestination = $myhostname, localhost.$mydomain, localhost
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks_style = subnet
mynetworks = 192.168.1.0/24, 127.0.0.0/8
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases
relay_domains = $mydestination
home_mailbox = Maildir/
local_recipient_maps=
最後に書き加えた箇所
-------------------------
#smtpd_sasl_auth_enable = yes ←SMTP Authの有効
#smtpd_sasl_local_domain = $myhostname
#smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,reject_unauth_destination ←実際には1行
#broken_sasl_auth_clients = yes
smtpd_banner = $myhostname ESMTP unknown ←バナーをESMTPで返す
smtpd_helo_required = yes ←HELOを必要とする
disable_vrfy_command = yes ←VRFYコマンドの拒否
# FML uses :include:
allow_mail_to_commands = alias,forward,include
#owner_request_special = no
recipient_delimiter = +