On Mon, Apr 24, 2006 at 02:07:16PM -0400, Matt Kettler wrote: > Igor Chudov wrote: > > On Mon, Apr 24, 2006 at 01:41:47PM -0400, Matt Kettler wrote: > >> Igor Chudov wrote: > >>> I use Spamassassin 3.1.1, and specified the following in my local.cf: > >>> > >>> loadplugin Mail::SpamAssassin::Plugin::RelayCountry > >> First: DO NOT put ANY loadplugin statements in your local.cf, unless you > >> understand the side-effects and intentionaly don't want the rules for the > >> plugin > >> to be loaded. > > > > Thanks. I made the change and moved these declarations to init.pre. > > > >> Edit your init.pre for this one. All your loadplugin statements should be > >> in > >> init.pre or v310.pre. The files should even have the statements in them > >> already, > >> all you need to do is change which ones are commented out. > >> > >>> add_header all Relay-Country _RELAYCOUNTRY_ > >>> > >>> When I run spamassassin from command line, it does set the > >>> Spam-Relay-Country header, BUT its value is always > >>> empty. > >> Where did you get the idea that _RELAYCOUNTRY_ would work here? > > > > It is mentioned in many places, for example > > > > http://search.cpan.org/dist/Mail-SpamAssassin/lib/Mail/SpamAssassin/Plugin/RelayCountry.pm > > > > Hmm, you're right.. it was apparently added to the docs for SA 3.1.1, but > wasn't > correctly implemented.
Sounds like it. > >> That feature is not present in SA 3.1.1 but is due to be released when SA > >> 3.1.2 > >> comes out. > >> > >> http://issues.apache.org/SpamAssassin/show_bug.cgi?id=3815 > >> > >> However, SA does create a temporary fake header called > >> "X-Relay-Countries". You > >> can write SA rules that will match this header, but it gets removed when > >> SA is > >> done with the message. > >> > > > > That would be interesting, how can I add that header now? > > X-Relay-Countries is already created. But it's also never added to the message > itself. You can't force this header into the message. > > > > > I would just handle it with procmail or my own mail filter that I > > have. > > > >> At present there's no way for SA 3.1.1 or older to create a permanent > >> header > >> with this info in it. > > > > any help on getting this going now will be appreciated. > > You'd have to patch your copy of SA with the fix patch from the bug report > above. However, this assumes you're comfortable with diff/patch tools. > > You can get the patch at: > http://issues.apache.org/SpamAssassin/attachment.cgi?id=3444&action=view > > > This is a hard-coded problem. There's no configuration options in SA 3.1.1 > that > can fix it. > I re-downloaded SpamAssassin, applied the patch, re-installed it, and not there is no header added at all (it used to be an empty header and now there is nothing). I have this statement in init.pre add_header all Relay-Country _RELAYCOUNTRY_ and it no longer works at all. i