首页 > 代码库 > SMTP简单邮件协议的服务配置
SMTP简单邮件协议的服务配置
1.desktop操作:
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
2.server操作:
3.别名发送:
要求:
desktop(linux.com) 主机向 server(westos.com)主机发送邮件,使用别名发送:mail lzt@westos.com (server主机里没有lzt用户)
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.
本文出自 “12110289” 博客,谢绝转载!
SMTP简单邮件协议的服务配置