SS 2.x issue - migrated to new computer

I migrated from an old 2010 iMac to a new 2023 iMac. And I caused a BIG issue with SPAM.

With the older SpamSieve 2.x the SPAM went into a On My Mac “SPAM” folder. That folder never got Trash’d (big ugh!) and there are more than 10,000 SPAM messages in that folder.

Many of the messages are white (no color background) and most have colors assigned (yellow, blue, grey, etc). To the right of the Subject I see an icon that looks similar to a trash can with an “x” in the middle of the trash.

This is not a good example (no color background) but it is all I have at the moment:
Screen Shot 2024-02-04 at 5.28.37 PM

I have not installed the new SpamSieve 3.x.

And here is the big mess…

How can I delete the yellow, blue, gray, etc SPAM messages (with the Trash icon) from the SMAP folder and NOT delete the white (no color background) messages?

The white (no color background) messages seem to be good messages that do not belong in the SPAM folder.

I recommend updating to SpamSieve 3 before updating to macOS 14 Sonoma, if possible. Otherwise, Mail may move good messages to the Junk/Spam mailbox without consulting SpamSieve. SpamSieve 2 will try to prevent this, but it may not have the privacy access that it needs in order to do so. Also, people often manually override SpamSieve’s protections for this, which will cause problems.

The icon in your screenshot is the junk icon. I suspect that you see this on both the white and colored messages, so it is not useful for distinguishing them.

The bottom line is that the messages with white backgrounds were not moved by SpamSieve. Mail does not have a built-in way to separate messages by color. You can, however, use an AppleScript like this:

tell application "Mail"
    set _messages to selected messages of message viewer 1
    repeat with _message in _messages
        if background color of _message is not none then
            delete _message
        end if
    end repeat
end tell

If you select some messages and run the script (e.g. by pasting it into the Script Editor app and clicking Run) it will move the colored ones to the trash.

1 Like

Thank you! This is perfect!

This is exactly what happened! When I did the Apple Migration Assistant I did not realize SpamSieve did not migrate from old 2010 iMac to a new iMac. And the Apple Mail rule did migrate.

I had so many other Mac migration issues I forgot all about SpamSieve. And bad happened. So I am cleaning up a big mess. This is on me for not paying attention!

Thanks for helping me clean! You are the BEST!

I kept getting errors so I added a small delay. After this no more errors!

tell application "Mail"
    set _messages to selected messages of message viewer 1
    repeat with _message in _messages
        if background color of _message is not none then
            delete _message
            delay 0.2
        end if
    end repeat
end tell

Above was the smallest delay I tried…

@Michael_Tsai

OK - I deleted 6000 color messages with the above AppleScript. Excellent!

Now that the script removed 6000 messages, I see I have white background messages, with the Junk icon, that are SPAM.

And I have white background messages, without the Junk icon, that are GOOD.

Is there a way to delete only the Junk icon messages? and leave the messages without the Junk icon?

You could try something like this:

tell application "Mail"
    set _messages to selected messages of message viewer 1
    repeat with _message in _messages
        if junk mail status of _message is true then
            delete _message
            delay 0.2
        end if
    end repeat
end tell

though I’m not 100% sure if would go by the way the messages are currently marked as junk vs. having Mail’s junk filter reevaluate them. You might prefer to use SpamSieve’s Filter Messages command.

I have not install SS 3.0 (yet). I wanted to clean up my mess first.

Are you referring to Apple Mail Junk Filter? If yes, this is what I wanted to do originally but I could not find a way to do this.

Right now everything is in the On my Mac > SPAM folder. How do I have Apple Mail Junk Filter re-evaluate?

In that case, you could have SpamSieve re-evaluate using the Message ‣ Apply Rules command.

Yes. You could either use the script that I posted or create rule that uses Mail’s junk filter and apply it.

As of this moment there is no SS 2.x or SS 3.x. That was part of my screw-up when migrating to the new iMac 2023.

Hmmm - Something isn’t right. I need to read, learn & experiment!

Thank you!

The 2nd script worked great! Thank you.

Sorry for dragging this on for so long. I do appreciate your help!

After getting the total SPAM folder messages down to a manageable level, I finally installed SpamSieve 3.x (using the Mail extension and not the Mail plug-in)

I picked 600 spam looking messages and did “Train as SPAM”. As SS processes the 600 it seems a bit slow. It takes 2-3 seconds per message.

Is this normal for an ARM iMac?

Should I have turned off one of the “Train Modes” when doing this?

That seems unusually slow. Perhaps Mail was not saving local copies of the message data. Please go to Mail ‣ Settings ‣ Accounts ‣ Account Information and set Download Attachments to All for each account. If the problem continues, you could record a “sample” report from both Mail and SpamSieve during the training.

No.

1 Like