Help me delete spam!
October 20, 2005 7:24 AM   Subscribe

I have a very basic requirement that Apple Mail doesn't seem to easily fulfill. I need to immediately delete messages that are identified as junk from the server.

I get a lot of spam, and though I'm happy with's Junk Mail filtering in Tiger, it won't do this basic thing that is essential to me. When I check my POP email from my Treo or from my laptop, which I do at least one day a week, the junk mail that has already been identified and filtered in my desktop machine is of course still on the server.

In the past I used an app called SpamFire to accomplish something similar, but it has been causing problems lately and I would prefer to do it all in if I could. Is there a simple AppleScript to make this happen? I have checked all over the net but haven't found it yet if it exists already.

Can anyone help me with this, or suggest alternate strategies?
posted by mikel to Computers & Internet (15 answers total)
Even if you find a way to do this, you should seriously consider changing your mind. No spam filter is 100% accurate, and occasionally legitimate e-mails will be marked as spam. If you delete them immediately without looking at them, you could lose legitimate e-mail and not even know it.
posted by Mwongozi at 7:30 AM on October 20, 2005

Response by poster: My experience with is that I get no false positives on my desktop machine though some spam does get through.

In any case, this isn't an issue because I would hope it would keep a copy on the machine and just delete it from the server. Thus I can always double-check for false positives later on.
posted by mikel at 7:34 AM on October 20, 2005

can you not hit Junk Mail in the Preferences, click the Advanced button, and change "Move Message" to "Delete Message"? does that not work? (yes, I'm really asking as I get too much not-spam-but-marked-as-such to try it out.) alternatively, under the Accounts tab, you may be able to select the account, hit Advanced, and do "Remove copy blah blah blah" and set it to do it after it moves it from the Inbox. (I'm assuming here that you're both checking your mail with POP on the desktop and you don't have folders, which I'm not sure POP supports anyway.)
posted by mrg at 7:39 AM on October 20, 2005

oops. on preview the last suggestion I had sounds like it'd do what you want as when it moves the message to Junk on your desktop it'll remove it from the server too.
posted by mrg at 7:39 AM on October 20, 2005

Response by poster: The second one is close, mrg, and I looked at that before, but it also removes emails that have been moved from the Inbox to other folders by other rules, not just items placed in the Junk folder.

Using the Junk Preferences to delete the mail ends up doing what Mwongozi was afraid of, in that it leaves no trace of the email at all, and so it prevents me from occasionally checking for false positives.

Thanks for the attempt though!
posted by mikel at 7:53 AM on October 20, 2005

If you switch from pop to iMap, then the junk mail will get moved to its own folder on both the server and your machine. Then it won't be seen by your mobile clients, right?
posted by alms at 7:53 AM on October 20, 2005

You may be able to do this with an AppleScript triggered by a rule. The message object does have a property "deleted status" that, if set to true, MAY do what you want if Mail works anything like Entourage. (It may not.) Unfortunately I've never scripted Mail.

I do the same thing in Entourage with a script like this:

tell application "Microsoft Entourage"
     set msgs to current messages -- doesn't work without temp variable
     repeat with m in msgs
          set m's connection action to remove at next connection
     end repeat
end tell

This won't work as-is in Mail, but something of a similar approach could be used.
posted by kindall at 8:16 AM on October 20, 2005

If you select your POP mailbox and choose Get Info then Show Messages, you can manually delete messages are in your POP inbox. May not be a practical soluction, but it's a start at least.
posted by cillit bang at 8:21 AM on October 20, 2005

What's wrong with using a message rule. Looking at the rules in 10.4's it has the option "Message is Junk Mail" and you can have the rule move the message to a folder that lives on your mac. Problem solved no?
posted by aspo at 9:16 AM on October 20, 2005

Well, why not forward the junk mail to another account and then delete it with a rule? Then set up that other account in to receive the junk. You'll never see it on the PDA.
posted by Mo Nickels at 9:20 AM on October 20, 2005

Response by poster: Aspo, that moves the message but also leaves it on the server, just as the Junk Mail filter does.

Mo Nickels, that looks like it might be one of two good options, the other being to write an Applescript to do it as Kindall suggested.

It's surprising that this isn't much easier within the normal rules and interface though.
posted by mikel at 9:37 AM on October 20, 2005

The thing that kills me about -- and stops me from using it -- is that it lacks a "Delete all mail marked as junk in folder" option, which is what keeps me married to Thunderbird. Once I've flagged all the junk, I can delete it in one swoop. It's actually a better solution than teaching's clunky smart filter to recognize things; Thunderbird only misses a couple of quickly-clicked items per mailbox-check anyway.
posted by logovisual at 11:30 AM on October 20, 2005

I don't entirely get the question, but I was ready to give Mail up for Thunderbird until I found JunkMatcher. Not sure if it will help.
posted by yerfatma at 12:12 PM on October 20, 2005

Surely what you're going to need is one of those spam-killing solutions that works as a proxy mail server between you and the various clients you're using?

So rather than actually getting the mail from you set the proxy up to get the mail from, program it to do what you want, and then fetch the mail from
posted by AmbroseChapel at 1:26 PM on October 20, 2005

An easy answer might be to change from POP to IMAP... I keep my powerbook running with all the rules. No matter where I am, my mail is filtered/synched/etc. IMAP 4 lyfe!! =)
posted by mmdei at 12:46 AM on October 21, 2005

« Older Snowblower Advice Needed!   |   desktop blogging soiftware Newer »
This thread is closed to new comments.