dbdproulxcom agnello george wrote small query need write script whenever error generated spamdlog general log file send mail bellow script came u doubt would work grep e unable start service varlogspamdlog 1 mail pls check server ip 203185xxxxxx nydnuikhhtbfxgmailcom fi mail command reads stdin run command line wait keyboard cron would stdin attached devnull difference lead confusion best redirect input file provide input grep e unable start service varlogspamdlog 1 echo pls check server ip 203185xxxxxx mail pls check server ip 203185xxxxxx nydnuikhhtbfxgmailcom fi application scan log file specific word error soon logs generated even heard sms sent cases quite two httpwwwlogwatchorg httplogcheckorg bob fri 08 aug 2008 004409 0700 script send mail error detected log file