[Techtalk] procmail log rotation
Conor Daly
conor.daly at oceanfree.net
Tue Jul 1 18:57:21 EST 2003
On Tue, Jul 01, 2003 at 12:31:25PM -0400 or so it is rumoured hereabouts,
Emma Jane Hogbin thought:
> Does anyone have a simple log rotation script for procmail logs? I'd like
> to rotate the logs once a week and keep two weeks worth of logs (current +
> 1 week old + 2 weeks old). I've tried working on this before, but whenever
> I remove the log file by hand Procmail stops logging output to a file...
Could be it still has the file handle open to the logfile you removed.
You need to stop/start procmail so it lets go of the current file.
(procmail isn't a daemon though so that may not be the problem).
Anyhow, why not use logrotate? That's what it's designed for. You can
add any set of logs via /etc/logrotate.conf
Conor
--
Conor Daly <conor.daly at oceanfree.net>
Domestic Sysadmin :-)
---------------------
Faenor.cod.ie
6:57pm up 47 days, 21:26, 0 users, load average: 0.05, 0.01, 0.00
Hobbiton.cod.ie
6:55pm up 47 days, 21:23, 2 users, load average: 0.00, 0.00, 0.00
More information about the Techtalk
mailing list