Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: loadplugin TextCat from user_prefs

From: Matt Kettler <mkettler_sa(at)verizon.net>
Date: Thu Oct 18 2007 - 23:01:45 EDT


jidanni@jidanni.org wrote:
> loadplugin Mail::SpamAssassin::Plugin::TextCat
> #I hate ru:
> ok_languages af am ar be bg ca cs da de el en es fa fi fr he hi hr hu hy id it ja ka ko mr ms ne nl no pl pt qu ro sk sq sr sv sw ta th tl tr uk vi zh
> add_header all languages _LANGUAGES_
> #score UNWANTED_LANGUAGE_BODY 11
>
> I was doing great, having a good time until --lint complained about
> UNWANTED_LANGUAGE_BODY, so I had to comment it out.
>
> Anyway, big mystery: how does one enjoy UNWANTED_LANGUAGE_BODY?
> I wish to only edit user_prefs, not gumming up anything else.
>

Sorry, that's nearly impossible from pure user_prefs, and the only way it would be possible would involve severely hacking up the spamassasssin.

You really need to have that plugin loaded from a .pre file. It must be loaded before the default ruleset is read, because that's where the UNWANTED_LANGUAGE_BODY rule is declared. If the plugin is not loaded at the time the default ruleset is read, the rule is skipped and never even read in.

user_prefs is the absolute last thing read by spamassasssin, at that point, it's vastly too late to try to load a plugin that impacts the default rulesets. Those rules are already long since gone, files read and those rules were skipped because their plugin wasn't loaded.

The whole concept of using .pre files was created because of the exact problem. They are loaded first, before anything else, to ensure your plugins are available before any rules files are read.

Rather than guming things up by trying to load standard plugins in your user_prefs, enable textcat in the standard v310.pre file that is already created for you, you just need to remove a single # from the start of the line.

This really is the only reasonable way to do it.

Your other alternatives include:

  1. Copying parts of the default ruleset into your user_prefs. However, this effectively inhibits sa-update from updating the rules.
  2. hacking the source code so user_prefs is loaded before the default ruleset.

Neither of those is particularly pretty, and would certainly be by far more prone to "gum things up" than using the .pre files as they're designed. Received on Thu Oct 18 23:04:59 2007

Do you need help?X

This archive was generated by hypermail 2.1.8 : Sat Jul 05 2008 - 21:28:29 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library