SpamAssassin directions for individual users

Dan Kohn
Mon, 15 Apr 2002 09:23:49 -0700

In case anyone else finds this helpful.

          - dan
Dan Kohn <>
<>  <tel:+1-650-327-2600>
Essays announced on <>

-----Original Message-----
From: Dan Kohn=20
Sent: Monday, April 15, 2002 09:06
To: ''
Subject: Directions for individual users

In <> you have a section for
"Installing SpamAssassin for Personal Use (Not System-Wide)".  Could I
please suggest adding the following section:

Using SpamAssassin as a Mail Relay for Personal Use

These steps assume the following, so substitute as necessary:
  - Your public email address is user@public.example
  - You have an unpublicized private address user@private.example where
    you actually get your mail
  - Someone provides you an account of user@unixbox.example for running
    SpamAssassin as a proxy
  - Your UNIX login is "user"
  - The location of the SpamAssassin executable is /usr/bin/spamassassin
  - The location of the procmail executable is /usr/bin/procmail

1. Find a kind soul who will give you an account on his/her Unix box
that already has SpamAssassin and procmail installed.

2. Create a .forward file in your home directory containing the below

     "|IFS=3D' ' && exec /usr/bin/procmail -f- || exit 75 #user"

3. Create a .procmailrc file in your home directory containing
the below lines:

     | /usr/bin/spamassassin -P

     :0      # All messages
     ! user@private.example    # Your private address

The above lines filter all incoming mail through SpamAssassin and tag
probable spam with a unique header, X-Spam-Flag: YES.  It then forwards
all mail (including the spam) on to your private address.

4. Now, you should be ready to send some test emails and ensure
everything works as expected.  First, send yourself a test email to
user@unixbox.example that doesn't contain anything suspicious.  You
should receive it normally, but there will be a header containing
X-Spam-Status: No.  Also send yourself an obvious spam mail and check to
be sure it is marked as spam.

5. Create a Spam folder in your mail client to check for false
positives.  Create a new mail filtering rule (you probably want this to
be your first one) along the lines of this (which is for Outlook 2002):

     Apply this rule after message arrives with X-Spam-Flag: YES
     in the message header and move it to the Spam folder

6. Once you've confirmed that the setup is working, set
user@public.example to forward to user@unixbox.example instead of

7. When there is a false positive (mail you really want to get that's
marked as spam) from real@address.example, edit
.spamassassinrc/user_prefs on the Unix box and add the following line:

     whitelist_from     real@address.example

          - dan
Dan Kohn <>
<>  <tel:+1-650-327-2600>
Essays announced on <>