Home » Email » SpamAssassin Page 4

SpamAssassin on mail.pa.msu.edu

Part 4: Advanced topics


  1. E-mail address whitelisting

    The SpamAssassin configuration allows the user to specify E-mail addresses from which E-mail is considered highly unlikely to be "spam". Of course, some spammers and many E-mail viruses use real E-mail addresses as "From:" addresses, which confuses matters.

    The procedure for putting an E-mail address on your personal "whitelist" is as follows.

    • Log into mail.pa.msu.edu using ssh (preferred) or telnet (discouraged for security reasons).
       
      1. Type the command
        addwhitelist E-mail-address
        at the command prompt.
         
        For example,
        addwhitelist noreply@msu.edu
         
      2. Log out with the command exit.

    Any E-mail from the address used as addwhitelist's argument will have 100 points subtracted from its SpamAssassin score.

    The addwhitelist command can take a wild-card argument, using "*" as the wild-card, but any such argument must be enclosed in double-quotes. Here is an example:
     
    addwhitelist "*@pa.msu.edu"
     
    (note that this particular whitelist item is on by default in the standard SpamAssassin user definitions file).

  2. E-mail address blacklisting

    The SpamAssassin configuration allows the user to specify E-mail addresses from which E-mail is considered highly likely to be "spam".

    The procedure for putting an E-mail address on your personal "blacklist" is as follows.

    • Log into mail.pa.msu.edu using ssh (preferred) or telnet (discouraged for security reasons).
      1. Type the command
        addblacklist E-mail-address
        at the command prompt.
         
        For example,
        addblacklist noreply@msu.edu
         
      2. Log out with the command exit.

    Any E-mail from the address used as addblacklist's argument will have 100 points added to its SpamAssassin score.

    The addblacklist command can take a wild-card argument, using "*" as the wild-card, but any such argument must be enclosed in double-quotes. Here is an example:
     
    addblacklist "*@spammers-r-us.com"
     

  3. User Configuration files

    The SpamAssassin setup involves creation of the E-mail folders described in FAQ #1 as well as three files used to configure its use.

    These three files are listed here, with links to example files.

    • .forward
      This file is in the user's login area. Instead of listing an E-mail address to which all E-mail messages should be forwarded (its usual function), it contains an instruction to the system to route all E-mail through the procmail program which manages the E-mail filters.
    • .procmailrc
      This file is in the user's login area. It sets up pointers to the user's mail area, the file which procmail uses as a log file, and goes on to specify the set of filters that each E-mail message goes through. At the end of the current default .procmailrc file are some lines, commented out (with "#" characters at the start of the lines), which provide for forwarding non-spam messages to another E-mail address, if desired, and for running the vacation auto-response program for non-spam messages, if desired (in the latter case, in addition to un-commenting the pertinent lines in .procmailrc, there are some other files to set up - contact helpdesk@pa.msu.edu for assistance if you are interested).
    • user_prefs
      This file is in the user's .spamassassin subdirectory. It sets up basic SpamAssassin-specific settings, such as the threshold score above which E-mail messages are flagged as spam and get put into the IN.probable-spam folder.
      It also has some settings which might be of interest to users concerning how non-English-language and non-western-character-set E-mail messages are scored.
      These settings are commented within the file (some are active and can optionally be commented out, while others are commented out and can optionally be un-commented in order to activate them).
      User-specified whitelist_from and blacklist_from addresses are set in this file, too (as described earlier in this FAQ, above).

    If you are not familiar with file editing procedure on a Solaris Unix system such as mail.pa.msu.edu, contact helpdesk@pa.msu.edu for assistance.


  4. Global Configuration files

    Settings in the user configuration files described above override the local default settings, which in turn override the program built-in settings.

    In case you are interested, the scores for each of the tests SpamAssassin uses to build up an E-mail message's total score may be found in the following links.




Questions not covered in this FAQ? Make sure to send them in!

Last Updated: Tuesday, 21 March 2005 by G J Perkins