I have a syslog server, which separates logging informations according to hostnames. It can separate messages if it's in the 'local1' facility.
I have a mail server, which sends messages to the 'mail' facility. I would like to forward these messages to 'local1', keeping the original mail.* logs on the host, and then send it to the syslog server.
Is there any (easy) way I can replicate mail messages to the 'local1' facility?
Thank You!
EDIT:
All I could think of is calling a command like this (although for some reason this doesn't work)
$template LoggerTempl," -p local1.%SYSLOGSEVERITY-TEXT% -t %SYSLOGTAG% \"%TIMESTAMP% %HOSTNAME% %syslogtag%%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\""
mail.* ^/usr/bin/logger;LoggerTempl