Spam Assassin FAQ
If you are unable to find an answer to your question here, please call our offices at (612)617-0007. You may also reach us via eMail at

What is Spam Assassin?
SpamAssassin is a mail filter that attempts to identify SPAM using text analysis and several Internet-based real-time blacklists. Using its rule base, it uses a wide range of heuristic tests on mail headers and body text to identify SPAM, also known as unsolicited commercial email. Once identified, the mail is then tagged as SPAM for later filtering using the user's own mail user-agent application.

How do I just delete the emails automatically?
You have several options for doing this. We recommend you setup a filter in your email program to move messages to a folder automatically. You can then clean this folder out from time to time. There is no way to recover a deleted message at Sound Internet. Once it is gone from the server, it is gone for good! You can find filtering instructions in our Technical Support section for Microsoft Outlook and Outlook Express. Read below on how to have the server PERMANENTLY delete the messages for you.

Why doesn't your program catch all SPAM for what it is?
People who send SPAM are constantly modifying their messages, often to trick users and mail filters such as SpamAssassin into thinking that their SPAM is a legitimate message. In its most recent test, SpamAssassin differentiated between SPAM and non-SPAM mail correctly in 85% of cases. Since then, it's just been getting better and better.

Why are some of my valid messages are marked as SPAM?
Occasionally a legitimate email may be marked as SPAM if it violates enough of the SpamAssassin rules. Rules include poorly formatted email headers and phrases frequently found in SPAM, such as "You have been selected as a finalist," "click here," "unsubscribe here," etc. People who send SPAM are constantly evolving their messages, often to trick users and mail filters such as SpamAssassin into thinking that their SPAM is a legitimate message. You can customize your SpamAssassin configuration to suit your needs. In its most recent test, SpamAssassin differentiated between SPAM and non-SPAM mail correctly in 85% of cases.

Why do the some emails come through messy or with missing pictures, etc.?
When SpamAssassin determines a message is SPAM, it will change the "Mime Headers" in your message so it doesn't display pictures, etc. You can turn this feature on and off. We have the defaults set to off so you don't need to download SPAM or pornographic pictures when you open your email.

How can I flag some messages and dump others?
Edit your ~/.procmailrc file like the following to permanently delete e-mails with 13-32 spam hits the default is to flag anything over 5.0, so messages with a 5-12 will be saved and flagged as spam.
| spamc

* ^X-Spam-Status: Yes, hits=([1-2][3-9]|[2-3][0-2])

How can I automatically delete all flagged messags?
Edit your ~/.procmailrc file like the following to permanently delete e-mails flagged as spam:
| spamc

* ^X-Spam-Status: Yes

How can I customize my SpamAssassin configuration?
These are the configuration files installed by SpamAssassin.

  - $USER_HOME/.spamassassin:

     User state directory.  Used to hold spamassassin state,
     such as a per-user automatic whitelist, and the user's
     preferences file.

  - $USER_HOME/.spamassassin/user_prefs:

     User preferences file.  If it does not exist, one of the 
     system default prefs files will be created here when the
     first message is processed via spamassassin.
     Any Sound Internet user can edit this later, if they wish.

Here are instructions for the user_prefs file.  
 Common first-time tweaks include:

  - required_hits
	Set this higher to make SpamAssassin less sensitive.

  - rewrite_subject
	Turn off Subject-line rewriting with this.

  - subject_tag
	When rewrite_subject is on, the subject stamp is
	*****SPAM*****. This can be used to change it.

  - ok_locales
	If you expect to receive mail in non-ISO-8859 character sets
	(ie. Chinese, Cyrillic, Japanese, Korean, or Thai) then set

  - defang_mime
	By default, SpamAssassin will 'de-fang' MIME messages,
	turning them into content-type text/plain.  This will turn
	that behavior off.

