Big Wave Dave wrote:
On 5/15/07, Daryl C. W. O'Shea <[EMAIL PROTECTED]> wrote:
Big Wave Dave wrote:
> I am running SA 3.1.8, and I'm having issues implementing the
> RelayCountry plugin.  I followed the Wiki/PerlDoc page, but have not
> had any success.

> However, the header is never added.
>
> In init.pre, I have individually tried each:
>
> add_header all Relay _RELAYCOUNTRY_
>
> add_header all Relay_Country _RELAYCOUNTRY_
>
> add_header all Relay-Country _RELAYCOUNTRY_
>
> add_header all X-Relay-Countries _RELAYCOUNTRY_
>
> I tried each of the above, following posts I found online.  I got the
> impression it varried depending on the version you wer running.  The
> wiki references SA 3.1.0.  Regardless, none of them added the header.
> I'm sure I'm missing something simple.
> Any input is appreciated.

That doesn't pass a lint check, does it?  The first thing to do when
debugging a problem is to run 'spamassassin --lint'.

Move the config to local.cf and you'll be all set.


Daryl

It passes 'spamassassin --lint' with the config in init.pre or
local.cf.  The original email show snippets of the debugging when I
ran 'spamassassin -D' against a real message.  I figured lint may not
work since it may not have a relay IP to check against.  Even when I
run 'spamassassin -D --lint' I see:
[31258] dbg: plugin:
Mail::SpamAssassin::Plugin::RelayCountry=HASH(0xee86aa0) implements
'extract_metadata'
[31258] dbg: metadata: X-Relay-Countries:

This debug output has nothing to do with add_header. Even without the plugin loaded the header would still be added if add_header was working/configured correctly.


It seems like the plugin is loading properly... the piece requesting
it added to the headers it where my config is broken.

Ah, yeah, add_header lines in a pre file wouldn't cause a lint error since they don't need a plugin to be loaded in order to be parsed.

Of course you won't get the desired effect if you place the add_header lines in a pre file since the settings will be cleared by the clear_headers directive in 10_default_prefs.cf.

I fail to see why it didn't work when you placed the add_header directive in your local.cf file (unless your local.cf is unreadable for whatever reason). You did check the output with add_header in local.cf, right?

Perhaps full debug output would make things clear as to what is going on.


Daryl










Reply via email to