SOLVED Re: logging problem: logging to both /var/log/amavisd.log and to /var/log/messages
David Gessel
gessel at blackrosetech.com
Thu Jul 17 10:56:36 CEST 2014
Ben,
Thank you for the prompt response, you got me where I needed to go.
Here's what I did in case anyone else has similar problems:
I didn't specify that local0 should not be logged to /var/log/messages
and the amavisd messages were getting swept up in *.notice (all
facilities emitting a log with a level "notice" and above get logged to
/var/log/messages by default).
adding local0.none to the /var/log/messages line in /etc/syslog.conf
solved the problem as so:
# tells syslog not log any (level = "none") messages from the local0
facility to /var/log/messages
*.notice;authpriv.none;local0.none;kern.debug;lpr.info;mail.crit;news.err
/var/log/messages
....
# all levels from the local0 facility are logged to /var/log/amavisd.log.
local0.* /var/log/amavisd.log
now amavisd logs are only going to /amavisd.log and the default messages
are going to /messages
This was a helpful reference: http://www.freebsddiary.org/syslogconf.php
-David
-------- Original Message --------
Subject: Re: logging problem: logging to both /var/log/amavisd.log and
to /var/log/messages
From: listsb-amavis at bitrate.net
To: amavis-users at amavis.org
Date: Thu Jul 17 2014 06:19:52 GMT+0300 (Arabic Standard Time)
> On Jul 16, 2014, at 22.36, David Gessel <gessel at blackrosetech.com> wrote:
>
>> Amavisd is logging to both the intended /var/log/amavisd.log and to
>> /var/log/messages, where it dominates the logs to a degree that makes
>> catching other issues more difficult.
>>
>> My relevant config is:
>>
>> $log_level = 0; # verbosity 0..5, -d SET TO ZERO NORMALLY
>> $log_recip_templ = undef; # disable by-recipient level-0 log entries
>> $do_syslog = 1; # log via syslogd (preferred)
>> $syslog_facility = 'local0'; # Syslog facility as a string
>> # e.g.: mail, daemon, user, local0, ... local7
>> # below is an attempt to keep amavisd from logging to messages
>> # $LOGFILE = "/var/log/amavisd.log”;
>
> consult your syslog configuration. see where messages sent to the local0 syslog facility are being written, and adjust that as desired. you may want to use a different facility if there are logs from other software also being sent to local0.
>
> -ben
>
More information about the amavis-users
mailing list