C-Command Software Forum

Marking spam as read

I using SpamSieve 2.9.5 with Mail 6.2 and OS X 10.8.2.

The SpamSieve entry in the Mail rules includes “Mark as read.”

It’s not marking items in the spam folder as read.

This is new behavior.

Have you verified that the messages in question were moved to that mailbox by the SpamSieve rule (and not for some other reason)? For example, does SpamSieve’s log say that they were predicted to be spam?

Marking messages as read is a built-in feature of Mail, not anything that SpamSieve does, so if in fact the rule is being applied but isn’t working, there might be a problem with Mail’s database. You could try rebuilding it.

Why only particular messages?
If SpamSieve Log.log shows a message, I assume that it has definitely been through the rules in the SpamSieve Rule in Mail. I am trying to determine why I am still getting messages into my Spam Mailbox, that are listed in the SpamSieve Log.log, but are still not marked as “Read”.

The first item in my Rules list is “Junk Mailbox SpamSieve” as the first item. It has not been modified.
The second item is “SpamSieve”. I have added two addition actions: “Mark as Read” and “Send Notification”.

While writing this post, I got a message that followed those Rules completely. It went to the Spam Mailbox, was marked as Red and I got a System Notification. Great.

However, when I started Mail just a minute ago, I ended up with seven new messages, including five Spams (scores: 4@95, 1@96). The last message (in the .log) was not marked as Read (scored 95, BTW).

At first, I thought the “Junk Mailbox SpamSieve” AppleScript might be sending messages to the Spam Mailbox, skipping the regular SpamSieve rule. However, would that AppleScript still record to the .log file?

The only thing I see in the short log file (which I have saved) that looks ‘strange’ is that the scanning started at 17:51:07 and progressed fairly quickly until the last message. Here are the times:
Start Time: 17:51:07 +0000

  1. Good_ ( 1): 17:51:19
    +0000 1. Spam (95): 17:51:20
    +0000 1. Spam (96): 17:51:22
    +0000 1. Good_ ( 1): 17:51:22
    +0000 1. Spam (95): 17:51:23
    +0000 1. Spam (95): 17:51:25
    +0000 1. Spam (95): 17:56
    :06 +0000

Is that extra time significant? The plain text message was within a few bytes of two others and several hundred less than two others.

Any thoughts? :slight_smile:

The Apple Mail - Server Junk Mailbox script moves message to the Spam mailbox and does not mark them as read.


Probably not.

So, being the lazy type, I’ll simply add the “Mark as Read” rule to that! Now, to wait for some Spam…

Mean while, I’ll compare two of the Spams and see how the log file might differentiate them so I can tell which Rule sent them to the Spam Mailbox. Nothing obvious to me. DDEdit shows the differences, but nothing that sows how which one of the Rules sent the message to Spam. Oh well…

Thanks, again, for your always prompt and helpful responses (even on a weekend!)!! :wink:

That won’t work. It will make the rule mark every message arriving in the inbox as read. And the messages in the server Spam mailbox that the script is processing aren’t the target of the rule’s actions, so they’ll still be unread.

I’ve updated the script with an option at the top to mark the spam messages as read.

The log doesn’t currently record that, though it’s a feature I’d like to add.

You’re exactly correct! :wink: Fortunately, this is a slow time for messages, only three good ones came in, so it was easy to see the new ones.

Done and done. Only way this service could be better would be for you to put in my account names for me! LOL!

Thanks, again! Now, what can I get you for Christmas? :wink:

2014-12-15: Just a confirmation that your new ‘junk’ AS is working fine! I changed the property “markSpamMessagesRead” to true and I now have absolutely no unread messages in the Spam mailbox, no matter which of your Rules sent them!! :thumbup: