Ticket #289 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

load-sa-rules.pl does not find new rules after running sa-update

Reported by: rjl Owned by: rjl
Priority: normal Milestone: 1.0.1
Component: Perl scripts Version: 1.0.0
Severity: normal Keywords: load-sa-rules.pl sa-update
Cc:

Description

As of SpamAssassin 3.1.1, a new utility called sa-update provides an auto-updating mechanism for SpamAssassin rules, either from the SpamAssassin project itself or from third-party channels. This is NOT a replacement for rules_du_jour, but a way to update the CORE rules on a regular basis without having to wait for the next SpamAssassin release.

The sa-update script does not overwrite the core rules from your SpamAssassin installation, however. It writes the new rules to subdirectories beneath /var/lib/spamassassin/%%VERSION%%, one subdirectory per channel. SpamAssassin 3.1.1 looks first for that directory for its core rules, and only resorts to /usr/share/spamassassin if it can't find any versioned updates. This means that load-sa-rules.pl needs to know how to find these updated rules, and follow SpamAssassin's new logic. Otherwise, rule updates will be missed by load-sa-rules.pl.

Change History

Changed 2 years ago by rjl

  • status changed from new to closed
  • type changed from defect to enhancement
  • resolution set to fixed

Changeset 987 solves this problem with a largely-redesigned load-sa-rules.pl script. The new script requires less configuration than the old one, as it needs to do some directory-walking to find the updated files anyway, so it might as well follow SpamAssassin's own rules for finding rule files rather than requiring you to hard-code paths. You can still override its search results with settings in maia.conf and/or the command-line, of course, if it's not finding the directories you think it should.

The script is now aware of sa-update's work, and backward-compatible with older versions of SpamAssassin as well. It produces more orderly output now as well, with --debug and --quiet options available.

Note: See TracTickets for help on using tickets.