Hi,

I'm using rsyslog-8.2010.0 on fedora33 as a remote logging server. I'd
like to consider logging mail.* messages to individual files based on
hostname. Primarily I want mail messages from the log server (xavier)
to go in the regular /var/log/maillog file.

This is what I've come up with so far, but it doesn't appear to do
anything. It also doesn't report any errors when I reload rsyslog.
What am I doing wrong?

if $hostname == 'xavier' then {
   if $facility == 2 then action(type="omfile" file="/var/log/maillog")
   if $facility != 2 then action(type="omfile" file="/var/log/maillog-other")
}

I've seen references to $syslogfacility instead of just $facility in
the documentation, but that doesn't appear to make a difference
either.

Thanks,
Alex
_______________________________________________
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.

Reply via email to