[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rotating logfiles
> I've borrowed a little script to rotate logfiles, however this cause some
> problems with zmailer.
>
> Dec 8 00:07:25 office mailbox: Cannot open control file "local/15241" from
> "/var/spool/postoffice/scheduler" as uid 0! (No such file or directory)
> Dec 8 00:07:25 office mailbox: Cannot open control file "local/15241" from
> "/var/spool/postoffice/scheduler" as uid 0! (No such file or directory)
Nope, this comes from different source, and occurs
even without rotating of the logs...
.....
> Is this the best way to do it?
>
> Ideally I want to rotate logs via cron anyone else done this with success?
Your taste may vary, but I think it was overly complex script..
My (weekly) log rotation is similar, though a bit simpler.
cd /var/log/mail
/etc/zmailer kill
FILES="router scheduler smtp smtpserver"
for x in $FILES
do
mv $x.o.gz $x.oo.gz
mv $x $x.o
done
/etc/zmailer
for x in $FILES
do
gzip $x.o
done
This kind of script has a problem that none of the subsystems
is waited until they die out entirely, thus some double-deliveries
may occur due to this when a scheduler is restarted while some
transport-channel is just working on an item.
> Regards,
> Neil
>
> --
> Neil J. McRae Demon Internet
> neil@demon.net
/Matti Aarnio <mea@utu.fi>
- Follow-Ups:
- Re: rotating logfiles
- From: Scott Schwartz <schwartz@galapagos.cse.psu.edu> (Thu, 8 Dec 1994 05:35:32 +0200)