Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 68917 - bad logrotate configuration for mailman
Summary: bad logrotate configuration for mailman
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: logrotate
Version: 7.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Elliot Lee
QA Contact: Aaron Brown
: 75364 77619 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2002-07-15 22:42 UTC by ferulisses
Modified: 2007-04-18 16:44 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2002-12-10 18:07:00 UTC

Attachments (Terms of Use)

Description ferulisses 2002-07-15 22:42:54 UTC
Description of problem:
The default configuration of mailman causes loop on logrotate, fill
the /var/log/mailman directory of compressed files

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. install mailman
2. enable compression on /etc/logrotate.conf (not sure if this is
3. wait logrotate run thwo times
4. ls /var/log/mailman

Actual Results:  the file instaled in /etc/logrotate.d/mailman is:
/var/log/mailman/* {

with this configuration the logrotate program don't work well, it
doesn't recognize the old compressed files, and create backup of
them, creating a lot of backup of backup of backup, filling
the directory and the disk, like this:

$ cd /var/log/mailman
$ ls

Expected Results:  just rotate the logs, may use a config file like this:

/var/log/mailman/bounce /var/log/mailman/digest /var/log/mailman/error/var/log/m
ailman/post /var/log/mailman/qrunner /var/log/mailman/smtp 
/var/log/mailman/subscribe /var/log/mailman/vette {

Additional info:

may be considered a logrotate bug, but just the mailman package have a 
configuration file that "exploit" the bug.

I think that is more easy fix the configuration file now and schedule to fix 
the logrotate in the future.

Comment 1 Bernd Bartmann 2002-07-22 08:11:29 UTC
This also happens without log file compression.

Comment 2 Elliot Lee 2002-08-08 15:57:02 UTC
Yea, sorry, there's really no good way to protect against a bad wildcard. The administrator 
is responsible for deciding what files they want to rotate and knowing how to specify those 

Comment 3 Bernd Bartmann 2002-08-08 16:12:58 UTC
No, you as Red Hat are responsible for providing proper and working defaults. A
simple solution was posted by the original bug reporter. Why don't you just use
this a the default for /etc/logrotate.d/mailman?

Comment 4 Elliot Lee 2002-08-08 16:22:12 UTC
Ahh, you are correct sir; I did not realize that this was the default config. I went and  
checked the mailman-2.0.13-2 logrotate setup in rawhide and it does not use the wildcard, 
so hopefully that eliminates the issue for the future.

Comment 5 Bernd Bartmann 2002-08-08 16:33:34 UTC
Fine. Any chance on getting an official errata for RH 7.2 / 7.3?

Comment 6 R P Herrold 2002-09-12 20:55:06 UTC
Quick and dirty fix -- add this to crontab pending a fix, and in any backport

rm /var/log/mailman/*z.[0-9]*.gz

The question of a backport release could safely incorporate it, to cure damage
inadvertently caused.

Comment 7 Tomasz Orzechowski 2002-10-22 16:57:08 UTC
actually, using wildcards is 'supported' in an example in 'man logrotate':

       /var/log/news/* {

etc. so fix for logrotate should be provided or docs updated

Comment 8 Elliot Lee 2002-12-10 18:04:57 UTC
*** Bug 77619 has been marked as a duplicate of this bug. ***

Comment 9 Elliot Lee 2002-12-10 18:06:52 UTC
*** Bug 75364 has been marked as a duplicate of this bug. ***

Comment 10 Elliot Lee 2002-12-10 20:09:14 UTC
man page fixed, 3.6.6 should have the change.

Comment 11 Adam Oline 2003-06-18 20:42:23 UTC
The news example in the old man page for logrotate was not an error. The full
example for the news logs read as follows in logrotate-3.6.4-1:

/var/log/news/* {
           rotate 2
           olddir /var/log/news/old
                                     kill -HUP `cat /var/run/`

This was fine, because of the use of the 'olddir' option. There is a paragraph
explaining this further down in the man page:

       Please use wildcards with  caution.   If  you  specify  *,
       logrotate  will  rotate  all  files,  including previously
       rotated ones.  A way around this  is  to  use  the  olddir
       directive or a more exact wildcard (such as *.log).

The new man page for logrotate from rawhide now has the example as:

/var/log/news/news.crit {
           rotate 2
           olddir /var/log/news/old
                                     kill -HUP `cat /var/run/`

This does not quite jive with the paragraph explaining this example:

       The last section defines the parameters  for  all  of  the
       files  in /var/log/news. Each file is rotated on a monthly
       basis.  This is considered a single rotation directive and
       if  errors occur for more then one file, the log files are
       not compressed.

The paragraph states that *all* of the files in /var/log/news are rotated, when
the example actually only rotates the file 'news.crit'. On my 7.3 distribution,
I see news.err and news.notice in the directory as well.

The mailman packages logrotate config file was in error, but the logrotate man
page was fine. Perhaps consider changing the logrotate man page back to the way
it read previously, since I believe the example was intended to show the proper
way of using a '*' wildcard.

Note You need to log in before you can comment on or make changes to this bug.