List Info

Thread: question about logging




question about logging
user name
2006-11-27 14:44:44
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?


_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users
question about logging
user name
2006-11-27 15:04:06
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-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users
question about logging
user name
2006-11-28 18:34:06
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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?

Once you have Maia running properly, there's no need to use
a $log_level
higher than 1 in your amavisd.conf file.  In fact, unless
you're running
some sort of stats-gathering log analysis tool on those
logs, a
$log_level of 0 may be sufficient.  You should only be using
levels 2-5
for debugging purposes, should a problem arise.

- --
Robert LeBlanc <rjlrenaissoft.com>
Renaissoft, Inc.
Maia Mailguard <http://www.maiamail
guard.com/>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFbIEeGmqOER2NHewRAo5wAJ9VgTgKjWeyKeshuyFtYsByGVcYNQCg
jO0Z
P3L4mMhc+R6/geKoCwbJuXw=
=y1Lp
-----END PGP SIGNATURE-----
_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )