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

Filter those annoying gif spams in Mail Apps
I'm still working on this, at present it's way too simple, but effective nonetheless.

Set up a Mail rule: If "Any Attachment Name" contains ".gif" "Move Message" to mailbox "Junk".

Its a bit draconian, but hasn't had any false positives here. If you're worried just set the color of the message text or background instead of moving it.

[kirkmc adds: I agree that I've never gotten a valid message that contains a gif file, so this is a perfectly useful rule. If you do get messages containing gif files, then don't use the rule, or check your Junk mailbox often.]
    •    
  • Currently 2.00 / 5
  You rated: 4 / 5 (3 votes cast)
 
[14,479 views]  

Filter those annoying gif spams in Mail | 24 comments | Create New Account
Click here to return to the 'Filter those annoying gif spams in Mail' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Filter those annoying gif spams in Mail
Authored by: macgruder on Oct 26, '06 07:56:02AM

Wouldn't you at least add a 'and sender isn't in your address book filter'?

And it's useful to add a 'stop evaluating rules' too. Speeds things up.



[ Reply to This | # ]
Filter those annoying gif spams in Mail
Authored by: capitalj on Oct 26, '06 08:23:33AM

I used the Advanced seetings under Junk Mail in preferences (using "if any of the following conditions are met) to filter mail that contains gif attachments, has Microsoft Outlook Express as an X-mailer, or is not from a sender in my address book. This catches virtually all my spam.

I am fortunate not to receive too much, but I bounce and report every instance so when I do get an increase, it dies down after a few days



[ Reply to This | # ]
Filter those annoying gif spams in Mail
Authored by: hypert on Oct 26, '06 08:49:33AM

I took this same step about 2 weeks ago. It has not had any false hits, and my Inbox is much cleaner!



[ Reply to This | # ]
Filter those annoying gif spams in Mail
Authored by: fbitterlich on Oct 26, '06 09:04:13AM

Well, as usual: YMMV, but this technique wouldn't do any good for me. A lot of those Yahoo mails and similar contain GIF smileys, ads, and other stuff, so I'd get a lot of false positives this way.



[ Reply to This | # ]
Filter those annoying gif spams in Mail
Authored by: arloguthrie on Oct 26, '06 09:30:13AM
Another options is to filter out anything with a "multipart/related" content-type. I've been using this hint for awhile:

http://www.hawkwings.net/2006/08/01/mailapp-rule-fix-for-image-spam/

I haven't seen one of those since.

[ Reply to This | # ]
Filter those annoying gif spams in Mail
Authored by: AquaX on Oct 26, '06 10:42:41AM

I've also been using this multipart/related filter, and it's worked wonders. Previously Mail would miss about seven or eight of those a day, now I don't get any, and haven't had a single false positive.



[ Reply to This | # ]
Filter those annoying gif spams in Mail
Authored by: MtnBiker on Oct 26, '06 11:08:18AM

I hadn't seen this, but seems a better approach since I had two good messages with gifs (used to decorate the message).

This approach at least gave no false positives the first time. Will have to let it run for a while.

---
Hermosa Beach, CA USA



[ Reply to This | # ]
Filter those annoying gif spams in Mail
Authored by: Bob456 on Oct 26, '06 11:26:23AM

Thanks for the hint. I'm sure it works for some folks.

I would get quite a few false positives.

I get mail from yahoo, plus efax and others that emaol me regurlarly use gifs for logos and other little email enhancements.



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

I've used the "Move message to Junk" trick with different criteria. The trouble is, those messages don't get marked as Junk, even though they're in the Junk folder.

So, does the intelligent Junk filter learn from this unmarked Junk, or not?

-T



[ Reply to This | # ]
Does the Junk filter learn from unmarked Junk?
Authored by: capitalj on Oct 26, '06 05:05:41PM

You have to train it first. From Mail Help:

Mail can automatically identify messages that are likely to be junk mail and place them in a Junk folder so they're out of your way. Mail begins by coloring messages brown that seem to be junk and leaving them in your Inbox. You can train the junk filter by using the Mark As Junk and Mark As Not Junk menu items or toolbar items.

When Mail is correctly identifying most of your junk messages, you can go to Junk Mail preferences and choose to have junk mail messages routed automatically to a special Junk mailbox.



[ Reply to This | # ]
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 | # ]
Does the Junk filter learn from unmarked Junk?
Authored by: kholburn on Oct 27, '06 02:49:16PM
I use this one:

using terms from application "Mail"
	on perform mail action with messages theMessages for rule theRule
		tell application "Mail"
			set theText to "This AppleScript is an AppleScript rule action" & return & return & "To view this script, hold down the option key and select it again from the Scripts menu."
			try
				-- If this is not being executed as a rule action, getting the name of theRule variable will fail.
				set theRuleName to name of theRule
				set theText to ""
			end try
			if theText is not equal to "" then
				display dialog theText buttons {"OK"} default button 1
			else
				repeat with eachMessage in theMessages
					set junk mail status of eachMessage to true
				end repeat
			end if
		end tell
	end perform mail action with messages
end using terms from



[ Reply to This | # ]
Filter those annoying gif spams in Mail
Authored by: pbeyersdorf on Oct 26, '06 11:31:29AM

That's a great hint at jus the right time. These junk mails are really testing my patients. Anyhow, I added a criteria to the rule "Message sender is not in my address book" and required both criteria to be met, I don't know if I have legitimate emails that include gif attachments, but if I do at least those from my inner circle will still get to me.



[ Reply to This | # ]
Filter those annoying gif spams in Mail
Authored by: pub3abn on Oct 26, '06 11:55:43AM

Great hint!

I've heard that one of the Spotlight technologies that Apple is working on is OCR, so that Spotlight can index images that contain words in the form of pixel data. It would be absolutely wonderful if that same technology could be applied to filtering spam. In other words, Mail could then "read" the words in the GIF images and filter them based on content.



[ Reply to This | # ]
Filter those annoying gif spams in Mail
Authored by: jtrott on Oct 26, '06 08:44:53PM

There is a plugin for SpamAssassin called FuzzyOCR that uses the open source GOCR to extract the text of the image in just that fashion. I'm using it on my mail gateway to great effect in filtering out these kind of spams.
Hopefully Apple will add something similar to Leopard servers implementation of SpamAssassin.



[ Reply to This | # ]
Filter those annoying gif spams in Mail
Authored by: dan55304 on Oct 27, '06 07:23:35AM

I kind of have a different need. Some of my Windows friends think it's nice to clutter up email with pretty borders and backgrounds. Unfortunately, I view email as text only and all these come in with attachments that bloat the size of my mail folder.

Is there any way to automatically strip these attachments off?



[ Reply to This | # ]
Filter those annoying gif spams in Mail
Authored by: haloici0us on Oct 27, '06 11:01:35AM

Prior to this really awesome hint, I was using X-Mailer and exluding emails that contain "Microsoft Outlook" in that description.
This then blocked out two people in my family who are not on a Mac. I had to dig out email from my mom and grandmother from Junk when they'd bother to email me.

Now I have changed my filters so that it filters out the GIFs unless it's a Previous Recipient or in my Address Book. Now I get their email and the spam goes where it belongs. Yay!



[ Reply to This | # ]
Filter those annoying gif spams in Mail
Authored by: Tony Aguila on Oct 28, '06 11:17:22AM
A further safeguard against false positives would be to add the condition Sender is not in my Previous Recipients and set if all of the following conditions are met:

For actions, in addition to moving it into the Junk folder, I would add Set Color of background to a color of your choice, to set it apart from normal filtered junk mail. Remember to mark the message as junk if indeed it is.

---
Tony Aguila

[ Reply to This | # ]

Filter those annoying gif spams in Mail
Authored by: rgray on Oct 28, '06 02:08:34PM

At this point the offending message is moved to Junk but is not yet marked as junk. be sure to add an action that invokes the script above. I like the first but there may be reasons Ihaven't fully considered for using the second. YMMV.



[ Reply to This | # ]
Filter those annoying gif spams in Mail
Authored by: auggius on Nov 05, '06 08:58:18AM

I'd like to use this filter, but my Mail app doesn't have them in the drop down list. I'm using Mail 1.2.5 (v553) from 10.2.8 still and haven't been able to find an updated Mail app on the Apple download site. Is the Mail app OS version specific?



[ Reply to This | # ]