yum install sendmail mailx


[email protected] 为发邮件邮箱,[email protected]为收邮件邮箱


vi /etc/mail.rc

插入以下内容

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

set [email protected]    smtp-auth-password=123456

set smtp-auth=login


vi /etc/nagios/object/contact.cfg

修改

email   nagios@localhost

email    [email protected]


vi host.cfg和service.cfg

将notifications_enabled    改为1