Changes between Version 2 and Version 3 of RuleUpdates


Ignore:
Timestamp:
May 26, 2008, 6:25:49 AM (15 years ago)
Author:
rjl
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RuleUpdates

    v2 v3  
    11= Updating SpamAssassin Rules =
    22
    3 SpamAssassin ships with an extensive set of rules, but over time those rules lose some of their
    4 effectiveness, since spammers download SpamAssassin and use it to test their new spam.  Rules that
    5 perform very well on the day a new version of SpamAssassin is released may start hitting less
     3!SpamAssassin ships with an extensive set of rules, but over time those rules lose some of their
     4effectiveness, since spammers download !SpamAssassin and use it to test their new spam.  Rules that
     5perform very well on the day a new version of !SpamAssassin is released may start hitting less
    66frequently after a month or two, and their scores may no longer reflect their effectiveness at
    77detecting spam.
    88
    9 Rather than waiting for the next SpamAssassin release, however, there are ways that you can update
     9Rather than waiting for the next !SpamAssassin release, however, there are ways that you can update
    1010your rules on a daily basis, downloading the latest versions of existing rules as well as all-new
    11 rules that have been added since the last release.  By doing this, you can keep SpamAssassin working
     11rules that have been added since the last release.  By doing this, you can keep !SpamAssassin working
    1212at peak efficiency, even as spammers adapt to new rules.
    1313
    14 The recommended way to update your SpamAssassin rules these days is to use the sa-update script that
    15 ships with SpamAssassin.  It can be used to update your core SpamAssassin rules, as well as third-party
     14The recommended way to update your !SpamAssassin rules these days is to use the [http://wiki.apache.org/spamassassin/RuleUpdates sa-update] script that
     15ships with !SpamAssassin.  It can be used to update your core !SpamAssassin rules, as well as third-party
    1616rules from the [http://www.rulesemporium.com/ SpamAssassin Rules Emporium (SARE)].
    1717
    18 Instructions for using sa-update to update both your core SpamAssassin rules and SARE rules can be
    19 found [http://wiki.apache.org/spamassassin/RuleUpdates here].
     18'''NOTE:''' If you're using the older ''!RulesDuJour'' script for updating your !SpamAssassin rules, you should consider replacing it with sa-update, as ''!RulesDuJour'' is deprecated and no longer being maintained.
     19
     20
     21== Updating !SpamAssassin's Core Rules ==
     22
     23If you only want to update !SpamAssassin's core rules (i.e. you're not interested in using third-party rules from SARE), you can run sa-update as follows, adding it as a daily cron job.  This sequence looks for rule updates on the official !SpamAssassin channel (updates.spamassassin.org), and if it makes any updates it then recompiles the rules for efficiency, tells Maia about any new rules, and restarts amavisd-maia.
     24
     25{{{
     26sa-update && /usr/bin/sa-compile && /var/amavisd/maia/scripts/load-sa-rules.pl && /sbin/service amavisd restart
     27}}}
     28
     29
     30== Updating SARE Rules ==
     31
     32If you also wish to update third-party rules from the !SpamAssassin Rules Emporium, you have a couple of options:
     33
     34* [http://saupdates.openprotect.com/ OpenProtect] provides a pre-packaged set of SARE's most conservative (i.e. level-0) rulesets in one convenient channel.  This saves you the trouble of having to hand-pick the rulesets you wish to use, but it also limits you to the rules that !OpenProtect has chosen to include, so more aggressive rules with levels 1-4 are not available.  This is a good choice for novices and for production environments where conservative rules are favoured.
     35
     36* [http://daryl.dostech.ca/sa-update/sare/sare-sa-update-howto.txt DOStech] publishes all of the SARE rulesets in individual channels, allowing you to pick and choose the rulesets you wish to use.  This flexibility comes with some complexity however, since it means having to decide which rulesets are appropriate for your site.  This is a good choice for advanced mail administrators and power users who want fine-grained control over their SARE updates.
     37
     38
     39=== Using !OpenProtect Channels ===
     40
     41Download the channel's GPG key:
     42
     43{{{
     44wget http://saupdates.openprotect.com/pub.gpg
     45}}}
     46
     47
     48Import the GPG key into sa-update's keyring:
     49
     50{{{
     51sa-update --import pub.gpg
     52}}}
     53
     54
     55Create a text file (e.g. sare-sa-update-channels.txt) that lists the official !SpamAssassin update channel (updates.spamassassin.org, for your core rules) and the !OpenProtect channel (saupdates.openprotect.com, for the SARE rulesets).
     56
     57'''NOTE''': The order of these channels in the text file is important.  The ''updates.spamassassin.org'' channel must always be the first channel in the list.
     58
     59{{{
     60updates.spamassassin.org
     61saupdates.openprotect.com
     62}}}
     63
     64
     65You can then run sa-update as follows, adding it as a daily cron job.  This sequence looks for rule updates on both channels (!SpamAssassin and !OpenProtect), and if it makes any updates it then recompiles the rules for efficiency, tells Maia about any new rules, and restarts amavisd-maia.
     66
     67{{{
     68sa-update --gpgkey D1C035168C1EBC08464946DA258CDB3ABDE9DC10 --channelfile /path/to/sare-sa-update-channels.txt && /usr/bin/sa-compile && /var/amavisd/maia/scripts/load-sa-rules.pl && /sbin/service amavisd restart
     69}}}
     70
     71
     72
     73=== Using DOStech Channels ===
     74
     75Download the channel's GPG key:
     76
     77{{{
     78wget http://daryl.dostech.ca/sa-update/sare/GPG.KEY
     79}}}
     80
     81
     82Import the GPG key into sa-update's keyring:
     83
     84{{{
     85sa-update --import GPG.KEY
     86}}}
     87
     88
     89Visit the [http://www.rulesemporium.com/rules.htm SpamAssassin Rules Emporium] and make a list of the rulesets you wish to use.  Add the names of these rulesets to a text file (e.g. sare-sa-update-channels.txt), and append ".sare.sa-update.dostech.net" to the name of each ruleset, e.g.   ''70_sare_header2.cf'' becomes ''70_sare_header2.cf.sare.sa-update.dostech.net''.
     90
     91'''NOTE:''' The first channel in the file ''must'' be ''updates.spamassassin.org''.  e.g.
     92
     93{{{
     94updates.spamassassin.org
     9572_sare_redirect_post3.0.0.cf.sare.sa-update.dostech.net
     9670_sare_evilnum0.cf.sare.sa-update.dostech.net
     9770_sare_evilnum1.cf.sare.sa-update.dostech.net
     9870_sare_bayes_poison_nxm.cf.sare.sa-update.dostech.net
     9970_sare_html0.cf.sare.sa-update.dostech.net
     10070_sare_html1.cf.sare.sa-update.dostech.net
     10170_sare_html2.cf.sare.sa-update.dostech.net
     10270_sare_html3.cf.sare.sa-update.dostech.net
     10370_sare_html_eng.cf.sare.sa-update.dostech.net
     10470_sare_header0.cf.sare.sa-update.dostech.net
     10570_sare_header1.cf.sare.sa-update.dostech.net
     10670_sare_header2.cf.sare.sa-update.dostech.net
     10770_sare_header3.cf.sare.sa-update.dostech.net
     10870_sare_header_eng.cf.sare.sa-update.dostech.net
     10970_sare_specific.cf.sare.sa-update.dostech.net
     11070_sare_adult.cf.sare.sa-update.dostech.net
     11172_sare_bml_post25x.cf.sare.sa-update.dostech.net
     11299_sare_fraud_post25x.cf.sare.sa-update.dostech.net
     11370_sare_spoof.cf.sare.sa-update.dostech.net
     11470_sare_random.cf.sare.sa-update.dostech.net
     11570_sare_oem.cf.sare.sa-update.dostech.net
     11670_sare_genlsubj0.cf.sare.sa-update.dostech.net
     11770_sare_genlsubj1.cf.sare.sa-update.dostech.net
     11870_sare_genlsubj2.cf.sare.sa-update.dostech.net
     11970_sare_genlsubj3.cf.sare.sa-update.dostech.net
     12070_sare_genlsubj_eng.cf.sare.sa-update.dostech.net
     12170_sare_unsub.cf.sare.sa-update.dostech.net
     12270_sare_uri0.cf.sare.sa-update.dostech.net
     12370_sare_uri1.cf.sare.sa-update.dostech.net
     12470_sare_uri2.cf.sare.sa-update.dostech.net
     12570_sare_uri3.cf.sare.sa-update.dostech.net
     12670_sare_uri_eng.cf.sare.sa-update.dostech.net
     12770_sare_obfu0.cf.sare.sa-update.dostech.net
     12870_sare_obfu1.cf.sare.sa-update.dostech.net
     12970_sare_obfu2.cf.sare.sa-update.dostech.net
     13070_sare_stocks.cf.sare.sa-update.dostech.net
     131}}}
     132
     133
     134You can then run sa-update as follows, adding it as a daily cron job.  This sequence looks for rule updates on all channels (!SpamAssassin and the DOStech channels), and if it makes any updates it then recompiles the rules for efficiency, tells Maia about any new rules, and restarts amavisd-maia.
     135
     136{{{
     137sa-update --gpgkey 856AA88A --channelfile /path/to/sare-sa-update-channels.txt && /usr/bin/sa-compile && /var/amavisd/maia/scripts/load-sa-rules.pl && /sbin/service amavisd restart
     138}}}
    20139
    21140----