Bug 7673 - check_ratware_envelope_from only checks SRS uppercase
Summary: check_ratware_envelope_from only checks SRS uppercase
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Plugins (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: PC Linux
: P2 normal
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-22 21:20 UTC by Wesley Stessens
Modified: 2018-12-26 09:50 UTC (History)
3 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 Wesley Stessens 2018-12-22 21:20:18 UTC
It looks like check_ratware_envelope_from in http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/HeaderEval.pm?view=markup only checks /^SRS\d=/ when SRS is uppercase on line 1075 (for SVN revision 1845749). However, during my testing it looks like it often comes in lowercase (srs0=) on my system.

Would it be possible to do this check case-insensitive?

Or is it supposed to always be uppercase according to standards? Then it might be a bug somewhere else.. PostSRSd or Postfix maybe..? But I wasn't able to find out where it gets converted to lowercase.. And we can't change all external mailservers to force them to send SRS in uppercase?

So even then, it might be great if SpamAssassin would work around it since other servers might be configured like mine?

Making the check case-insensitive did fix the issue for myself...

PS: What should I do in the meantime to get this fixed without having to touch the code? A lot of mails are being flagged as spam incorrectly because of this. Should I just disable the RATWARE_EFROM rule for now?
Comment 1 RW 2018-12-22 23:03:09 UTC
I'd just disable it. I've never seen it hit anything, and according to rule QA it only hits about 1 in 50k spams, and hits more ham than spam.

If you want to try working around your problem you could define:


header __RATWARE_EFROM eval:check_ratware_envelope_from()

meta RATWARE_EFROM     __RATWARE_EFROM && !__EFROM_SRS

You will have to define __EFROM_SRS based on whatever envelope-from header is available at scan time.
Comment 2 Giovanni Bechis 2018-12-26 09:50:31 UTC
Good catch, fixed in r1849747.