Deleting Future Spam
Posted December 10th, 2003 @ 05:27pm by Erik J. Barzeski
A lot of the spam I receive comes from the future. I presume that this is because most people sort their email by date, and by sending email from 2016, spammers believe they'll stay higher in a person's list.
SpamSieve grabs all of my email and shoves it into folder I've named "* Shit" (to sort it where I'd like it), but mail from 2016 hinders my ability to scan the last 100 messages for false positives. So, I wrote an AppleScript and I now run it once an hour. Here's the script:
on run tell application "Microsoft Entourage" set msgList to (every incoming message of ¬ folder "* Shit" whose time sent > ¬ ( (current date) + 6 * hours) ) repeat with theMsg in msgList -- if theMsg is not flagged then move theMsg to deleted mail folder delete theMsg -- end if end repeat end tell end run
There you have it. Now I don't even have to look at spam from the future.
Posted 10 Dec 2003 at 10:43pm #
Why not just delete anything that's after today or tomorrow's date? Even anything that's from now()+6m would do I'd think.
Posted 11 Dec 2003 at 4:26pm #
Click here to open the AppleScript in a new Script Editor window.
Posted 12 Dec 2003 at 12:12am #
Keep in mind that you also run the risk of matching mail from people who simply have their computer's clock set incorrectly. Also, I don't know how Entourage handles mail from other time zones but that could be an issue if they're more than 6 time zones away.