Bug 7709 - Amavis X-Spam-Status header incompatible with mass-check --reuse
Summary: Amavis X-Spam-Status header incompatible with mass-check --reuse
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Masses (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: All All
: P2 enhancement
Target Milestone: Undefined
Assignee: Paul Stead
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-27 16:25 UTC by Paul Stead
Modified: 2019-04-27 20:25 UTC (History)
2 users (show)



Attachment Type Modified Status Actions Submitter/CLA Status
Diff for mass-check patch None Paul Stead [HasCLA]

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Stead 2019-04-27 16:25:28 UTC
Created attachment 5651 [details]
Diff for mass-check

As per discussion on ruleqa mailing list if mass-check --reuse is used on emails that have X-Spam-Status headers inserted the parser does not pick up the existence of any valid rules to reuse.

This ends in rules not being recognised by the weekly masscheck when emails have the amavis header.

This is due to the slight difference in format between amavis X-Spam-Status and native Spamassassin ones.

The attached is proposed adjustment to mass-check, if considered fine I can commit.

Paul
Comment 1 Henrik Krohns 2019-04-27 19:55:54 UTC
Perhaps document the differences with a comment (SA vs Amavis). It's usually good practise to mention bug number too.

Also the replace seems a bit complex. Perhaps simply

my @previous = split(/,/, $1);
# Bug 7709
s/[\[\]]//, s/=.*// foreach (@previous);
$ma->...
Comment 2 Paul Stead 2019-04-27 20:25:43 UTC
Sending        masses/mass-check
Sending        rulesrc/sandbox/pds/20_freshfmb.cf
Transmitting file data ..done
Committing transaction...
Committed revision 1858296.