The default .procmailrc file


This is a sample of our default .procmailrc file:
   #Set on when debugging
   VERBOSE=off

   #The directory where your mail folders will be stored.
   MAILDIR=$HOME/.maildir

   #Directory for storing the procmail log and the rc files
   PMDIR=$HOME/.procmail
   # The log of procmail actions
   LOGFILE=$PMDIR/log

   # SPAMTRASH is used to tell SpamAssassin where to deposit the spam
   SPAMTRASH=$MAILDIR/.Trash/
   
   # VIRUSTRASH is used to tell the virus filter where to deposit the virus mail
   VIRUSTRASH=$MAILDIR/.Trash/
   
   # Virus check comes before all other filtering, since virus mail could be
   # from someone you know
   TRASH=$VIRUSTRASH
   INCLUDERC=/net/local/filters/rc.viruscheck
   
   # Your own filtering rules
   INCLUDERC=$PMDIR/rc.folders
   
   # Spam filtering
   TRASH=$SPAMTRASH
   INCLUDERC=/net/local/filters/rc.spamassassin

A line (or the part of a line) beginning with # is called a "comment". It's intended for people, not for computers, and the computer will ignore it.

The words in upper-case are variables. You'll notice that variable names to the right of an equal sign are preceded by $. This tells the system to look at the value of that variable. For example, you see the setting
PMDIR=$HOME/.procmail
which sets your "procmail directory" to the value of .procmail in your home directory ($HOME). Then you can set your log file this way:
LOGFILE=$PMDIR/log
using the value of $PMDIR that you have set.

Lines beginning INCLUDERC= set a special variable that tells procmail to process the specified file.

Procmail index

Last Modified:Thursday, 21-Apr-2022 11:05:53 EDT
© Copyright 2006-2021 Public Access Networks Corporation