On Wed, 2008-03-05 at 11:05 -0500, leonard.gray@srs.gov wrote:
> I'm trying to get the RelayCountry plugin running here in order to get
> a Mime header of all of the relay countries put on all messages.
> We're running 3.1.1, and I've implemented the necessary patch to
> Mail::SpamAssassin::Plugin::RelayCountry.

Which one? The discussion in bug 3815 [1] suggests, that 3.1.1 already
got some code added -- which unfortunately did not work. A correct fix
went in into 3.1.2.

Also, what about upgrading your SA rather than applying patches?
Even if upgrading to 3.2 is not an option, there have been quite a few
3.1.x releases since 3.1.1...

Any chance you got multiple RelayCountry.pm on your system and patched
the wrong one?

Did you 'loadplugin' it as per the docs? The RelayCountry plugin is
disabled, commented out in init.pre by default in the 3.1 branch.

> Running SA in debug, I can see that the plugin is doing its work just
> fine. The X-Relay-Countries is returning expected values in the debug
> output.

Sounds strangely similar to the discussion in bug 3815.

> However, after adding "add_header all Relay-Countries _RELAYCOUNTRY_"
> to my /etc/mail/spamassassin/local.cf file, there is no header being
> added. To check this even further, I put "add_header all Test-LG
> 'This is a test'" into the /etc/mail/spamassassin/local.cf file. That
> header isn't being added either.

How did you test this, how exactly did you call SA?

> I've checked through the wiki, eliminated all possibilities of
> user_prefs overriding local.cf and cannot figure out why add_header
> isn't working for me. No Amavisd or Exim in front.
> Does anyone have any ideas or experience with this?

Works as advertised for me.


[1] http://issues.apache.org/SpamAssassi...ug.cgi?id=3815

char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a \x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i (c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}