配置cacti郵件警示,postfix與sendmail衝突 環境:centos6.2,cacti 0.8.8.a,net-snmp5.5 1、今天弄cacti郵件警示,剛開始啟動sendmail不成功,一直提示: ”sendmail dead but subsys locked sm-client (pid 13588) is running...“, 之後查看其/var/log/maillog提示“postfix/smtpd[10859]: disconnect from localhost[127.0.0.1]” 及25連接埠, netstat -tlnp |grep :25tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 11180/master tcp 0 0 ::1:25 :::* LISTEN 11180/master 之後停止postfix或sendmail,使用其中之一,好像是centos6.2自動安裝並啟動了postfix伺服器, 2、配置 安裝thold-v0.4.9-3.tgz、plugin-monitor-v1.3-1.tgz外掛程式,解壓放到cacti/plugins 目錄下,到控制台啟用外掛程式, console-->seting--->Mail/DNS-- Mail Services 我用的是SMTP ,根據自己的選擇,但是大部分情況用sendmail會出錯+From Email Address huazi_91@139.comFrom Name problem alert SMTP Options中都要寫真實的自己的郵局,不然smtp的發信機制會發布出去 SMTP Hostname 寫自己的,我的是huazi_91@139.comSMTP Port 25SMTP Username huazi_91@139.comSMTP Password xxxx Console -> Cacti Settings-Thresholds 選項下面這些都是主意修改的地方 Base URL 這個會自動探索不用寫Syslogging 這個勾要選擇,不然他不會給你發郵件Dead Hosts Notifications 這個要選擇Dead Host Notification Email 這個是主機down掉會發郵件通知誰(這裡寫要通知的郵局,多人可以用逗號隔開)。 From Email Address 寫郵件的發送方 From Name 寫problem alert 1.發送郵件警示錯誤Checking Configuration...Creating Message Text... This is a test message generated from Cacti. This message was sent to test the configuration of your Mail Settings. Your email settings are currently set as follows Method: SendmailSendmail Path: /usr/sbin/sendmail Sending Message... ERROR: DirectInject command output: 'Recipient names must be specified ' error: ''DirectInject command output: 'Recipient names must be specified ' error: '' ===================那麼setting---mail/DNS選項或者alert選項中,把sendmail發信機制改成smtp 2.如果出現553.3.8.2 認證錯誤,那麼請填寫正確smtp資訊比如使用者名稱密碼 之後,就是設定閥值警示