Bug 7466 - Fixes for Bug #6945 break the ability for rules to match based on attachment name
Summary: Fixes for Bug #6945 break the ability for rules to match based on attachment ...
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 3.4.0
Hardware: PC Linux
: P2 normal
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-30 22:39 UTC by Shaun Johnson
Modified: 2017-08-31 15:39 UTC (History)
2 users (show)



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Shaun Johnson 2017-08-30 22:39:38 UTC
Looking over the changes that were made for #6945 - I get it - I understand it - but unfortunately this has proven to break the ability for rules to be made that target file name patterns (eg: files ending with .docm or similar).  I note that upstream sa-update rules have several of these patterns as well that are similarly being defeated by UTF encoding the file name.

Suggest that instead of having function _decode_header skip the Content- headers, that the original bug should possibly have changed the mechanism of how sa-learn works - for example - there is already a stored array of the 'raw' headers in the Message Node object that are available for sa-learn to operate from without having to taint the results of the 'decoded' header values.
Comment 1 Kevin A. McGrail 2017-08-31 00:46:32 UTC
Can you provide specific examples of rules with problems?

Are you testing with and without normalize_charset 1?

It's also most helpful to submit patches or at least a framework of a fix. 

KAM
Comment 2 Karsten Bräckelmann 2017-08-31 01:42:26 UTC
This appears to have been fixed with bug 7249 in trunk.

Rather than backporting commit revision 1707593 and its siblings in full, just reverting the bit for Content-* header seems appropriate for the stable 3.4 branch.

Sending        Node.pm
Committed revision 1806756.

Shaun, can you confirm this fixes your issue?
Comment 3 Shaun Johnson 2017-08-31 15:20:31 UTC
That does indeed fix the issue - just curious however if that removal of the Content- exclusions might not cause a regression with the original bug related to sa-learn?
Comment 4 Karsten Bräckelmann 2017-08-31 15:39:47 UTC
Thanks for the confirmation, Shaun. Closing RESOLVED FIXED.

Decoding of Content-* headers should not cause a regression with bug 6945, which really is about non-ASCII chars in the Message-ID only. The decoding of Content-* headers is unrelated, and should not have been disabled in the first place unlike e.g. for Message-ID and Received headers. This has already been reverted in trunk, too.