On Monday 27 November 2006 14:44, Munroe wrote:
> I have noticed that the amavisd used with maia by
default (I am assuming
> by default, I don't remember specifically setting it)
saves its logging
> in /var/amavisd/. It grows pretty quickly, for example
I have been
> testing this server with 1 live domain (5mailboxes)
total over the past
> week it has received about 800messages and sent about
10. The
> amavis.log is ~120M. I am sure there is a way to move
it to /var/log
> (separate partition on my server), and to tell
logrotate to deal with
> it, I guess my question is, is this what everyone else
does or do they
> turn down logging or what is the best practice here?
>
I tell it to log to syslog rather than a logfile personally.
If you want to
leave it as is, there's no reason logrotate can't be
configured to rotate it
there (and preferably compress it at the same time). It'll
depend on your
distribution exactly what the paths are, the below are
correct for RHEL4,
YMMV.
The relevant lines in amavisd.conf are :-
$log_level = 1; # verbosity 0..5
$log_recip_templ = undef; # disable by-recipient level-0
log entries
$LOGFILE = "$MYHOME/amavis.log";
$DO_SYSLOG = 0; # log via syslogd (preferred)
$SYSLOG_LEVEL = 'mail.info';
so if you prefer you can move where its log file is quite
easily:-
$LOGFILE = "/var/log/maia";
Then create a file in /etc/logrotate.d something along the
lines of:-
/var/log/maia{
daily
rotate 7
compress
sharedscripts
postrotate
/bin/kill -HUP `cat /var/amavis/amavisd.pid 2>
/dev/null` 2> /dev/null
endscript
}
Or to change to syslog:-
$DO_SYSLOG = 1; # log via syslogd (preferred)
Rgds
Pete
_______________________________________________
Maia-users mailing list
Maia-users renaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users
|