HERE's the Complete list of Options:

       Mail::SpamAssassin::Conf - SpamAssassin configuration file

         # a comment

       SpamAssassin is configured using some traditional UNIX-
       style configuration files, loaded from the /usr/share/spa-
       massassin and /etc/mail/spamassassin directories.

       The "#" character starts a comment, which continues until
       end of line, and whitespace in the files is not signifi-

       Paths can use "~" to refer to the user's home directory.

       Where appropriate, default values are listed in parenthe-

           Used to specify addresses which send mail that is
           often tagged (incorrectly) as spam; it also helps if
           they are addresses of big companies with lots of
           lawyers.  This way, if spammers impersonate them,
           they'll get into big trouble, so it doesn't provide a
           shortcut around SpamAssassin.

           Whitelist and blacklist addresses are now file-glob-
           style patterns, so "",
           "*", or "*" will all work.  Regular
           expressions are not used for security reasons.

           Multiple addresses per line is OK.  Multiple
           "whitelist_from" lines is also OK.

           Used to specify addresses which send mail that is
           often tagged (incorrectly) as non-spam, but which the
           user doesn't want.  Same format as "whitelist_from".

           If the given address appears in the "To:" or "Cc:"
           headers, mail will be whitelisted.  Useful if you're
           deploying SpamAssassin system-wide, and don't want
           some users to have their mail filtered.  Same format
           as "whitelist_from".

           There are three levels of To-whitelisting,
           "whitelist_to", "more_spam_to" and "all_spam_to".
           Users in the first level may still get some spammish
           mails blocked, but users in "all_spam_to" should never
           get mail blocked.

           See above.

           See above.

       required_hits n.nn   (default: 5)
           Set the number of hits required before a mail is con-
           sidered spam.  "n.nn" can be an integer or a real num-

       auto_report_threshold n.nn   (default: 30)
           How many hits before a mail is automatically reported
           to blacklisting services like Razor.  Be very careful
           with this; you really should manually verify the spam-
           miness of a mail before reporting it.

       score SYMBOLIC_TEST_NAME n.nn
           Assign a score to a given test.  Scores can be posi-
           tive or negative real numbers or integers.  "SYM-
           BOLIC_TEST_NAME" is the symbolic name used by SpamAs-
           sassin as a handle for that test; for example,

       rewrite_subject { 0 | 1 }        (default: 1)
           By default, the subject lines of suspected spam will
           be tagged.  This can be disabled here.

       subject_tag STRING ...        (default: *****SPAM*****)
           Text added to the "Subject:" line of mails that are
           considered spam, if "rewrite_subject" is 1.

       report_header { 0 | 1 }  (default: 0)
           By default, SpamAssassin will include its report in
           the body of suspected spam.  Enabling this causes the
           report to go in the headers instead. Using
           'use_terse_report' with this is recommended.

       use_terse_report { 0 | 1 }   (default: 0)
           By default, SpamAssassin uses a fairly long report
           format.  Enabling this uses a shorter format which
           includes all the information in the normal one, but
           without the superfluous explanations.

       defang_mime { 0 | 1 }   (default: 1)
           By default, SpamAssassin will change the Content-type:
           header of suspected spam to "text/plain". This is a
           safety feature. If you prefer to leave the Content-
           type header alone, set this to 0.

       skip_rbl_checks { 0 | 1 }   (default: 0)
           By default, SpamAssassin will run RBL checks.  If your
           ISP already does this for you, set this to 1.

       check_mx_attempts n (default: 3)
           By default, SpamAssassin checks the From: address for
           a valid MX three times, waiting 5 seconds each time.

       check_mx_delay n         (default 5)
           How many seconds to wait before retrying an MX check.

       ok_locales xx [ yy zz ... ]        (default: en)
           Which locales (country codes) are considered OK to
           receive mail from.  Mail using character sets used by
           languages in these countries, will not be marked as
           possibly being spam in a foreign language.

           SpamAssassin will try to determine the local locale,
           in order to determine which charsets should be allowed
           by default, but on some OSes it may not be able to do
           this effectively, requiring customisation.

           All ISO-8859-* character sets, and Windows code page
           character sets, are already permitted by default.

           The following locales use additional character sets,
           and are supported:

           ja  Japanese

           ko  Korea

           ru  Cyrillic charsets

           th  Thai

           zh  Chinese (both simplified and traditional)

           So to simply allow all character sets through without
           giving them points, use

                   ok_locales      ja ko ru th zh

       auto_whitelist_threshold n    (default: 3)
           How many times a mail-sender must get a mail through
           as non-spam before their address is whitelisted.

       describe SYMBOLIC_TEST_NAME description ...
           Used to describe a test.  This text is shown to users
           in the detailed report.

       report ...some text for a report...
           Set the report template which is attached to spam mail
           messages.  See the "" configuration file in
           "/usr/share/spamassassin" for an example.

           If you change this, try to keep it under 76 columns
           (inside the the dots below).  Bear in mind that EVERY
           line will be prefixed with "SPAM: " in order to make
           it clear what's been added, and allow other filters to
           remove spamfilter modifications, so you lose 6 columns
           right there.  Each "report" line appends to the exist-
           ing template, so use "clear-report-template" to

           The following template items are supported, and will
           be filled out by SpamAssassin:

           _HITS_: the number of hits the message triggered
           _REQD_: the required hits to be considered spam
           _SUMMARY_: the full details of what hits were trig-
           _VER_: SpamAssassin version

           _HOME_: SpamAssassin home URL
           Clear the report template.

       terse_report ...some text for a report...
           Set the report template which is attached to spam mail
           messages, for the terse-report format.  See the
           "" configuration file in "/usr/share/spamas-
           sassin" for an example.

           Clear the terse-report template.

       spamtrap ...some text for spamtrap reply mail...
           A template for spam-trap responses.  If the first few
           lines begin with "Xxxxxx: yyy" where Xxxxxx is a
           header and yyy is some text, they'll be used as head-
           ers.  See the "" configuration file in
           "/usr/share/spamassassin" for an example.

           Clear the spamtrap template.

       These settings differ from the ones above, in that they
       are considered 'privileged'.  Only users running "spamas-
       sassin" from their procmailrc's or forward files, or
       sysadmins editing a file in "/etc/mail/spamassassin", can
       use them.   "spamd" users cannot use them in their
       "user_prefs" files, for security and efficiency reasons.

       header SYMBOLIC_TEST_NAME header op /pattern/modi-
       fiers [if-unset: STRING]
           Define a test.  "SYMBOLIC_TEST_NAME" is a symbolic
           test name, such as 'FROM_ENDS_IN_NUMS'.  "header" is
           the name of a mail header, such as 'Subject', 'To',
           etc. 'ALL' can be used to mean the text of all the
           message's headers.

           "op" is either "=~" (contains regular expression) or
           "!~" (does not contain regular expression), and "pat-
           tern" is a valid Perl regular expression, with "modi-
           fiers" as regexp modifiers in the usual style.

           If the "[if-unset: STRING]" tag is present, then
           "STRING" will be used if the header is not found in
           the mail message.

       header SYMBOLIC_TEST_NAME eval:name_of_eval_method([argu-
           Define a header eval test.  "name_of_eval_method" is
           the name of a method on the "Mail::SpamAssassin::Eval-
           Tests" object.  "arguments" are optional arguments to
           the function call.

       body SYMBOLIC_TEST_NAME /pattern/modifiers
           Define a body pattern test.  "pattern" is a Perl regu-
           lar expression.

           The 'body' in this case is the textual parts of the
           message body; any non-text MIME parts are stripped,
           and the message decoded from Quoted-Printable or
           Base-64-encoded format if necessary.  All HTML tags
           and line breaks will be removed before matching.

       body SYMBOLIC_TEST_NAME eval:name_of_eval_method([args])
           Define a body eval test.  See above.

       rawbody SYMBOLIC_TEST_NAME /pattern/modifiers
           Define a raw-body pattern test.  "pattern" is a Perl
           regular expression.

           The 'raw body' of a message is the text, including all
           textual parts.  The text will be decoded from base64
           or quoted-printable encoding, but HTML tags and line
           breaks will still be present.

       rawbody SYMBOLIC_TEST_NAME
           Define a raw-body eval test.  See above.

       full SYMBOLIC_TEST_NAME /pattern/modifiers
           Define a full-body pattern test.  "pattern" is a Perl
           regular expression.

           The 'full body' of a message is the un-decoded text,
           including all parts (including images or other attach-
           ments).  SpamAssassin no longer tests full tests
           against decoded text; use "rawbody" for that.

       full SYMBOLIC_TEST_NAME eval:name_of_eval_method([args])
           Define a full-body eval test.  See above.

       razor_config filename
           Define the filename used to store Razor's configura-
           tion settings.  Currently this is the same value Razor
           itself uses: "~/razor.conf".

       auto_whitelist_path /path/to/file  (default: ~/.spamassas-
           Automatic-whitelist directory or file.  By default,
           each user has their own, in their "~/.spamassassin"
           directory with mode 0700, but for system-wide SpamAs-
           sassin use, you may want to share this across all

       auto_whitelist_file_mode      (default: 0700)
           The file mode bits used for the automatic-whitelist
           directory or file.  Make sure this has the relevant
           execute-bits set (--x), otherwise things will go

       user-scores-dsn DBI:databasetype:databasename:host-
           If you load user scores from an SQL database, this
           will set the DSN used to connect.  Example:

       user_scores_sql_username username
           The authorized username to connect to the above DSN.

       user_scores_sql_password password
           The password for the database username, for the above

       spamphrase score phrase ...
           A 2-word spam phrase, for the FREQ_SPAM_PHRASE test.

       spamphrase-highest-score nnnnn
           The highest score of any of the spamphrases.  Used for

       A line starting with the text "lang xx" will only be
       interpreted if the user is in that locale, allowing test
       descriptions and templates to be set for that language.

       "Mail::SpamAssassin" "spamassassin" "spamd"

2002-01-21                 perl v5.6.1Mail::SpamAssassin::Conf(3)