Perhaps someone could point out to me why I am not getting any response from
anyone. I guess this is my last time
asking. Perhaps I am on the wrong email group? Is ommail something that is
supported by the rsyslog team directly? Or is
it managed by someone else?
Hello to everyone,
I have the following ommail conf file and it is working except that the
mailBody template is not applied to outgoing
emails. I searched the documentation and searched the Internet looking for a
way to apply a mailBody template to the
body of the email but found nothing. You can see I tried body.template but that
didn't work. Does anyone have any
suggestions?
template (name="mailBody" type="string" string="RSYSLOG Alert\\r\\nmsg='%msg%'")
template (name="mailSubjectAdmin" type="string" string="ALERT: We got an Admin
login/logoff on %hostname%")
if $msg contains 'logdesc="Admin' then {
action(type="ommail" server="172.16.31.15" port="25"
mailfrom="[email protected]"
mailto=["[email protected]", "[email protected]"]
subject.template="mailSubjectAdmin"
# body.template="mailBody" <<<<<<<<<<<<<<<<< this does not work (when
uncommented)
action.execonlyonceeveryinterval="2"
action.execOnlyWhenPreviousIsSuspended="off"
)
}
/Mike H
--
Wantegrity Inc.
Michael A Hawkins, President
Stamford, CT 06902 USA
Mobile: 203-550-5502
On Sat, 2025-01-11 at 09:12 -0500, Michael A Hawkins via rsyslog wrote:
>
> Hello everyone,
>
> I have the following conf file and it is working except that the mailBody
> template is not applied to outgoing emails.
> I searched the documentation and searched the Internet looking for a way to
> apply the mailBody template to the body of
> the email but found nothing. You can see I tried body.template but that
> didn't work. Does anyone have any suggestions?
>
>
> template (name="mailBody" type="string" string="RSYSLOG
> Alert\\r\\nmsg='%msg%'")
> template (name="mailSubjectAdmin" type="string" string="ALERT: We got an
> Admin login/logoff on %hostname%")
>
> if $msg contains 'logdesc="Admin' then {
> action(type="ommail" server="172.16.31.15" port="25"
> mailfrom="[email protected]"
> mailto=["[email protected]", "[email protected]"]
> subject.template="mailSubjectAdmin"
> # body.template="mailBody" <<<<<<<<<<<<<<<<< this does not work (when
> uncommented)
> action.execonlyonceeveryinterval="2"
> action.execOnlyWhenPreviousIsSuspended="off"
> )
> }
>
> /Mike H
> _______________________________________________
> rsyslog mailing list
> https://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.
>
_______________________________________________
rsyslog mailing list
https://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.