procmail
[Top] [All Lists]

RE: deactivating of /var/mail/$USER ?

2005-11-10 09:18:10


-----Original Message-----
From: procmail-bounces(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
[mailto:procmail-bounces(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE]On Behalf Of 
Michelle
Konzack
Sent: Thursday, November 10, 2005 4:19 AM
To: procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: Re: deactivating of /var/mail/$USER ?


Hi Pat,

Am 2005-11-07 17:17:58, schrieb Patrick Shanahan:

Probably not without much more information.

Note that I am not a guru, but I would accumulate several of the posts
that gave you 'unknown' errors and look for similarities.  Then I
would pipe them thru my procmail rules in a sandbox with 'VERBOSE=ON'.

I know, but my server handel each day morethen 1.300.000 Messages
and if I use "VERBOSE=ON" I get GBytes of logs per day... which
nobody can check.  :-/

Michelle, one way to keep from getting drowned in log files,
is to trim them before writing to them.  Here's what I used
in one /etc/procmailrc script (run before DROPPRIVS=YES) is
the following:

#
# set up per user procmail logs
#
:0
{
LOCKFILE=${USER_LOGFILE}$LOCKEXT
:0 iWc
* $ ! ? test -f $USER_LOGFILE
| touch $USER_LOGFILE && chown ${OWNER} $USER_LOGFILE && chmod 640
$USER_LOGFILE
#
# if log has more than 6,000 lines, cut it back to 3000
#
:0 EiWc
* $ ? test `wc -l < $USER_LOGFILE` -gt 6000
| tail -3000 ${USER_LOGFILE} > ${USER_LOGFILE}.tmp && chown ${OWNER}
${USER_LOGFILE}.tmp && chmod 640 $USER_LOGFILE && mv ${USER_LOGFILE}.tmp
$USER_LOGFILE
LOCKFILE  # release lock
}

LOGFILE=$USER_LOGFILE

The choice of 3000 lines is arbitrary.  It happens to allow for 1000 three
line
ABSTRACT=on delivery messages, and ABSTRACT is set in the toplevel script by
defatult.  $OWNER above is to either "$LOGNAME" or "$LOGNAME.mail" depending
upon whether the log files are located in a user's home directory, or
in a global spool directory with "mail" group access.


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>