> Is there a way to remove parts of the file that are older than > 30 days for example.
> [ You sound like you may want to try logrotate. This is a little utility > [which [ can be set to rotate nominated logs every day/week/whatever, and > [have old [ records emailed to you. The system's log files will not exceed > [a certain pre- [ set size limit using logrotate.
Alternatively, if you want to control this, and many other things, using an integrated tool that Does Lots Of Cleanup, you might try cfengine. <http://www.iu.hioslo.no/cfengine/>
I use the following set of rules that run each day to clean up a number of files _I_ found got pretty sticky. [The usual log rotaters are not aware of the log files produced by Postfix; that caused me problems on one system…]
disable:
/var/log/auth.log rotate=4 type=plain size=>200k /var/log/mail.info rotate=4 type=plain size=>200k /var/log/mail.warn rotate=4 type=plain size=>200k /var/log/mail.log rotate=4 type=plain size=>200k /var/log/mail.err rotate=4 type=plain size=>200k /var/log/kern.log rotate=4 type=plain size=>200k /var/log/debug rotate=4 type=plain size=>200k /var/log/daemon.log rotate=4 type=plain size=>200k /var/log/messages rotate=8 type=plain size=>200k /var/log/debug rotate=4 type=plain size=>200k
cbbrowne