第三个:Linux配置第三方邮件代理,发送邮件与测试!

意思就是使用自己的Linux服务器代理一个已有的邮箱(比如163.com),向另外一个邮箱(比如qq.com)发送电子邮件。

例如我自己这次测试:

1、系统

    CentOS Linux release 7.4.1708 (Core)

2、安装mailx

      [root@m01 ~]#yum install mailx
      [root@m01 ~]# mail -V

       12.5 7/5/10

3、修改/etc/mail.rc

    set [email protected]
    set smtp=smtp.163.com
    set [email protected]

    注意:这个password不是你的邮箱登录密码,而是客户端授权码(即授权其他第三方登录时需要使用的密码)

    set smtp-auth-password=******

    set smtp-auth=login

4、测试

    [root@m01 ~]# mailx -v -s 'hello' '[email protected]'

    hello world

5、截图

    邮件发送成功



    6、做这个笔记后面应该能在zabbix邮件告警中用到

猜你喜欢

转载自blog.csdn.net/administrator4/article/details/80755903
今日推荐