配置DNS
mailwestos.example.com
vim /etc/named.rfc1912.zones
zone "westos.com" IN {
type master;
file "westos.com.zone";
allow-update { none; };
};
zone "linux.com" IN {
type master;
file "linux.com.zone";
allow-update { none; };
};
cp -p named.localhost westos.com.zone
vim /var/named/westos.com.zone
cp -p westos.com.zone linux.com.zone
vim /var/named/linux.com.zone
systemctl restart named
systemctl stop firewalld
vim /etc/postfix/main.cf
maillinux.example.com
●别名发送:
linux.com 主机向 westos.com主机发送邮件,使用别名发送
vim /etc/aliases
vim /etc/moreusers
root
student
postalias /etc/aliases
systemctl restart postfix.service
4.出站地址伪装
server (westos.com)主机:
vim /etc/postfix/generic
postmap /etc/postfix/generic
postconf -d | grep generic 会出来一段字符,选择最后的一行字符(如下),进行复制:
smtp_generic_maps =
postconf -e "smtp_generic_maps = hash:/etc/postfix/generic" ##此处用到上条语句复制的字符
systemctl restart postfix.servic
5.检测25端口
下载 yum install telnet -y
250 2.0.0 Ok: queued as 38E0C17E849
quit ##退出telnet
221 2.0.0 Bye
Connection closed by foreign host.