您好,登錄后才能下訂單哦!
Centos7下使用mail發(fā)送郵件
修改配置文件,配置郵件相關(guān)內(nèi)容(追加到配置文件末尾)
[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
測(cè)試
echo "Hello, world" | mail -s "ceshi" 373416873@qq.com
如果不成功,執(zhí)行下面操作
首先檢測(cè)相關(guān)服務(wù)是否已安裝
[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
若服務(wù)未安,則執(zhí)行以下命令進(jìn)行服務(wù)安裝
[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
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。