在真实主机上,关闭火墙
hostnamectl set-hostname www.westos.com
vim /etc/postfix/main.cf
76 myhostname = www.westos.com
83 mydomain = westos.com
99 myorigin = westos.com
116 inet_interfaces = all
164 mydestination = $myhostname, $mydomain, localhost
systemctl restart postfix
在空壳主机上,stop firewalld
hostnamectl set-hostname nullmail.example.com
vim /etc/postfix/main.cf
76 myhostname = nullmail.example.com
83 mydomain = example.com
99 myorigin = westos.com
116 inet_interfaces = all
164 mydestination =
316 relayhost = 172.25.254.218
systemctl restart postfix
测试
在空壳主机上mail root
在真实主机上查看邮件信息