https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6929

            Bug ID: 6929
           Summary: rules cannot match X-Spam-ASN
           Product: Spamassassin
           Version: 3.3.2
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Rules
          Assignee: [email protected]
          Reporter: [email protected]
    Classification: Unclassified

Feature request
---------------

It will be useful to weight incoming mail according to
its origin Autonomous System (AS).

But currently, SA ignores all rules based on header lines
starting with "X-Spam-".

SA will not match any rule based on the
ASN.pm module, what will insert lines like

X-Spam-ASN: AS1234 1.2.3.4/16
X-Spam-Source: 1.2.3.4

because SA either strips all header lines starting
with X-Spam- before applying the rules (and ASN.pm
does run before the stripping) or
ASN.pm runs after the rules are already applied.

Any rule like

header LOCAL_AS1     X-Spam-ASN =~ /^AS1234 /
describe LOCAL_AS1   Sender IP in AS from trustful provider
score LOCAL_AS1      -0.1

is currently ignored.

I suggest that SA uses the following order instead
1) strip all header lines starting with
   X-Spam- from the incoming mail
2) run the ASN.pm module
3) apply the rules including any rule
   basing on the lines included by ASN.pm


Kind regards, Frank

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to