Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
daily logrorate of mail.log breaks mail.log
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
hanj
Veteran
Veteran


Joined: 19 Aug 2003
Posts: 1500

PostPosted: Fri Jan 11, 2008 3:13 pm    Post subject: daily logrorate of mail.log breaks mail.log Reply with quote

Hello

I wanted to change my present logrotate configuration for mail to rotate on a daily basis, and store 8 logs compressed. I changed my mail.log script from:
Code:
/var/log/mail.log {
   missingok
   weekly
   compress
}

to
Code:
/var/log/mail.log {
   missingok
   daily
   compress
   rotate 8
}


Now, every night I get a empty mail.log. Restarting syslog corrects the problem.. but not sure why the rotation is breaking the logging? Is there something obvious I'm doing wrong?

I'm using the following:
app-admin/syslog-ng-2.0.6
mail-mta/postfix-2.4.5
app-admin/logrotate-3.7.2


Thanks!
hanji
_________________
Server Admin Blog - Uno-Code.com
Back to top
View user's profile Send private message
pteppic
l33t
l33t


Joined: 28 Nov 2005
Posts: 781

PostPosted: Fri Jan 11, 2008 8:58 pm    Post subject: Re: daily logrorate of mail.log breaks mail.log Reply with quote

Try it as
Code:
/var/log/mail.log {
   missingok
   daily
   compress
   rotate 8
   create
}

or
Code:
/var/log/mail.log {
   missingok
   daily
   compress
   rotate 8
   copytruncate
}
maybe
_________________
Current Project Thread (myth2avi)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum