Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Get Mail to use ISP's non-standard spam headers Apps
Mail already has an option in the Junk Mail preferences to trust your ISP's junk mail headers. However, if they're non-standard, then they may not be recognised. It occurred to me when a few messages slipped the net that whilst I hadn't signed up to my web host's spam protection service that their server may still put in spam headers into messages. To my surprise, this was indeed the case, as can be seen in a snippet below:
X-Spam-Score: 5.4 (+++++)
X-Spam-Flag: YES
X-Spam-Report: Spam detection software, running on the system
        "xxxxxx.xxxxx.xx.xx", has identified this incoming email
        as possible spam.  The original message has been attached
        to this so you can view it (if it isn't spam) or block
        similar future email.  If you have any questions, see the
        administrator of that system for details.
So all I had to do then was to go to Advanced... in the Junk Mail preference pane, add a new header for X-Spam-Flag, set it to contain YES, and that's it. Of course, you can do the same for any other header you choose.
    •    
  • Currently 3.00 / 5
  You rated: 3 / 5 (5 votes cast)
 
[14,836 views]  

Get Mail to use ISP's non-standard spam headers | 11 comments | Create New Account
Click here to return to the 'Get Mail to use ISP's non-standard spam headers' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Get Mail to use ISP's non-standard spam headers
Authored by: sebastienb on Apr 01, '04 12:31:01PM

Well, I was going to give more information about those actual headers, but since macosxhints is obviously not serious about their content, prefering instead to waste internet bandwidth, I see no point in contributing anymore.



[ Reply to This | # ]
Get Mail to use ISP's non-standard spam headers
Authored by: pediddle on Apr 01, '04 04:18:07PM

Huh?



[ Reply to This | # ]
Get Mail to use ISP's non-standard spam headers
Authored by: robg on Apr 01, '04 04:58:30PM

He's irked because I chose to run a fake press release on April Fool's Day -- you can read his comments in the G5 Cubed Press Release...

-rob.



[ Reply to This | # ]
Get Mail to use ISP's non-standard spam headers
Authored by: edoriv on Apr 01, '04 05:25:34PM

then why is he still posting... delete his account and banish him to his pc trolling doom :-)

or maybe he's pulling his on aprils fools be it lame as it is though...



[ Reply to This | # ]
Get Mail to use ISP's non-standard spam headers
Authored by: Lizard_King on Apr 02, '04 01:25:47PM
Dude, I thought you left already. Time's a wastin'.... Btw, I'll buy a second book to make up for your silly boycott.

[ Reply to This | # ]
Get Mail to use ISP's non-standard spam headers
Authored by: cparnot on Apr 05, '04 02:01:06AM

Can't you all see he IS joking???

He is very talented, that's all.

---
charles



[ Reply to This | # ]
Get Mail to use ISP's non-standard spam headers
Authored by: ppp on Apr 01, '04 12:50:40PM

I think that the Mail preference (Junk Mail) "Trust Junk Mail headers set by your Internet Service Provider" does just this.



[ Reply to This | # ]
Get Mail to use ISP's non-standard spam headers
Authored by: babbage on Apr 02, '04 07:55:00AM

Of course, these "non-standard" mail headers are the ones provided by the open source SpamAssassin toolkit. It may not be an IETF standard or a formal RFC, but it's a widely used and very high quality product, so calling it "non-standard" is kind of a pointless cheap shot.

That said, SpamAssassin is highly configurable, and not every installation will attach the same headers to processed messages. To deal with this, it will help to have a rough grasp of how SpamAssassin works.

To wit: SpamAssassin is a framework for applying a series of rules to messages, with each of those rules assigning a score based on how likely the message is to be spam. Maybe the word "viagra" will give a +4.2 score, while a phrase like "Puff, the magic dragon" would get a -1.3, and a header like "From: mom " will get a -100 (if you've set up SA to whitelist your mom & her email address). The scores assigned by all these rules -- dozens of them by default, and it's easy to add more -- is totalled up to a final score for the message, and that final score, which usually is added to the message headers, represents how confident SA is that a given message is spam.

SA by default flags any message with a score over 5 as spam, but sometimes it can be wrong. Using a higher value -- 7 or 10 for example -- will be more cautious, flagging only the really obvious spam and producing very few false positives, but also allowing a few spams ('false negatives') through. On the other hand, if you really hate spam and can tolerate legit mail being flagged as spam (note: most people don't want to lose any of their legit mail, but some don't care), then you can set the threshold really low -- 2 or 1 -- and almost none of your spam will get past SA.

So, if your ISP is running SpamAssassin, and they haven't provided a FAQ for how to configure popular mail clients to use their SA data (and if they didn't, shame on them!), you may need to look over the headers that your incoming mail include. It will often be X-Spam-Flag: YES, but not always. You may prefer to look at the X-Spam-Score: header, and decide for yourself if you agree with your ISP's results -- maybe you want to use a higher or lower score than they do, for example.

I'm not sure if Mail.app can put simple arithmatic in filters, so if you want to say that the X-Spam-Score: header must have a value greater than or equal to 6.0 before flagging it as junk mail, you may have to do something silly like a series of rules looking for X-Spam-Score: begins with 6, X-Spam-Score: begins with 7, X-Spam-Score: begins with 8, X-Spam-Score: begins with 9, X-Spam-Score: begins with 10, X-Spam-Score: begins with 11, etc. There's hopefully a better way than that, but I'm not normally a Mail.app user, so I forget what the filters allow you to do. Under the version on this 10.2 machine, it doesn't look like there's a way to get any closer than "begins with", which could be annoying to figure out how to do right.

As an alternative, there's always Fetchmail & Procmail :-)

---
--
DO NOT LEAVE IT IS NOT REAL

[ Reply to This | # ]

Get Mail to use ISP's non-standard spam headers
Authored by: Peter Teichman on Apr 02, '04 08:46:50AM

The preferred way to filter for a SpamAssassin score greater than 6.0 is to use the X-Spam-Level header. Use "X-Spam-Level contains ******".



[ Reply to This | # ]
Get Mail to use ISP's non-standard spam headers
Authored by: rgray on Apr 05, '04 11:17:43AM
Peter Teichman wrote: The preferred way to filter for a SpamAssassin score greater than 6.0 is to use the X-Spam-Level header. Use "X-Spam-Level contains ******".

Isn't this effectively 'greater than or equal to 6..? (and if not why not) . To strictly get greater than 6, you'd need to screen for "*******" (7 asterix)

[ Reply to This | # ]

Get Mail to use ISP's non-standard spam headers
Authored by: stevek on Apr 06, '04 12:49:13PM

Interesting info about looking for spam information coming from the provider. I thought I'd check my mail coming in on my Speakeasy.net account. Looks like they do have some type of "non standard" ;) spam filtering in use. It looks like they use a product called Amika Guardian (headers look like this: "X-Amikaguardian....". I used google to find out some more about the company but couldn't really find any good information about what their filtering give us or how I can use it. I do notice that some of my messages get a Junk Mail or Spam rating it looks like. Who knows, maybe that could be used in some kind of filtering within Mail. Anyone familiar with this?



[ Reply to This | # ]