centos7怎么使用postfix发送邮件
linux  /  管理员 发布于 7年前   245
1、配置hosts映射
2、安装Postfix与Mailx工具
[root@mail ~]# yum -y install postfix mailx[root@mail ~]# systemctl start postfix[root@mail ~]# systemctl enable postfix[root@mail ~]# netstat -anput | grep 25tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 1820/master
3、定义Postfix配置文件
[root@mail ~]# vim /etc/postfix/main.cfmyhostname = mail.mds.commydomain = mds.commyorigin = $mydomaininet_interfaces = allmydestination = $myhostname,$mydomain
4、申请163邮件证书
[root@mail ~]# mkdir /root/.certs[root@mail ~]# echo -n | openssl s_client -connect smtp.163.com:465 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ~/.certs/163.crt[root@mail ~]# certutil -A -n "GeoTrust Global CA" -t "C,," -d ~/.certs -i ~/.certs/163.crt[root@mail ~]# certutil -A -n "GeoTrust SSL CA" -t "C,," -d ~/.certs -i ~/.certs/163.crt[root@mail ~]# certutil -L -d /root/.certs[root@mail ~]# certutil -A -n "GeoTrust SSL CA - G3" -t "Pu,Pu,Pu" -d ~/.certs/ -i ~/.certs/163.crt
5、借用163邮箱发送邮件
[root@mail ~]# vim /etc/mail.rcset ssl-verify="ignore"set smtp-auth="login"set from="[email protected]"set smtp="smtps://smtp.163.com:465"set smtp-auth-user="[email protected]"set smtp-auth-password="123456"set nss-config-dir="/root/.certs"
6、重启服务并发送测试邮件
[root@mail ~]# systemctl restart postfix[root@mail ~]# echo "This is a test mail" | mail -s '邮件测试' [email protected]
7、确认接收邮件
相关教程推荐:centos教程
以上就是centos7怎么使用postfix发送邮件的详细内容,更多请关注其它相关文章!
122 在
学历:一种延缓就业设计,生活需求下的权衡之选中评论 工作几年后,报名考研了,到现在还没认真学习备考,迷茫中。作为一名北漂互联网打工人..123 在
Clash for Windows作者删库跑路了,github已404中评论 按理说只要你在国内,所有的流量进出都在监控范围内,不管你怎么隐藏也没用,想搞你分..原梓番博客 在
在Laravel框架中使用模型Model分表最简单的方法中评论 好久好久都没看友情链接申请了,今天刚看,已经添加。..博主 在
佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 @1111老铁这个不行了,可以看看近期评论的其他文章..1111 在
佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 网站不能打开,博主百忙中能否发个APP下载链接,佛跳墙或极光..
Copyright·© 2019 侯体宗版权所有·
粤ICP备20027696号