![]()
|
.procmailrc
in
your Unix home directory
~/.procmailrc
.procmailrc
in place
till you're ready!
* ^X-MailScanner-SpamScore: ssss
.procmailrc
for
Virii.procmailrc
file like this.Puts spam in a SPAM
folder, and virus
tagged (disinfected!) mail in a VIRUS
folder. If you use IMAP, need to "subscribe" to these (and check/clean
them from time to time).
#### .procmailrc -- initialization file for procmail filter #### Variables to define. Make PATH safe, specify mail dir etc. PATH=/bin:/usr/bin:/usr/local/bin:$HOME/bin # Make the PATH safe. COMSAT=no # This is needed (really!) MAILDIR=$HOME/Mail # Where my folders are VIRUS=$MAILDIR/VIRUS # Mailscanner/Sophos tagged SPAM=$MAILDIR/SPAM # SpamAssassin tagged LOGFILE=$MAILDIR/procmail.log # The log file. ###################### end of definitions, start of rules ###### # Get spam stuff, put in a separate SPAM folder. Threshold is 5.0 :0 * ^X-MailScanner-SpamScore: sssss $SPAM # This rule puts virii in a separate folder :0 * ^Subject:.\{VIRUS\?\} $VIRUS # The end (what, no popcorn?)
08 05 * * 1-5 /users/pmurphy/bin/daily |
Copy, paste, and edit this example, and save it (in ASCII text
format!) to a file in your Unix login area called
.logrotate.conf
(note the leading
"dot"). Replace the red underlined parts
with your username.
/users/pmurphy/Mail/VIRUS { rotate 30 weekly compress delaycompress missingok postrotate /home/nraosoft/bin/spamsummary /users/pmurphy/Mail/VIRUS.1 endscript } /users/pmurphy/Mail/SPAM { rotate 30 daily compress delaycompress missingok postrotate /home/nraosoft/bin/spamsummary /users/pmurphy/Mail/SPAM.1 endscript } /users/pmurphy/Mail/procmail.log { rotate 12 monthly compress missingok }
There are three parts to this logrotate configuration file. Each one
specifies how a certain file should be "rotated". Rotation means the
file (e.g., SPAM
) is copied to, say,
SPAM.1
and a new empty SPAM
file is
created.
VIRUS
folder will be moved to
VIRUS.1
, and if that exists, VIRUS.1
should be first moved to VIRUS.2
and so on up to
VIRUS.30
. The
delaycompress
combined with the
compress
keyword means that
VIRUS.2
and older folders will be compressed
with gzip
, so they'll actually be
VIRUS.2.gz
; this can save a lot
of space.SPAM
folder.postrotate
section of the
SPAM
and VIRUS
rules will call a program
called spamsummary
(available at all
four NRAO sites) that will mail you a summary of what's in the
particular folder; this is convenient and avoids the
need to actually visit the old folders before they disappear.
If you don't want such reports, simply remove the three lines starting
with postrotate
and including
endscript
.