Introduction
To activate the local spam filter, you need to know which of the two mail servers you are using:
- imap (imap.physics.utoronto.ca)
- maildir (maildir.physics.utoronto.ca)
Each server uses a different storage format. The older server, named imap, uses mbox format, while the newer server, maildir, uses a format of the same name: Maildir.
Users of imap, should activate the spam filter with:
bogosetup -t mbox
Users of imap, should activate the spam filter with:
bogosetup -t Maildir
The -M switch is inert. Remove references in the documentation.
The Configuration File: .procmailrc
A file called .procmailrc
will be created in the home directory of the user corresponding to the mail storage format. The key entries are listed here and full listings further on.
mbox format configuration file
1 # .procmailrc
2 #
3 # This file contains procmail filtering recipes. See procmail(1), procmailrc(5)
4 # for details.
5 PATH=/bin:/usr/bin:/usr/local/bin
6 MAILDIR=$HOME/mail
7 DEFAULT=/var/spool/mail/bworth2
8 LOGFILE=/dev/null
9 # Support for forwarding email either PRE or POST spam filtering.
10 PREFORWARD=no
11 PREFORWARD_ADDR=""
12 POSTFORWARD=no
13 POSTFORWARD_ADDR=""
14 # Support for vacation reply message that doesn't reply to spam.
15 # Change to VACATION="yes" to activate. You must have a vacation message
16 # contained in $HOME/.vacation.msg and must create the vacation database
17 # file with "rm $HOME/.vacation.db && vacation -i"
18 VACATION="no"
19 INCLUDERC=/etc/bogofilter/bogo.procmailrc
Maildir format configuration file
1 # .procmailrc
2 #
3 # This file contains procmail filtering recipes. See procmail(1), procmailrc(5)
4 # for details.
5 PATH=/bin:/usr/bin:/usr/local/bin
6 MAILDIR=$HOME/Maildir/
7 DEFAULT=$HOME/Maildir/
8 LOGFILE=$HOME/.pcs/log/procmail.log
9 # Support for forwarding email either PRE or POST spam filtering.
10 PREFORWARD=no
11 PREFORWARD_ADDR=""
12 POSTFORWARD=no
13 POSTFORWARD_ADDR=""
14 # Support for vacation reply message that doesn't reply to spam.
15 # Change to VACATION="yes" to activate. You must have a vacation message
16 # contained in $HOME/.vacation.msg and must create the vacation database
17 # file with "rm $HOME/.vacation.db && vacation -i"
18 VACATION="no"
19 INCLUDERC=/etc/bogofilter/bogo-maildir.procmailrc
The format-based differences show up in lines 6, 7 and 19. The difference can also be seen in form of a patch, although the format is mostly of interest to programmers.
Patch diffs between the mbox and Maildir config files
A code snippet in "diff" format highlighting the differences in the .procmailrc file built for users of mbox format versus maildir format.
Line deletions are shown with a preceding minus sign "-", while added (or replaced) lines are shown with a plus sign "+". The remaining unchanged lines are used for context to show the surrounding unchanged lines from the original file.
--- procmailrc-mbox 2006-11-14 13:57:40.000000000 -0500
+++ procmailrc-maildir 2006-11-14 13:57:23.000000000 -0500
@@ -4,8 +4,8 @@
4 # for details.
5 PATH=/bin:/usr/bin:/usr/local/bin
- 6 MAILDIR=$HOME/mail
- 7 DEFAULT=/var/spool/mail/bworth2
+ 6 MAILDIR=$HOME/Maildir/
+ 7 DEFAULT=$HOME/Maildir/
8 LOGFILE=/dev/null
9 # Support for forwarding email either PRE or POST spam filtering.
@@ -20,5 +20,5 @@
17 # file with "rm $HOME/.vacation.db && vacation -i"
18 VACATION="no"
-19 INCLUDERC=/etc/bogofilter/bogo.procmailrc
+19 INCLUDERC=/etc/bogofilter/bogo-maildir.procmailrc
Vacation Auto-Reply with the Spam Filter
Please check out the separate Vacation Message Setup document.