服务器简单邮箱配置

2018-08-24  本文已影响18人  螃蟹和骆驼先生Yvan

一、linux安装邮件发送工具mailx

$service sendmailstop #关闭

$chkconfig sendmailoff #禁止开机启动

$service postfixstop

$chkconfig postfixoff

$yum install mailx

第二种ubuntu安装方法:
sudo apt-get install heirloom-mailxvi /etc/nail.rc或者/etc/s-nail.rc

二、配置Zabbix服务端外部邮箱 我配置的是qq

$ vi /etc/mail.rc
set from=179061434@qq.com
set smtp=smtp://smtp.qq.com

smtp.qq.com
set smtp-auth-user=179061434@qq.com smtp-auth-password=xxxxxxx 这里注意password是授权码
set smtp-auth=login
:wq! #保存退出
访问:
echo "hello" | mail -s "嘿嘿" 1258834323@qq.com

授权码

如果想知道什么是授权码参考:
https://www.jianshu.com/p/ed4803c140ca

上一篇 下一篇

猜你喜欢

热点阅读