Centos设置外发邮箱
需要开放25端口
netstat -tunlp |grep 25
telnet smtp.qq.com 25
请关闭防火墙!!!!
1.安装yum -y install mailx
systemctl enable --now postfix
systemctl status postfix.service
2.修改配置
vim /etc/mail.rc
set from=邮箱帐号
set smtp=smtp.qq.com
set smtp-auth-user=邮箱帐号
set smtp-auth-password=vedjhwysgfxacbebe (例如QQ邮箱:邮箱页面生成授权码,设置--->账户下拉POP3/IMAP/SMTP/Exchange/CardDAV/CalDAV服务,点击生成授权码)