[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: logcheck oddity

On Sun, Mar 02, 2003 at 09:20:18AM -0000, Chris Evans wrote:
> I am using stable for a small personal server.  I have postfix 
> copying all my incoming Email to a file /var/log/mailcopy/chris.mail
> as a belt and braces check I get things and to enable me to use 
> hypermail to create a useful archive of it.
> I wanted to rotate that file using logcheck and created a file 

I think you mean logrotate and not logcheck, logcheck is a tool used
to periodic checking of log files and generating e-mail messages about
unusual events or possible security violations.

> /etc/logrotate.d/chrismail:
> "/var/log/mailcopy/chris.mail" {
>         rotate 7
>         daily
>         create
>         missingok
> }

That should work fine.

> That didn't do anything so logged in as root I tried logrotate -d 
> chrismail which said the file didn't need rotating.  So I tried 
> logrotate -d -f chrismail which said it did everything, all the file 
> copying etc. and the creation of the new file ... but it didn't.  
> I've tried that several times with same result.

What do you mean, it didn't anything, how many days? 

> savelog, interestingly, seems to work fine.  /var/log/mailcopy is 
> world readable and executable and owned and grouped to root.  
> /var/log/mailcopy/chris.mail is owned and grouped to postfixe (my 
> user for postfix) and owner and group rw and world r permitted.

savelog works everytimes you run it, that means rotates, compresses, 
but logrotate checks the date ...
My experience with it is that after first day it does nothing, 
second day it creates <logfile>.0 and third day begins to compress.
As far as I remember...

> Chris

| Martin Kacerovsky                |
| e-mail : wizard(AT)matfyz(DOT)cz |
| home   : http://wizard.matfyz.cz |

Reply to: