Filtering Mail
In our system, the traditional ~/.forward file
is used only to catch mail from unconfigured Linux machines
and so is set to forward mail to the mail server.
Inbound mail at the server is eventually disposed of according
to instructions in .exim files which you
can use to forward or filter message.
Before processing .exim the origin of a message is checked
against blacklists and whitelists of senders and
the content of a message may cause it to be marked
as spam.
You can choose how much of this preprocessing you want
and you can use the .exim files to
specify your own filtering.
Note:.exim files live in the home directory on the mailserver
not your normal home directory so you must create/copy them to gpo.stanford.edu.
Simple .exim file for forwarding
To forward your mail elsewhere put the e-mail address in the
~/.exim just as you would in a traditional ~/.forward
file,e.g:
descartes@academie.fr
Introduction to .exim file syntax
Each line in a non-empty .exim file provides a
comma-separated list of delivery instructions
beginning with one of #,/,|, or text interpreted as follows::
- # - comment
Lines beginning with "#" are normally not processed.
However if the first line of a .exim file is:
- # Exim filter
then the .exim file is taken to be an filter as
described in the
exim filter specification.
-
- | - piped command
Lines beginning with "|" are pipelines which are run in a shell (/bin/sh).
- To use
procmail
create both a .procmailrc file and a .exim consisting of:
- | procmail -f -
This sample-procmailrc
files marked spam unless it contains conference annoucments
- To use
maildrop.
create both a .mailfilter file and a .exim consisting of:
- |maildrop
This sample-mailfilter
discards high-scoring spam while filing the rest.
- / - local file
Lines beginning with a "/" designate local files in either traditional
mbox
(if the line does not end in "/") or qmail's
maildir
format (if the line does end in "/").
The maildir can be a useful format but is not supported by our imap server.
- forwarding address
All other lines are processed as a comma-separated lists of e-mail address.
They must by fully-qualified names and not contain any spaces, e.g.
descartes@graphics.stanford.edu not descartes@graphics
Spamassassin
To opt-out of Spamassassin processing at graphics, simply remove
the ~/.spamassassin directory on gpo.
Spamasssassin works by scanning the headers and body of messages
looking for suspect content.
Each test generates a score value and when the score exceeds
a user-definable threshhold, the mail declared to be spam.
The original message is then made an attachment to a SPAM
report.
To customize Spamaassin scoring and reporting for your mail, you
can add lines to the defaults in:
~/.spamassassin/user_prefs
to alter your
Spamassassin User Preferences
Mail which comes via an @cs.stanford.edu address is normally run through the
global Spamassassin on the CS servers and not filtered a second time at graphics.
You can customize some of the CS settings at:
CS Spamasassin Settings
If you want your graphics preferences to be used instead, you can ask to be
added to theCS Spamassassin opt-out list by sending a request to
action@cs.stanford.edu.
Sample filter files
The links below point at two simple examples of personal
mailfilter files that work with the headers added by SpamAssassin.
Last update:
April 25, 2007 03:01:09 PM
© 1994-2013
Stanford Computer Graphics Laboratory