C-Command Software Forum

Moving certain spam emails automatically to trash

SpamSieve works great and now I would like to mark certain messages so that they go straight to trash (skipping the Junk folder). Is there a way to do this?

I tried installing an AppleScript (Apple Mail - Block Sender) I found on this site but it’s not clear how to execute it from within Mail or if that’s its intended purpose.

Please advise.

Lee

If you click the Installation Instructions link on the script page, it tells you how to run the script from a global menu while you’re in Mail.

If you set up your rules as shown in Example 1 here and you then train a message as spam or use Block Sender on it, future messages from that sender will go directly to the trash.

Michael,

Thanks for the quick response! My goal is to have selected emails automatically move to trash and skip the junk mail folder. It’s for my work account and filtering is about 99% accurate but I can’t have even one email moved to trash because of the 1% (maybe even .1%) so I end up reviewing all ~100+ emails a day in my junk email folder. Many are from the same companies over and over…

So my goal is to mark (via SpamSieve TrainSpam or Block Contact in Apple Mail) emails that should automatically go to Trash. Even though we use Exchange at work, I access them via Apple Mail.

A couple of questions:

  1. I’m assuming that if I use the Mail option of “Block Contact” when clicking on a spam email “From” dropdown on Apple Mail that this has no impact on SpamSieve? I’ve tried this (and turned on send to trash in Mail Preferences) but it seems to be hit or miss.

  2. I placed the AppleScript script, Apple Mail - Block Sender, in the local library as described (subject to user error) and turned on Show Script in menu bar -> Show computer scripts ->show application scripts at top. But I don’t see a menu item in mail. I must be doing something (very basically wrong… don’t know what.

But if I can just add emails to TrainSpam and they would be automatically sent to trash, that would be great.

I read the steps for Example 1 but it looks like it will block and send to trash really spammy messages but not specifically the ones I have personally marked.

Thanks again for a great product…

Any advice is appreciated.

Lee

The manual recommends unchecking Mail’s Enable blocked mail filtering option. This is because it can be hard to know when to train a SpamSieve mistake if Mail has already deleted the message.

Did you enable the Script menu from the Script Editor preferences, as described here? Do you see the Script menu at the top-right of the screen?

I do see it now. Sorry… expected it on the left. I also turned off “blocked mail filtering”.

So I just run the script on a message and SpamSieve will automatically send it to trash the next time?

Thanks for your help.

Lee

Right. This is only for messages that SpamSieve already caught as spam. If the message was not caught, you should instead use “Train as Spam” to make sure SpamSieve knows it’s spam.

I’m not seeing the behavior that I had hoped (selected and marked spam email going directly to trash). SpamSieve is working perfectly in every other aspect.

Current setup:

  • SpamSieve installed, rules setup for Exchange. I’m using latest Apple OS/Mail Client.
  • A couple of options set including color spam messages. Works great.
  • “Apple Mail - Block Sender.scpt” installed in ~Library/Scripts/Applications/Mail
  • Show Script in Menu Bar checked and the above scripts shows up in the list when I’m in Mail.

Process:

  • When a spam email comes in I select the Messages - Train as Spam if it is a false negative
  • Once the email is in the Junk folder, I highlight a message and then click on the “Apple Mail - Block Sender” script.

What I thought would happen is that the next email from the same address would just go directly to trash. However, it still just goes to the Junk folder.

My test from an infrequently used gmail account:

  • Send message to my Exchange account.
  • It arrives in my inbox, I use the Message - Train as Spam option. SpamSieve moves the message to the Junk folder.
  • I send another message to my Exchange account and SpamSieve correctly moves the message to my Junk folder and colors it dark blue. So far, so good…
  • I then highlight the message in my Junk folder and click the “Apple Mail - Block Sender” script.
  • I send a third message to my Exchange account, expecting the message to go directly to the trash. It doesn’t. The message is moved to the Junk folder and colored dark blue.

Are my expectations that the script will mark messages once in the junk folder and subsequently send them to trash? I didn’t modify the script in any way, should I have changed something in the script? Is there there a way to confirm which messages are marked as go directly to trash?

Any help or advice appreciated.

Lee

PS Also saw Toothfairy on your site and purchased it through the App Store. Works great (and I rated it five stars). Just what I needed now that my office is teleworking.

If you’ve already trained the message as spam, it’s not necessary to use Block Sender, too. Block Sender is only for messages that were automatically caught as spam, just not at the highest level (not blue).

Yes, that’s what should happen if you set up the special color rules:

  • SpamSieve [Score]
  • SpamSieve [Blue]
  • SpamSieve [Spam]

instead of the regular SpamSieve rule.

I do not recommend training test messages for yourself as spam. That will mess up the rules and corpus.

The ones colored blue should be going to the trash. They will also say in the log that they were caught by the blocklist.

Thanks!