Bug 4167 - Feature Request: Attatchment Present
Summary: Feature Request: Attatchment Present
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Rules (show other bugs)
Version: 3.0.2
Hardware: All All
: P5 normal
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords: triage
Depends on:
Blocks:
 
Reported: 2005-03-02 16:11 UTC by Walter Jeffries
Modified: 2005-04-30 05:57 UTC (History)
0 users



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 Walter Jeffries 2005-03-02 16:11:30 UTC
It would be nice if there were a rule reported in the X-Spam-Status line of: Attachments_Present
I ask for this as a lot of spam, especially from ASIA, comes with huge attachments. Drug company spam 
also very often has attachments. I would rather not receive any email with attachments from anyone 
who is not in my whitelist. If this rule were available then I could set in my user_prefs:

score Attachments_Present 50

That way people in my whitelist would still be able to send me attachments (they would end up with a 
score somewhere around -50 after adjusting for their whitelist_from score of -100) but email from 
people not in my whitelist would get a very high score (around 50 or more typically) and could be 
discarded.

Since I can't write custom rules due to my service provider being afraid of what they might do it would 
be helpful if this was a general rule.
Comment 1 Bob Menschel 2005-04-07 23:59:15 UTC
Walter, Please add the following score line to your user_prefs: 

score  __MIME_ATTACHMENT  1

I think the __MIME_ATTACHMENT rule defined in 20_html_tests.cf might do what you
want. This is normally a no-score rule, but I think that can be over-ridden.
Will this do what you want? 
Comment 2 Daniel Quinlan 2005-04-08 00:11:15 UTC
Yeah, I think that'll work.

He could also do:

meta MY_RULE __MIME_ATTACHMENT

and that would create a new rule named MY_RULE with the default score of 1.
Either way.
Comment 3 Walter Jeffries 2005-04-08 05:27:03 UTC
Unfortunately many service providers have custom rules turned off as it is advised in the SA docs to not 
let users have custom rules. My service provider is afraid to turn this feature on due to this warning. 
You could send him (support@vonetwork.net) a message letting him know it's okay, that I'm a 
wonderful responsible person who would never harm his system and he should turn on. Until then I'm 
stuck with the standard score modification type adjustments of existing rules in the user_prefs and I 
can't make meta's or define new rules. I would like to define some rules to catch FPs related to our mail.
Comment 4 Bob Menschel 2005-04-28 20:18:59 UTC
Walter -- please verify -- does supplying a score to the __MIME_ATTACHMENT rule
do what you need?  If so, we'll close this entry as fixed.  Thanks. 
Comment 5 Walter Jeffries 2005-04-29 04:02:18 UTC
It doesn't work for me. Perhaps it would if I could do custom rules but my service provider does not 
allow this (please refer to "Additional Comment  #3 From Walter Jeffries  2005-04-08 05:27"). I would 
love to see a solution that did not require doing a custom rule but rather just let me adjust the scoring 
value that can be done in the user_prefs.
Comment 6 Loren Wilton 2005-04-29 05:41:13 UTC
"Custom rules" != "User Prefs".

If you have per-user preferences, then you can set the scores for the various 
EXISTING rules in the main rule base, plus any add-on rule bases that may exist 
in the installation.  You simply can't add or modify any rules.  But you CAN 
chage the way the existing rules will score by including "score <rulename> 
<number>" lines in your user_prefs file.

Now granted, your ISP/provider may not even have this level of ability or 
willingness to deal with things.  But Bob's suggestion was that A RULE EXISTS 
to produce essentially the desired output.  It merely needs to be enabled.
Comment 7 Fred T 2005-04-29 11:46:57 UTC
I was hoping to test this, and when I searched for __MIME_ATTACHMENT I was
unable to find this rule.  Searching BZ for __MIME_ATTACHMENT and this is the
only bug I can find where that string is present.
Can someone who has this rule please comment on what it contains?
Thank you!
Comment 8 Fred T 2005-04-29 11:49:53 UTC
I found it in 3.1 branch, it appears to not have been around in 3.0.x, not a
valid solution for this guys problem.
Comment 9 Bob Menschel 2005-04-30 13:29:31 UTC
You're right -- I could have sworn that my search before found it in other
versions, but repeating that search finds it only in my 3.1 svn directory. 

Since the __MIME_ATTACHMENT does/will now exist in 3.1, and will resolve this
problem once distributed and installed, I'm closing this as FIXED, recognizing
that the fix won't reach the end user until 3.1.0 itself does. 
Comment 10 Bob Menschel 2005-04-30 13:57:26 UTC
Fixed in 3.1.0