logrotate problem (maybe)
Hilario J. Montoliu
hmontoliu at gmail.com
Sat May 9 14:46:19 UTC 2009
Just guessing...
maybe an issue with the logrotate statefile?
Imre Gergely escribió:
> Hi
>
> Do any of you guys have a logrotate config file other than the default?
> I have a Hardy server, with postfix/dovecot on it, and I just noticed
> that despite me having set 'monthly' in /etc/logrotate.conf (as the
> global default), the /var/log/mail.* logfiles are still rotated daily.
>
> One of my very first steps when installing a Linux server (centos,
> fedora, and now ubuntu) is to tweak the logrotate config so it rotates
> the logs monthly (when on low traffic server), compresses them and keeps
> 1-3 years of logs. This is MY default tweak and never had a problem
> with it so far (AFAIK ayways).
>
> I was pretty upset when i wanted to install mailgraph to create some
> graph of older logs (I installed this server a couple of months ago) to
> see some mail stats, and found out that I have only a week worth of
> logfiles.
>
> I looked at it for a while, didn't find anything wrong with the config,
> there is no other config in /etc/logrotate.d/ which would mess with
> /var/log/mail.* files, I didn't find any other crontab entry with other
> logrotate scripts, the default logrotate uses /etc/logrotate.conf, the
> machine is pretty much up 24/7, ntp is running, clock is always syncronized.
>
> Logrotate does work, because logs get rotated, for example the apache
> logs are just fine, they get rotated once a month (but then again, there
> is a separate /etc/logrotate.d/apache2 config for them, which I also
> tweaked for monthly rotation).
>
> /var/log/syslog files are also rotated daily and not monthly.
>
> Here is my logrotate.conf file
>
> http://pastebin.ubuntu.com/167652/
>
> Maybe it's just some hidden default setting I don't know about, but it
> bothers me that my maillogs are gone and I can't even set it up right.
> It looks to me as if the global default isn't being used, or it's
> overwritten somewhere.
>
> Thanks.
>
More information about the ubuntu-server
mailing list