首页 > nagios > mail(exim4)发邮件没反应

mail(exim4)发邮件没反应

2010年7月21日 eric 发表评论 阅读评论

从新搭建的 Nagios 服务器,该监控的业务服务都添加了内存,磁盘I/O,nginx 连接的监控,今天测试了一下邮件报警,居然不报警,查看 nagios.log 日志 有这样的错误:

[1279598130] SERVICE NOTIFICATION: eric;fms;int_net;UNKNOWN;notify-service-by-email;ERROR: Description table : The requested table is empty or does not exist.
[1279598130] Warning: Attempting to execute the command “/usr/bin/printf “%b” “***** Nagios *****\n\nNotification Type: PROBLEM\n\nService: int_net\nHost: fms-server\nAddress: 219.232.237.166\nState: UNKNOWN\n\nDate/Time: Tue Jul 20 11:55:30 CST 2010\n\nAdditional Info:\n\nERROR: Description table : The requested table is empty or does not exist.” | /bin/mail -s “** PROBLEM Service Alert: fms-server/int_net is UNKNOWN **” eric@nginxs.com” resulted in a return code of 127.  Make sure the script or binary you are trying to execute actually exists…

“Make sure the script or binary you are trying to execute actually exists…”  提示的 mail 命令不存在

nagios $> whereis mail

mail: /usr/bin/mail /etc/mail.rc /usr/share/man/man1/mail.1.gz

路径果然 不是  /bin/mail

修改 commands.cfg

define command{
        command_name    notify-host-by-email
        command_line    /usr/bin/printf “%b” “***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n” | /usr/bin/mail -s “** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **” $CONTACTEMAIL$
        }

改过之后,还不行·那就直接用系统自带的 命令 mail 发送email

nagios $> mail -s "test" eric@nginxs.com < /root/test

没有返回任何东西。那就加上-v参数打印他的行踪

nagios $> mail -v -s "test" eric@nginxs.com < /root/test
LOG: MAIN
  <= root@fms U=root P=local S=5703
root@fms:/usr/local/nagios/etc/objects# delivering 1ObWQb-0002nV-BI
R: system_aliases for test@fms
LOG: MAIN
  ** test@fms: Unrouteable address
R: nonlocal for eric@nginxs.com
LOG: MAIN
  ** eric@nginxs.com R=nonlocal: Mailing to remote domains not supported
LOG: MAIN
  <= <> R=1ObWQb-0002nV-BI U=Debian-exim P=local S=6505
delivering 1ObWQb-0002nX-EQ
R: system_aliases for root@fms
R: system_aliases for eric@fms
R: userforward for eric@fms
R: procmail for eric@fms
R: maildrop for eric@fms
R: lowuid_aliases for eric@fms (UID 1000)
R: local_user for eric@fms
T: appendfile for eric@fms
LOG: MAIN
  Completed
LOG: MAIN
  => eric <root@fms> R=local_user T=mail_spool
LOG: MAIN
  Completed

没有验证远程 email 服务器,发现他用的 debian-exim 去发的,于是看的它的配置文件:

nagios $> vim /etc/exim4/update-exim4.conf.conf
dc_eximconfig_configtype='local'
dc_other_hostnames='fms'
dc_local_interfaces='127.0.0.1'
dc_readhost=''
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets=''
dc_smarthost=''
CFILEMODE='644'
dc_use_split_config='false'
dc_hide_mailname=''
dc_mailname_in_oh='true'
dc_localdelivery='mail_spool'

注意红字部分,他指定的是本地,google   查明想往外发就要改为:

dc_eximconfig_configtype='internet'

也顺便伪造一下,发件人的地址与名字

nagios $> vim /etc/email-addresses

在最后添加:

eric:eric@tuokou.com

重启服务:

nagios $> /etc/init.d/exim4 restart

测试发送 email

nagios $>mail -v -s "test" eric@nginxs.com < /root/test
LOG: MAIN
  <= root@fms U=root P=local S=5703
root@fms:/usr/local/nagios/etc/objects# delivering 1ObWX9-0002zu-5r
R: system_aliases for test@fms
LOG: MAIN
  ** test@fms: Unrouteable address
R: dnslookup for eric@nginxs.com
T: remote_smtp for eric@nginxs.com
Connecting to mxdomain.qq.com [119.147.10.120]:25 ... connected
  SMTP<< 220 newmx42.qq.com MX QQ Mail Server
  SMTP>> EHLO fms
  SMTP<< 250-newmx42.qq.com
         250-SIZE 73400320
         250 OK
  SMTP>> MAIL FROM:<root@fms> SIZE=6936
  SMTP<< 250 Ok
  SMTP>> RCPT TO:<eric@nginxs.com>
  SMTP<< 250 Ok
  SMTP>> DATA
  SMTP<< 354 End data with <CR><LF>.<CR><LF>
  SMTP>> writing message and terminating "."
  SMTP<< 250 Ok: queued as
  SMTP>> QUIT
LOG: MAIN
  => eric@nginxs.com R=dnslookup T=remote_smtp H=mxdomain.qq.com [119.147.10.120                                                                                                 ]
LOG: MAIN
  <= <> R=1ObWX9-0002zu-5r U=Debian-exim P=local S=6424
delivering 1ObWXF-000304-Jo
R: system_aliases for root@fms
R: system_aliases for eric@fms
R: userforward for eric@fms
R: procmail for eric@fms
R: maildrop for eric@fms
R: lowuid_aliases for eric@fms (UID 1000)
R: local_user for eric@fms
T: appendfile for eric@fms
LOG: MAIN
  Completed
LOG: MAIN
  => eric <root@fms> R=local_user T=mail_spool
LOG: MAIN
  Completed 

注意红字部分,发送成功了··
登录邮箱,收到了用户 eric 地址为eric@nginxs.com 发来的了。

转载请注明:文章转载自:Eric's linux and nginx! (http://www.nginxs.com)
本文地址:http://www.nginxs.com/linux/201.html

分类: nagios 标签: , ,
  1. 2018年5月11日10:30 | #1

    Air conditioning motors may have repairing every so often.

  2. 2018年5月11日15:13 | #2

    This resolution is also referred to as carpet shampoos.

  3. 2018年5月11日22:26 | #3

    kamagra oral jelly kaufen paypal
    kamagra kopen waar
    kamagra reviews
    kamagra oral jelly forum hr

  4. 2018年5月13日14:23 | #4

    All the homes have unfinished basements.

  5. 2018年5月13日22:52 | #5

    what are sildenafil citrate tablets ip
    sildenafil citrate 100mg tablets
    sildenafil citrate 100mg tab side effects
    sildenafil citrate dosing

  6. 2018年5月14日11:51 | #6

    Appears like a legit cost to complete your basement.

  7. 2018年5月14日12:24 | #7

    Jeny is a identified professional on black mould remove.

  8. 2018年5月15日06:28 | #8

    cvs online pharmacy
    online canadian pharmacies
    Online Pharmacies

  9. 2018年5月15日09:33 | #9

    Tinted home windows supply several advantages.

  10. 2018年5月15日20:12 | #10

    free casino games and poker
    casino games slots
    casino online subtitrat
    casinos online

  11. 2018年5月16日17:21 | #11

    cialis kautabletten kaufen|just try cialis online canada|cialis levitra oh viagr|pharmacy mexico female cialis|cost cialis 10 mg|cutting cialis pills half|best website to buy cialis|prix de cialis eu|cialis diari|cheapest cialis pills india|cialis gnrique rx|how much are cialis pills|en ligne ordre de cialis|cialis levitra trial pack|cialis online amazon|cialis discounts washington|cheap cialis with dapoxetine|cialis mg 50|enter site levitra vs cialis|cost for cialis 5mg in canada|cialis compra suave|cialis 10mg dosierung|verordnung cialis|enter site pharmacy cialis|cialis genricos baratos|the best site cialis kanada|we choice uk cialis sales|buy cialis in the usa|cialis generic 20 mg|only here generic cialis india|acheter du cialis en ligne|try it brand cialis|online cialis verkauf|cialisproben in kanada|2 day cialis delivery|cialis 20 posologi|try it discount online cialis|cialis coupons and discounts|cialis tadalafil vente|buy real cialis|marijuana with cialis|cialis for daily use 5mg|cialis preis billig|precios cialis chile|very good site cialis on sale|cialis voor vrouwen|cialis dosing|commander cialis tadalafi|side cialis effects|buy genuine cialis uk|wow look it cialis online 50mg| cialis generika|cialis 5 mg alcohol|costo cialis 20|acquisti cialis in italia|once day cialis price|generisches cialis paypal|precio de cialis 5 mg|cialis 20mg vente au canada|cialis 20 mg 12 tabl|cialis existe generico|cialis recomended extra dose|cialis black 800mg pills|cialis rapid|enter site cialis on sale|powder cialis online|we recommend cialis to order|cialis and edex together|cialis vs levitra review|going price cialis|cialis and blindness|cialis best use|cialis black sin receta medica|cialis preis apotheke schweiz|buy low price cialis soft tab|cialis 20 mg uk|florida cialis|comprar cialis prilig|we recommend cialis best buy|effective cialis dose|cialis soft tablets for sale|click here cialis buy|i use it cialis versus levitra|cialis scaduto effetti|cialis original billig|cialis generique en pharmacie|buy brand cialis best price|cialis by post safe|notice du cialis 20mg|airfox cialis|preisvergleich cialis 20 mg 12|when does cialis go generic|cialis 10mg 2012 online paypal|look here order cheap cialis|existe cialis generico|cialis trial pack 38|online apotheke cialis 20mg|bester websitekauf cialis|online cialis preisvergleich|cialis germany|only here find cialis cheap|cialis ne fonctionne pas|cialis 20 ou 40 mg|cost cialis without insurance|daily cialis dosing|generico de cialis en mexico|cialis originale vendita|dose cialis buy|cialis femenino ms barato|vente libre cialis|where can i buy cialis cheap|generic discount cialis|buy cialis in tampa|vente au dtail de cialis|cialis tablets sale|look here cialis sale|cialis made in the usa|cialis prix france|cialis on line senza ricetta|efectos cialis|achat mdicament cialis|farmacia online cialis|cialis extranjero ms barato|price cialiss 100mg|only best offers find cialis|cialis uk 5mg generic|wow cialis england|cialis 20mg generico|best way to buy cialis|cialis daily 25 mg|cialis 25 mg|red cialis sale|kpa cialis p ntet|cialis 5mg best price australi|cialis pills taladafil|cialis 5mgs|cialis prix de vente|cialis 200 mg price|cipla cialis 5 mg best site|modalit uso cialis|visit our site cialis in uk|comprar cialis valparais|precio cialis receta|politique de cialis now|the best choice generic cialis|generique cialis pharmacie|visa cialis cheapest day|cialis bei glaukom|prendere due cialis da 5 mg|pilule cialis originale|cialis generic 40mg|cialis 2 5mg acheter|daily cialis dose|cialis feminin|wow online us cialis|cialis generico wikipedia|where do i buy cialis soft|cialis by mail|the best place 5 mg cialis|brand cialis buy uk|forum cialis acheter|online pharmacy cialis brand|cialis generico acquisto onlin|generic cialis side effects|cialis bph dose|wow cialis headaches|generic cialis pills e20|ja existe generico do cialis|10 mg baratos cialis|cialis belg|generic cialis 10 pills|achat cialis lilly le canada|comprar cialis en argentina|cialis online us|generic cialis risks|cialis 100mg canada|escompte de 20 mg de cialis|cialis le moins cher|click now cialis from india|cialis clinical studies|cialis confezioni costo|can you use cialis with beer|click here get cialis cheap|comprar cialis 20mg original|i use it where buy cialis|chi ha imparato cialis online|descuento legal cialis|we recommend buy cheap cialis|price cialis at tesco|cialis 5 mg 28 comprimidos|cialis delivered to canada|to buy cialis in dubai|cialis teilen|existe cialis generic|cialis 25mg review|cialis 4cpr|cialis er precio|prescriptions cialis|acheter du cialis|cialis prescriptions|dose cialis prendre|cialis canada overnight|cialis professional best price|overnight cialis mastercard|cialis maroc prix|generic cialis from walgreens|cialis 100 nebenwirkungen|cialis 20 mg best price au|el cialis donde comprar|cialis once day dosage|cialis online purchase usa|click here cialis 20 mg|dangers of generic cialis|dove acquistare cialis on line|link for you cialis overnight|low price generic cialis|cialis ebay co uk|where i can buy cheap cialis|pfizer cialis uk|generika cialis tadalafil 20mg|20mg cialis give me headaches|esiste il cialis da 50 mg|cialis mg price|cialis 10 mg prezzo farmacia|cialis overnight us pharmacy|cialis levitra per|buy cialis fda|using cialis|cheap cialis 5mg|does cialis work for you|cialis generic vs soft|kaufen cialis holland|cialis brand price|purchase cialis super active|only for you safe cheap cialis|pharmacie cialis viagr|cheap cialis free prescription|cialis 5mg generika|cialis original vente|cialis online kaufen paypa|cialis da 5 mg generico|cialis x pills|cialis 5 mg acquist|cialis 20mg achat|potenzmittel cialis testberich|cialis daily us price|buycialis en ligne|whatare the dosages for cialis|daily cialis 5 mg for sale|cialis verfallsdatum

    [url=http://cialistre12.com/]cialis cheap[/url]
    buy cialis

    cialis kautabletten kaufen|just try cialis online canada|cialis levitra oh viagr|pharmacy mexico female cialis|cost cialis 10 mg|cutting cialis pills half|best website to buy cialis|prix de cialis eu|cialis diari|cheapest cialis pills india|cialis gnrique rx|how much are cialis pills|en ligne ordre de cialis|cialis levitra trial pack|cialis online amazon|cialis discounts washington|cheap cialis with dapoxetine|cialis mg 50|enter site levitra vs cialis|cost for cialis 5mg in canada|cialis compra suave|cialis 10mg dosierung|verordnung cialis|enter site pharmacy cialis|cialis genricos baratos|the best site cialis kanada|we choice uk cialis sales|buy cialis in the usa|cialis generic 20 mg|only here generic cialis india|acheter du cialis en ligne|try it brand cialis|online cialis verkauf|cialisproben in kanada|2 day cialis delivery|cialis 20 posologi|try it discount online cialis|cialis coupons and discounts|cialis tadalafil vente|buy real cialis|marijuana with cialis|cialis for daily use 5mg|cialis preis billig|precios cialis chile|very good site cialis on sale|cialis voor vrouwen|cialis dosing|commander cialis tadalafi|side cialis effects|buy genuine cialis uk|wow look it cialis online 50mg| cialis generika|cialis 5 mg alcohol|costo cialis 20|acquisti cialis in italia|once day cialis price|generisches cialis paypal|precio de cialis 5 mg|cialis 20mg vente au canada|cialis 20 mg 12 tabl|cialis existe generico|cialis recomended extra dose|cialis black 800mg pills|cialis rapid|enter site cialis on sale|powder cialis online|we recommend cialis to order|cialis and edex together|cialis vs levitra review|going price cialis|cialis and blindness|cialis best use|cialis black sin receta medica|cialis preis apotheke schweiz|buy low price cialis soft tab|cialis 20 mg uk|florida cialis|comprar cialis prilig|we recommend cialis best buy|effective cialis dose|cialis soft tablets for sale|click here cialis buy|i use it cialis versus levitra|cialis scaduto effetti|cialis original billig|cialis generique en pharmacie|buy brand cialis best price|cialis by post safe|notice du cialis 20mg|airfox cialis|preisvergleich cialis 20 mg 12|when does cialis go generic|cialis 10mg 2012 online paypal|look here order cheap cialis|existe cialis generico|cialis trial pack 38|online apotheke cialis 20mg|bester websitekauf cialis|online cialis preisvergleich|cialis germany|only here find cialis cheap|cialis ne fonctionne pas|cialis 20 ou 40 mg|cost cialis without insurance|daily cialis dosing|generico de cialis en mexico|cialis originale vendita|dose cialis buy|cialis femenino ms barato|vente libre cialis|where can i buy cialis cheap|generic discount cialis|buy cialis in tampa|vente au dtail de cialis|cialis tablets sale|look here cialis sale|cialis made in the usa|cialis prix france|cialis on line senza ricetta|efectos cialis|achat mdicament cialis|farmacia online cialis|cialis extranjero ms barato|price cialiss 100mg|only best offers find cialis|cialis uk 5mg generic|wow cialis england|cialis 20mg generico|best way to buy cialis|cialis daily 25 mg|cialis 25 mg|red cialis sale|kpa cialis p ntet|cialis 5mg best price australi|cialis pills taladafil|cialis 5mgs|cialis prix de vente|cialis 200 mg price|cipla cialis 5 mg best site|modalit uso cialis|visit our site cialis in uk|comprar cialis valparais|precio cialis receta|politique de cialis now|the best choice generic cialis|generique cialis pharmacie|visa cialis cheapest day|cialis bei glaukom|prendere due cialis da 5 mg|pilule cialis originale|cialis generic 40mg|cialis 2 5mg acheter|daily cialis dose|cialis feminin|wow online us cialis|cialis generico wikipedia|where do i buy cialis soft|cialis by mail|the best place 5 mg cialis|brand cialis buy uk|forum cialis acheter|online pharmacy cialis brand|cialis generico acquisto onlin|generic cialis side effects|cialis bph dose|wow cialis headaches|generic cialis pills e20|ja existe generico do cialis|10 mg baratos cialis|cialis belg|generic cialis 10 pills|achat cialis lilly le canada|comprar cialis en argentina|cialis online us|generic cialis risks|cialis 100mg canada|escompte de 20 mg de cialis|cialis le moins cher|click now cialis from india|cialis clinical studies|cialis confezioni costo|can you use cialis with beer|click here get cialis cheap|comprar cialis 20mg original|i use it where buy cialis|chi ha imparato cialis online|descuento legal cialis|we recommend buy cheap cialis|price cialis at tesco|cialis 5 mg 28 comprimidos|cialis delivered to canada|to buy cialis in dubai|cialis teilen|existe cialis generic|cialis 25mg review|cialis 4cpr|cialis er precio|prescriptions cialis|acheter du cialis|cialis prescriptions|dose cialis prendre|cialis canada overnight|cialis professional best price|overnight cialis mastercard|cialis maroc prix|generic cialis from walgreens|cialis 100 nebenwirkungen|cialis 20 mg best price au|el cialis donde comprar|cialis once day dosage|cialis online purchase usa|click here cialis 20 mg|dangers of generic cialis|dove acquistare cialis on line|link for you cialis overnight|low price generic cialis|cialis ebay co uk|where i can buy cheap cialis|pfizer cialis uk|generika cialis tadalafil 20mg|20mg cialis give me headaches|esiste il cialis da 50 mg|cialis mg price|cialis 10 mg prezzo farmacia|cialis overnight us pharmacy|cialis levitra per|buy cialis fda|using cialis|cheap cialis 5mg|does cialis work for you|cialis generic vs soft|kaufen cialis holland|cialis brand price|purchase cialis super active|only for you safe cheap cialis|pharmacie cialis viagr|cheap cialis free prescription|cialis 5mg generika|cialis original vente|cialis online kaufen paypa|cialis da 5 mg generico|cialis x pills|cialis 5 mg acquist|cialis 20mg achat|potenzmittel cialis testberich|cialis daily us price|buycialis en ligne|whatare the dosages for cialis|daily cialis 5 mg for sale|cialis verfallsdatum

  12. 2018年5月18日01:28 | #12

    best online casino games free
    casino games slots
    pogo casino slots
    casino games free online

  13. 2018年5月18日03:38 | #13

    online casino
    best online casino games free
    casino games list
    online casinos 2016

  14. 2018年5月18日04:27 | #14

    casino games list
    casino games free online
    casino online gambling
    casino online

  15. 2018年5月21日22:43 | #15

    pharmacy online
    canadian pharmacies shipping to usa
    prescription drugs online without

  16. 2018年5月21日23:03 | #16

    casino games
    new usa online casinos
    play casinos
    casino games roulette

  17. 2018年5月24日05:54 | #17

    Electricians should determine electrical wires by shade.

评论分页
1 2 201
订阅评论
3+4= (必填)