Linux使用sendmail邮件监控[运维监控]

来源:互联网 发布:windows搭建服务器 编辑:程序博客网 时间:2024/05/22 22:28

1、安装sendmail(centos6.3下默认yum源,默认sendmail系统自带)
yum install sendmail* -y

问题1:会遇到发邮件和启动很慢或者My unqualified host name (iZ23ole851hZ) unknown; sleeping for retry

解决办法:vim /etc/hosts
11.11.11.11 localhost.localdomain localhost  yourhost
127.0.0.1  localhost.localdomain localhost


systemctl enable sendmail.

servicesystemctl start sendmail

systemctl restart sendmail

systemctl   status sendmail

测试发送一封邮件到自己的邮箱:

mail abc@qq.com

Subject: qweqweasdasd


Ctrl+D 发送到邮箱看看是否收到该邮件,收到则配置成功

[注意事项]本安装是在阿里云linux上面实践成功,配置简单,使用方便,【本地不可用】,如有问题可以联系QQ:1960105914

0 0
原创粉丝点击