系統組成:
郵件通訊協定:
SMTP Server
安裝
# yum install -y postfix
開機時啟動
# chkconfig postfix on
啟動服務
# service postfix start
防火牆
# iptables -I INPUT -p tcp --dport 25 -j ACCEPT
修改postfix的組態檔
# vim /etc/postfix/main.cf
myhostname = postfix149.example.com //完整的FQDN
mydomain = example.com
myorigin = $myhostname
inet_interfaces = all //記得註解inet_interfaces = localhost
mynetworks = 140.112.xxx.xxx/25, 127.0.0.0/8
# service postfix restart
測試服務是否開啟
# telnet 140.112.xxx.xxx 25
Trying 140.112.xxx.xxx...
Connected to 140.112.xxx.xxx.
Escape character is '^]'.
220 postfix149.example.com ESMTP Postfix
# telnet postfix149.example.com 25
Trying 140.112.xxx.xxx...
Connected to postfix149.example.com.
Escape character is '^]'.
220 postfix149.example.com ESMTP Postfix
寄信測試
# mail -s "postfix_test" aaa@bbb.ccc
這是測試信
. //『.』是結束符號
EOT
沒有留言:
張貼留言