标签:yum mail -s 2-2 centos 发送 roo mutt 配置邮件 password
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
标签:yum mail -s 2-2 centos 发送 roo mutt 配置邮件 password
原文地址:http://blog.51cto.com/12736521/2311455