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

Bypass the trash when deleting messages in Mail Apps
This tip will be especially useful for anyone using SpamSieve together with Mail. After disabling Mail's Junk Mail Filtering to let SpamSieve do its magic, you can no longer 'Erase Junk Mail' to immediately delete your accumulated spam. Unfortunately, whenever you delete messages from your 'Spam' folder, they get moved to your Trash mailbox. If you're like me, you'd rather just delete this garbage immediately. To do so, select the messages in your Spam folder and choose Edit -> Cut (or just hit Command-X). The net effect is that the messages are deleted immediately. Enjoy your spam-free Trash! (This has only been verified using Mail 1.3.4 under 10.3.3.)
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[7,217 views]  

Bypass the trash when deleting messages in Mail | 9 comments | Create New Account
Click here to return to the 'Bypass the trash when deleting messages in Mail' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Bypass the trash when deleting messages in Mail
Authored by: uurf on Apr 06, '04 12:46:01PM

You can empty the Junk Mail folder directly with the key command:
command - option - j

This command is located under the Mailbox menu as well: Erase Junk Mail (right after Erase Deleted Massages).



[ Reply to This | # ]
Bypass the trash when deleting messages in Mail
Authored by: Big Blue Canuck on Apr 06, '04 06:45:22PM

Is there an Applescript or something to get rid of the garbage from the spam folder? I hate getting my spam folder built up and having to manually delete the messages in there. Also I can't get mail to delete the messages on the server after I get them even though I have it set to to delete them in the advanced section of mail.



[ Reply to This | # ]
Bypass the trash when deleting messages in Mail
Authored by: rhowell on Apr 07, '04 12:11:25PM

The feature "Remove messages from server..." has been broken for me on all releases of Panther. Numerous feedbacks to Apple haven't seemed to help. This worked great in Jaguar, allowing me to keep my local inbox synced with my POP inbox, which is ideal if one travels a lot. My setting is "Remove messages from server: When moved from Inbox" (ie moving a message to the trash folder).



[ Reply to This | # ]
Bypass the trash when deleting messages in Mail
Authored by: Gigacorpse on Apr 06, '04 01:20:56PM

Wouldn't the Cut command keep the spam messages in memory until something else was put into the clipboard or Mail was quit? After all, Mail has to be ready in case a paste command is issued.



[ Reply to This | # ]
Bypass the trash when deleting messages in Mail
Authored by: aranor on Apr 06, '04 01:32:01PM

awww, I was hoping for a way to do this for stuff like deleting 2000 messages at once! I let my mailboxes fill up with a lot of cruft and when I want to clear them out I have to delete thousands of messages twice (once from the mailbox, once from the Trash folder). This takes a while. However, cutting will still keep it all in memory. While this is probably better than deleting it twice, it's still not as good as I hoped.



[ Reply to This | # ]
Why not just...
Authored by: rhowell on Apr 06, '04 03:29:37PM

...Erase deleted messages when: Quitting Mail.



[ Reply to This | # ]
Bypass the trash when deleting messages in Mail
Authored by: rgray on Apr 06, '04 07:37:17PM
According to Ben Han's JunkMatcher pages you should not have to disable the Mail junk system. Apparently the Mail Junk system is provoked into action when the "Message is junk mail" condition is evaluated. Just move the built in Junk filter up as he has done with his Built-in Junk Filter (step 3, about midway down the page). Then you can set up SpamSieve to use the Junk box with attendant deletion properties. As a bonus, the automatic Mail Junk filter might learn something.

Ben's junkMatcher pages have been interesting reading as he has explored the Mail.app junk system and developed regular expression filtering.

[ Reply to This | # ]

Bypass the trash when deleting messages in Mail
Authored by: jbaugh on Apr 07, '04 10:47:05AM

"Then you can set up SpamSieve to use the Junk box with attendant deletion properties."

Excuse my ignorance, but how do you do this?
John



[ Reply to This | # ]
Applescript to delete Spam
Authored by: stormy on Apr 07, '04 07:32:13AM

Just a couple days ago, I wrote my very first Applescript just to empty spam mailboxes.

Besides using SpamSieve, I also use SpamAssasin on the server (and IMAP accounts), so all my "Spam" folders quickly get filled up with junk.

My script checks for messages on every "SPAM" mailbox" of every account and deletes them. Then checks for messages on the "Spam" mailbox "In my Mac" and deletes them. Lastly, it empties the Trash by performing the keyboard shortcut (I searched the whole Mail dictionary and couldn't find an "empty trash" command).

I'm sure the code could be greatly improved, so I welcome your suggestions!



try
	tell application "Mail"
		activate
		-- delete messages from spam mailboxes
		set theAccounts to every account
		repeat with theAccount in theAccounts
			if exists messages in mailbox "SPAM" of theAccount then
				delete messages of mailbox "SPAM" of theAccount
			end if
		end repeat
		
		if exists messages in mailbox "Spam" then
			delete messages of mailbox "Spam"
		end if
		
	end tell
	delay 3
	-- empty trash for all accounts
	tell application "System Events"
		tell process "Mail"
			set frontmost to true
		end tell
		keystroke "k" using command down
		keystroke return
	end tell
end try


[ Reply to This | # ]