Centos 发送smtp邮件
Posted 季伯平
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Centos 发送smtp邮件相关的知识,希望对你有一定的参考价值。
说明:
1.本文是用网易smtp服务,QQ的没试过
2.在Centos7上测试
实现:
1.关闭本机的sendmail服务或者postfix服务
sendmail
# service sendmail stop
# chkconfig sendmail off
postfix
# service postfix stop
# chkconfig postfix off
2.修改/etc/mail.rc,增加一下类似N行,指定外部的smtp服务器地址、帐号密码等,前提网易SMTP服务要开启
![](https://image.cha138.com/20210607/9be293fd3b3f4d2488c9941236dce162.jpg)
![](https://image.cha138.com/20210607/2646f50a07a4495f85f214d3265e5473.jpg)
3.然后通过命令来发送邮件
![](https://image.cha138.com/20210607/c7d682187eb54d558464b8f68f57d5f9.jpg)
4.邮箱接收效果
![](https://image.cha138.com/20210607/a48f5e55754645bea12327c4e666feaf.jpg)
以上是关于Centos 发送smtp邮件的主要内容,如果未能解决你的问题,请参考以下文章