[ mailman-Feature Requests-491675 ] logrotate config file

SourceForge.net noreply at sourceforge.net
Sat Apr 7 03:28:13 CEST 2007


Feature Requests item #491675, was opened at 2001-12-11 13:43
Message generated for change (Comment added) made by jimpop
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=350103&aid=491675&group_id=103

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Deleted
Resolution: None
Priority: 5
Private: No
Submitted By: Luigi Rosa (lrosa)
Assigned to: Nobody/Anonymous (nobody)
Summary: logrotate config file

Initial Comment:
During the install procedure you could create the 
logrotate script in this way:

IF exists /etc/logrotate.d

    IF NOT exists /etc/logrotate.d/mailman

        Create /etc/logrotate.d/mailman 

    FI

FI


The /etc/logrotate.d/mailman file could be something 
like this:


# Logrotate file for Mailman 2.0.x

$HOME/log/digest {
     monthly
}
$HOME/log/error {
     monthly
}
$HOME/log/post {
     weekly
}
$HOME/log/smtp {
     weekly
}
$HOME/log/subscribe {
     monthly
}
$HOME/log/vette {
     monthly
}



Of course, instead of $HOME you should place the 
installation path of Mailman





----------------------------------------------------------------------

Comment By: Jim Popovitch (jimpop)
Date: 2007-04-06 21:28

Message:
Logged In: YES 
user_id=3142
Originator: NO

Reopening.  Mailman needs to have different log file names in order to
work _properly_ with logrotate.  A proper Logrotate conf file for Mailman
needs a postrotate command in order to restart Mailman after log files have
been rotated.  See FAQ 04.007 for more details
(http://www.python.org/cgi-bin/faqw-mm.py?req=edit&file=faq04.007.htp)

Here is a patch against v2.1.9

-------------------------
+++ Logging/Logger.py           2007-04-06 21:11:18.600639072 -0400
--- Logging/Logger.py.old       2007-04-06 21:10:05.672725800 -0400
@@ -43,7 +43,6 @@
         Otherwise, the file is created only when there are writes
pending.
         """
         self.__filename = os.path.join(mm_cfg.LOG_DIR, category)
+        self.__filename += '.log'
         self.__fp = None
         self.__nofail = nofail
         self.__encoding = LOG_ENCODING or sys.getdefaultencoding()
-------------------------

----------------------------------------------------------------------

Comment By: Jim Popovitch (jimpop)
Date: 2007-04-06 21:27

Message:
Logged In: YES 
user_id=3142
Originator: NO

Reopening.  Mailman needs to have different log file names in order to
work _properly_ with logrotate.  A proper Logrotate conf file for Mailman
needs a postrotate command in order to restart Mailman after log files have
been rotated.  See FAQ 04.007 for more details
(http://www.python.org/cgi-bin/faqw-mm.py?req=edit&file=faq04.007.htp)

Here is a patch against v2.1.9

-------------------------
+++ Logging/Logger.py           2007-04-06 21:11:18.600639072 -0400
--- Logging/Logger.py.old       2007-04-06 21:10:05.672725800 -0400
@@ -43,7 +43,6 @@
         Otherwise, the file is created only when there are writes
pending.
         """
         self.__filename = os.path.join(mm_cfg.LOG_DIR, category)
+        self.__filename += '.log'
         self.__fp = None
         self.__nofail = nofail
         self.__encoding = LOG_ENCODING or sys.getdefaultencoding()
-------------------------

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=350103&aid=491675&group_id=103


More information about the Mailman-coders mailing list