Is there some specific text that rsyslog can key off of?  I use this for
Shorewall and dhcpd (right after the #### RULES #### line):
if $msg contains 'Shorewall' then {
  action(type="omfile" file="/var/log/shorewall.log")
  if ($syslogfacility == 0 and $syslogseverity >= 6) then stop  # info
}

if $programname == 'dhcpd' then {
  action(type="omfile" file="/var/log/dhcpd.log")
#  if $syslogseverity >= 4 then stop    # warning
#  if $syslogseverity >= 5 then stop    # notice
  if $syslogseverity >= 6 then stop     # info
  if $msg contains 'incoming update is less critical than outgoing update' then 
stop
}
The first rule logs all Shorewall messages to /var/log/shorewall.log.  Any
message more severe than 'info' is allowed to pass on to the other rules
which for me, will also log in /var/log/messages.

The second rule is similar.

I don't know what a Postfix debug message looks like.  But something like:
if $programname == 'postfix' and $msg contains 'debug' then {
  action(type="omfile" file="/var/log/postfix-debug.log")
  stop
}
might work for you.

Bill


On 8/19/2017 11:31 PM, yodel...@yepmail.net wrote:
Hello,

On Sat, Aug 19, 2017, at 06:58 PM, Viktor Dukhovni wrote:
That said, both regular and debug logging in Postfix are logged
at the "info" level, Postfix does not use the syslog "debug" log
level.  Therefore, built-in syslog log filtering cannot isolate
just the debug messages from Postfix
Okay so the answer sounds lika a "no".  Thanks for letting me know.  I'll have 
to figure something else out.

but as Noel points out, you really should not have Postfix debug logging 
enabled on a
routine basis.
It's there for a reason isn't it?  I use it when there's a problem and I need 
more information.  It's great having that level of detail.  It's helped me 
solve a bunch of problems for specific domains without drowning in a flood of 
useless detail for all domains.  When then problem's solved I turn it off for 
that domain and move on.  I honestly don't see what the problem is using 
debugging facility that's provided when it provides the info you need to solve 
the problem.  Personally I see that as a great, helpful feature.

Reply via email to