|Search Duke CSL||
Many of us use the procmail program to filter our incoming e-mail. For example, procmail can be used to filter spam, to have certain messages go to particular mail folders, or to forward certain messages to other addresses. All one has to do is set up recipes (rules) in a ~/.procmailrc config file; the C.S. departmental e-mail system takes care of the rest.
Usually, a procmail log file is created (e.g., ~/mail/proc-log), and some details about every e-mail message processed (including spam) are appended to this file. This log file, though useful, can get very large over time, in some cases becoming hundreds of MBs. In order to moderate this, we have implemented an automatic procmail log file rotation system. At the start of each month, for each user, the system determines the name of the log file and rotates the file on a six month cycle. There is some provision for customizing this process.
Procmail is run by the C.S. e-mail system to process all incoming e-mail. Users can add customizations for special handling via the ~/.procmailrc config file. Usually there is an entry in .procmailrc to specify a log file; for example:
What the log rotation program will do is look for a .procmailrc file in the home directory; parse this file to determine the exact path and filename for the log file; then perform some file moves to begin logging to a new file, but keep some old log file copies. Besides the current file, six previous copies will be kept.
The procmail log rotation program also accomodates some user-based customization:
specifies a three month rotation instead of the default six.
In this case (for this user), no log file rotation will be performed.
Log file rotation refers to some methodology for moving and renaming
files such that some number of older versions are kept available.
Though this might apply to any type of file, it is often applicable to
log files, as they are continuously being appended to with
new information, and so tend to grow indefinitely.
So, for example with proc-log, if we want a six month rotation,
then at the end of the first month,
If you have any questions please contact the Lab staff.