Bug 5274 - Plugins not loaded when site rules files are evaluated
Summary: Plugins not loaded when site rules files are evaluated
Status: RESOLVED WORKSFORME
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Rules (show other bugs)
Version: 3.1.7
Hardware: PC Linux
: P5 normal
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-04 08:49 UTC by Jeff Rife
Modified: 2007-01-04 11:44 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Rife 2007-01-04 08:49:03 UTC
In 50_scores.cf, scores are wrapped in the following manner:

ifplugin Mail::SpamAssassin::Plugin::SPF
score USER_IN_SPF_WHITELIST -100.000
score USER_IN_DEF_SPF_WL -7.500
score ENV_AND_HDR_SPF_MATCH -7.500
endif # Mail::SpamAssassin::Plugin::SPF

Using the same syntax but changing the scores in a file in the site rules 
directory results in the "ifplugin" always returning false.

This behavior also occurs for the user prefs file.

The reason this is a bug is that if the SPF plugin (in my example) is not 
loaded, then the "score" lines throw a lint warning.
Comment 1 Theo Van Dinter 2007-01-04 11:21:04 UTC
Please provide more information, such as the output from "spamassassin -D
--lint".  Unless you're loading the plugin from a cf (which we have documented
is bad), the plugins load before any rules via the pre files.
Comment 2 Jeff Rife 2007-01-04 11:44:35 UTC
It must have been a weird "ifplugin" nesting error with no output in lint.

I had deleted the "ifplugin" lines to make things work and manually adding them 
back results in everything working fine.

My bad.