module(load="ommail")
template (name="mailBody" type="string" string="RSYSLOG Alert nmsg='%msg%'")
template (name="mailSubject" type="string" string="%hostname%") <<<< HOSTNAME
STILL THE SAME BUT TEXT WILL CHANGE OF EVENT IF
if $msg contains "Invalid Credentials" then {
action(type="ommail" server="localhost" port="25"
mailfrom="[email protected]"
mailto="[email protected]"
subject.template="mailSubject" <<<<<<<< WOULD LIKE TO USE TEXT
AND THE %HOSTNAME% VAR HERE %HOSTANME INVALID CRED.
body.enable="on"
template="mailBody")
}
if $msg contains "SUCCESS" then {
action(type="ommail" server="localhost" port="25"
mailfrom="[email protected]"
mailto="[email protected]"
subject.template="mailSubject" <<<<<<<< WOULD LIKE TO USE TEXT
AND THE %HOSTNAME% VAR HERE %HOSTNAME% USER LOGIN SUCESS
body.enable="on"
template="mailBody")
}
Hi,
I would like to modifi the mail Subject on spezific event containing text and
the %hostname% variable.
Is this not posiible ?
THANKS
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.