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


Click here to return to the 'Does the Junk filter learn from unmarked Junk?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Does the Junk filter learn from unmarked Junk?
Authored by: TiVoFan on Oct 26, '06 09:17:37PM
Maybe I wasn't clear. The question was, "If I write a Mail Rule that moves a message to the Junk Folder, that message is not marked as Junk. (Check the menu item "View > Columns > Flags" to see what I mean.) Knowing that, does the Junk Mail filter use these messages for training, or does it ignore them?"

I'm guessing unmarked Junk messages are ignored, so I've been manually setting these messages to Junk before I erase them. As a result of this hint today, I wrote an AppleScript than can be invoked from a Mail Rule, and which does mark messages as Junk:
using terms from application "Mail"
   on perform mail action with messages theMessages for rule theRule
      tell application "Mail"
         repeat with eachMessage in theMessages
            set the junk mail status of eachMessage to true
         end repeat
      end tell
   end perform mail action with messages
end using terms from
It's based on Apple's "Sample Rule Action Script". It's still in testing mode, but so far so good! Also, if I remember correctly, I tried something similar with Panther and it didn't work. This script could be fine with Panther, but I'm sure it works with Tiger 10.4.8.

-T

[ Reply to This | # ]
Does the Junk filter learn from unmarked Junk?
Authored by: capitalj on Oct 27, '06 06:37:13AM

No, you were clear. Maybe the Help message is unclear (or maybe I have misinterpereted it - bit I don't think so)

If you don't use the "Move messge to Junk" option, junk mail is labeled so you can distinguish it from non-junk mail.

If you do use the "Move message to Junk" option, it is assumed that Mail has been trained and messages are properly filtered and don't need to be individually marked because they are already collectively isolated in the Junk mailbox.

It would be nice to have the option to do both.

You can also use shift-command-j to manually mark selected messages as junk.



[ Reply to This | # ]
Does the Junk filter learn from unmarked Junk?
Authored by: rgray on Oct 27, '06 07:36:38AM
Wow. Thanks for the script. I was surprised that Apple did not include a "mark as Junk" action in the Rule editor. I consider this a bug, a fault. As a rule and applescript novice, please, would it be better to 'mark as junk' (ie. the script) before or after moving to the Junk folder. It seems to me that each sequence has different implications regarding the learning function... ???

[ Reply to This | # ]
Does the Junk filter learn from unmarked Junk?
Authored by: TiVoFan on Oct 27, '06 07:53:32AM

My experience with the script and Tiger Mail has been that Mail reorders my actions, so it doesn't matter how you order them. For me, Mail always puts the AppleScript step last, regardless of where I put it. I have three steps for each spam-finding Rule: Move to Junk Folder, Set the Background Color, and run the "Set Junk Flag" script. And that's the order Mail will enforce, no matter what I do.

-T



[ Reply to This | # ]
Does the Junk filter learn from unmarked Junk?
Authored by: rgray on Oct 27, '06 09:17:14AM

OK, thanks. I compiled the 'Mark as Junk' script and attached it as an action to the 'Image Spam' rule. We shall see... I will report..



[ Reply to This | # ]