服务器简单邮箱配置

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

$service sendmailstop #关闭

$chkconfig sendmailoff #禁止开机启动

$service postfixstop

$chkconfig postfixoff

$yum install mailx

第二种ubuntu安装方法:
vi /etc/nail.rc或者/etc/s-nail.rc

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

$ vi /etc/mail.rc
set [email protected]
set smtp=smtp://smtp.qq.com

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

服务器简单邮箱配置_第1张图片
授权码

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

你可能感兴趣的:(服务器简单邮箱配置)