2015.09.12
メールサーバー
送信専用メールサーバー (postfix)
ローカルからメール送信を行う送信専用メールサーバー(CentOS6.7)の構築です。
受信はしないのでポートの解放は行いません。
※DNSは設定済み (A, MX)
1 | # rpm -qa | grep postfix |
1 | # yum -y install postfix |
1 2 | # postconf | grep version mail_version = 2.6.6 |
1 | vi /etc/postfix/main .cf |
# コメントアウトの場合は外して以下を設定。(若干設定不要なものもあると思います)
myhostname = mail.xxx.com ( FQDNを設定する )
mydomain = xxx.com ( ドメイン設定 )
myorigin = $mydomain
inet_interfaces = localhost ( ローカル専用 )
inet_protocols = ipv4
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks_style = 127.0.0.0/8
mynetworks = localhost
smtpd_banner = $myhostname ESMTP unknown
1 2 3 | # chkconfig postfix on # chkconfig --list | grep postfix postfix 0:off 1:off 2:on 3:on 4:on 5:on 6:off |
1 | # service postfix restart |
1 2 3 4 5 | # mail hoge@xxxx.com Subject: test hogehoge . EOT |
hoge@xxxx.com宛てにメールが届いていればOKです。