SpamSieve Rules in Apple Mail 7

I have replicated my SpamSieve/Apple Mail setup from OS 10.6.8 in 10.9. I am using SS 2.9.10. I use three rules slightly modified from the SS manual…

SpamSieve [Score] / Every Message / Move Message to mailbox SpamSieve
SpamSieve [Blue] [Gray] [Purple] [Red] / Every Message / Move Message to mailbox Trash
SpamSieve [Spam] / Every Message / Move Message to mailbox SpamSieve

I run these rules on all messages that appear in a Smart Mailbox I created in Apple Mail that displays the contents of several IMAP spam folders (two Google accounts, one AOL account, and several accounts I run on a MediaTemple server).

These rules now result in spam messages being colored via score as desired, but none are moved into the Trash or to my SpamSieve folder (a folder I created on my Mac). Any thoughts on how I can get the whole desired behavior back with the spammy messages moved to Trash and the less spammy ones to the local folder?

Thank you!

I employ a set of Apple Mail rules for SpamSieve (2.9.10) that are slightly modified from ones that appear in the SS manual…

SpamSieve [Score] / Every Message / Move Message to mailbox SpamSieve
SpamSieve [Blue] [Gray] [Purple] [Red] / Every Message / Move Message to mailbox Trash
SpamSieve [Spam] / Every Message / Move Message to mailbox SpamSieve

I have a Smart Mailbox that displays all messages appearing in Spam folders on a number of IMAP servers (two Gmail, one AOL, and several I manage on MediaTemple servers). I select all messages in the Smart Mailbox and then choose ‘Apply Rules’ from the Message menu via keystroke. This process worked fine in my previous setup in OS 10.6.8. After upgrading to OS 10.9, the rules do not complete all actions. Messages are colored according to the score by the first rule, but none of the messages are moved to Trash or SpamSieve (a mailbox I created on my Mac).

Any thoughts on how I can get this working properly again?

Thank you!

Does the problem also occur for newly received messages, or only when you manually apply the rules?

I have done some further testing. The rules are working when I apply them to messages displayed in an actual IMAP folder (Inbox and Spam). The move rules do not work when I apply them to messages displayed in my Smart Mailbox, although messages are colored by spam score. The move rules worked with Smart Mailboxes in Snow Leopard (I leapfrogged Lion to Mavericks).

Interestingly, I have noted that when I apply the SpamSieve rules. Mail instantly marks the message as Junk even though I have the Apple Junk filter disabled.

I have no other rules enabled at this time. I have two additional plug-ins enabled, Mail Tags and Mail Act-On.

Thanks for the follow-up. That’s strange that Mail applies the rules to the same messages differently depending how you are displaying the messages. For this particular case, I don’t think you necessarily need to use a rule. Perhaps an AppleScript would work more reliably? For example, this script could be modified to move the messages to the trash depending on their score.

That’s normalon Mavericks.

I believe I would like to try this script. Can you explain how it needs to be modified to work? Or, perhaps you will have other advice after reading this update on my situation…

I am applying SpamSieve rules to messages that appear in IMAP Spam folders by using the Apply Inbox Rules from the Messages menu. I have one account in particular that pulls in several hundred spam messages per day. The mail server is on MediaTemple. I find that I save 2 or 3 messages a week by filtering the spam locally with SpamSieve. It’s a small yield, but I’d like to keep doing it.

After updating to Mavericks, this process no longer works properly. I run the SpamSieve rules via Apply Inbox Rules; the messages seem to be graded and moved out of the IMAP spam folder, but then they reappear. It’s a bit of a mess, really, because it seems some messages reappear and others don’t. It seems some reappearing messages have spamminess colors intact and others do not. I currently have emails in there that are as old as December 18 that have had the filtering process applied over and over again.

I should probably mention that the other plugins I use are MailTags and Mail Act-On.

Thank you for any help you can give!

It sounds like the Apple Mail - Server Junk Mailbox script is what you’re looking for.

I tested this on my Mac with Mavericks, and manually applying the rules worked normally. So I would suggest temporarily uninstalling your other Mail plug-ins to see whether that makes a difference.

That script is working very well, thank you!

Would it be possible to run that script along with the SpamSieve Rules:

SpamSieve [Score] / Every Message / Move Message to mailbox SpamSieve
SpamSieve [Blue] [Gray] [Purple] [Red] / Every Message / Move Message to mailbox Trash
SpamSieve [Spam] / Every Message / Move Message to mailbox SpamSieve

I would love to have one automated process that processed server Spam/Junk folders and moved the messages to a unified Spam folder or directly to the Trash based on the spam score. Does that make sense?

Thank you!

Currently, the script for processing messages caught by the server junk filter does not know how to separate the messages by score. However, that is a feature that I would like to add.

That would be great! Thank you for making SpamSieve, it’s killer!

ORIGINAL MESSAGE UPDATED

I am happy with the performance of the Apple Mail - Server Junk Mailbox script. Thank you! Now I am trying to sort out the behavior of my other SpamSieve rules.

All spam now ends up in a local folder called SpamSieve. I select any number of messages and initiate Apply Inbox Rules via keystrokes, and all messages are colored for spamminess and COPIED to the Trash. COPIES OF THE COLORED SPAM EMAILS REMAIN IN THE LOCAL SPAMSIEVE FOLDER.

I have deleted all rules except for SpamSieve rules, so this is the sequence of Inbox Rules…

Server Junk Mailbox SpamSieve / Every Message / Run AppleScript apple-mail-server-junk-mailbox
SpamSieve [Score] / Every Message / Move Message to mailbox SpamSieve
SpamSieve [Blue] [Gray] [Purple] [Red] / Every Message / Move Message to mailbox Trash
SpamSieve [Spam] / Every Message / Move Message to mailbox SpamSieve

Hope that makes sense. Thank you!

If, indeed, your rules all say “Move” rather than “Copy” it sounds like Mail is malfunctioning if you are ending up with copies. It might help to rebuild Mail’s database.

None of my rules said “Move” rather than “Copy”, but it seemed that the way the Moves were structured may have been causing problems. I have rewritten rules and things are now working properly. I am happy. I would like to ask what you think of my logic, though. I now have four rules…

Server Junk Mailbox SpamSieve / Every Message / Run AppleScript apple-mail-server-junk-mailbox (moves everything in several server Spam folders to a single server folder)
SpamSieve [Score] / Every Message / Move Message to mailbox SpamSieve (folder On My Mac)
SpamSieve [Blue] [Gray] [Purple] [Red] / Every Message / Move Message to mailbox Trash (on server)
SpamSieve [Spam] / Every Message / Move Message to mailbox SpamSieve (same folder On My Mac as rule 2)

Is rule 4 redundant? Do you see any problems in that rule structure?

Thank you!

It looks OK to me. Rule 4 is not redundant; it catches the colors not matched by rule 3.