Hi,
I dont seem to be able to get ommail mail alerts to work properly with more than one "if" statement in my rsyslog conf file.
The relavant section of my conf file is shown here:
$ActionMailSMTPServer smtp.domain.net
$ActionMailFrom syslog@domain.net
$ActionMailTo alerts@domain.net
$template mailSubject,"Network Alert! on %hostname%"
$template mailBody,"RSYSLOG Alert\r\nmsg='%msg%'"
$ActionMailSubject mailSubject
# the if ... then ... mailBody mus be on one line!
if $msg contains 'STORM_CONTROL-2-SHUTDOWN' then :ommail:;mailBody
if $msg contains 'DUAL-5-NBRCHANGE' then :ommail:;mailBody
When I initially tested this with just one "if $msg contains" line it worked fine, but with two it doesnt seem to be working anymore. I cant see any examples on the web or this forum of this type of config so Im a bit stumped. Can anyone help?
thanks, Andy Smith.


