欢迎光临
我们一直在努力

centos配置邮件服务器

           Centos7下使用mail发送邮件

修改配置文件,配置邮件相关内容(追加到配置文件末尾)
[root@ProxyServer ~]# vi /etc/mail.rc
set from=373416873@qq.com
set smtp=smtp.qq.com
set smtp-auth-user=373416873@qq.com
set smtp-auth-password=password

set smtp-auth=login
set smtp-port=587
测试
echo "Hello, world" | mail -s "ceshi" 373416873@qq.com

如果不成功,执行下面操作

首先检测相关服务是否已安装
[root@ProxyServer ~]# rpm -qa|grep mail

libreport-plugin-mailx-2.0.9-19.el6.x86_64

mailx-12.4-7.el6.x86_64

procmail-3.22-25.1.el6.x86_64

mailcap-2.1.31-2.el6.noarch

sendmail-8.14.4-8.el6.x86_64
若服务未安,则执行以下命令进行服务安装
[root@ProxyServer ~]# yum install sendmail

[root@ProxyServer ~]# yum install mailx –y

[root@ProxyServer ~]# yum update libreport-plugin-mailx

[root@ProxyServer ~]# yum -y install sharutils

[root@ProxyServer ~]# yum install mutt

赞(0)
【声明】:本博客不参与任何交易,也非中介,仅记录个人感兴趣的主机测评结果和优惠活动,内容均不作直接、间接、法定、约定的保证。访问本博客请务必遵守有关互联网的相关法律、规定与规则。一旦您访问本博客,即表示您已经知晓并接受了此声明通告。