Steven W. Orr wrote:
I dug deeper into the problem of why I was not getting the X-Spam-Relay-Countries header added to my mail, and I think I understand things a bit better. (The goal is to see what countries the few false negatives are going through.)

First of all, the correct add_header command seems to not be:
   add_header all Relay-Country _RELAYCOUNTRY_

Instead, it should be:
   add_header all Relay-Countries _RELAYCOUNTRY_
Actually it is functionally correct as is written. It doesn't matter what the added header is name, unless you wish to be pedantic about semantics.

The rules check X-Relay-Countries, which is an internal pseudo-header created by the RelayCountry plugin. That header isn't added to the message, but the rules will still match on it. They will work even if your add_header doesn't exist at all.

The only purpose of the add_header is to create a human readable copy, but SA doesn't use it internally.

I saw that the plugin was active by running spamassassin -D.

Also, by running spamassassin manually with a known piece of spam, I could see the X-Spam-Relay-Countries header being added but not when I ran spamc through sendmail/spamass-milter.

The problem was that the headers were not be passed through by (drum roll please): spamass-milter even though I am *not* using the -M option. Also, I am using spamass-milter to reject mail during reception (via -r 5)

I'm not looking for spamass-milter support from here (unless someone knows what to do), but I do like the way my system works and I'd like to continue using a milter to reject the spam. Are other people using milters with sendmail that don't suffer from this problem?

Hmm, any chance you neglected to restart spamd after editing the configs?

Do you get the same lack of modifications piping messages through spamc on the command line?

Reply via email to