Spam filtering delay

The new Extension takes over 1 minute to filter the in box and transfer the Spam out.

The old plug-in did this as the mail came in, but now, I have to view dozens of spam emails in the IN box before Spam Sieve moves them where they should be.

This is not an improvement.

To be clear, the Mail extension filters messages immediately, just like the plug-in. The issue is that in some cases Mail fails to send new messages to the extension, so we offer the Filter spam messages in other mailboxes workaround, which checks the inbox every n seconds. The default is 60 seconds, but you can set it to a lower number so that it checks more frequently. You can also speed up the checks by archiving older messages out of the mailboxes that are selected for filtering.

While I’m investigating ways to optimize the inbox scanning, there is another way you could set things up in order to get immediately filtering. You can set up a Mail rule that filters incoming messages with SpamSieve via AppleScript. To set this up:

  1. Choose Settings… from the Mail menu and click the Rules button in the toolbar.
  2. Click the Add Rule button.
  3. Change the description to Move If SpamSieve Spam.
  4. Change the From pop-op menu to say Every Message.
  5. Change the Move Message pop-up menu to say Run AppleScript.
  6. Next to Run AppleScript, change the No Script Selected pop-up menu to say Move If SpamSieve Spam. (The script should be pre-installed if you had been using SpamSieve 2. It’s also available for download here.)
  7. Now click OK to close the rule and save your changes. Mail may ask if you want to apply the rule; click Don’t Apply.
  8. Make sure that the Training settings are set to use the the Junk mailbox.

Note that, unlike with the old plug-in based SpamSieve rule, with the script rule Mail will keep applying the rest of the rules even if the rule marks a message as spam. So it effectively acts last, and you may want to put it at the bottom of the rule list for efficiency and to make this clear. However, I doubt this would really be a problem in your situation because you wanted a way to filter messages that were left in the inbox, anyway.

I’m seeing a delay too, but much worse than the OP. For example, a log entry shows an email received at 3:30 PM today, but it wasn’t logged until 4:12 PM. SpamSieve 3 seems to be using a lot of CPU but only occasionally do I see mail files being processed automatically. I’m using an M1 iMac so it’s not old hardware, MacOS Sonoma.

Training works ok, it happens right away. I’m also set up as a mail drone using the Remote Training script; this is working but it may take awhile to actually process the TrainSpam/Good folders. Normally I don’t care about the speed of those because the act of moving them on the non-drone device (iPhone, iPad, MacBook) gets them out of the way. Unfortunately I wind up moving things I thought I trained, and it’s because the drone is not processing them automatically in a timely manner.

I suspect my long history with SpamSieve and my bad packrat habits are a factor. I’m set up with 8 active IMAP email accounts that currently have 60,000 total emails. My corpus contains over 2.5 MILLION words. I think I’ve been using this since 2006.

I’ve implemented the aforementioned workaround and it doesn’t seem to help. To be fair, practically any time I’ve tried to use Apple Mail’s Rule with an Every Message trigger, it has not worked as I expected.

Open to suggestions (besides the obvious “clean up your house” nag).

I’m working on ways to have SpamSieve figure out which mailboxes are causing delays, but for now you could leave the Settings window open, and next to the Filter Now button it will tell you which mailbox is currently being processed (if any). Perhaps that will provide some clues.

If you are using the drone triggered by an Apple Mail rule (vs. a separate helper app) it processes messages when you receive a new message in your inbox, so not necessarily on a fixed schedule.

For Filter spam messages in other mailboxes, what matters is the total number of messages in the mailboxes that you’ve selected for filtering. If there’s a particular mailbox with lots of old messages, it can really help to move them to another mailbox that’s not selected for filtering.

I have actually never heard that before, so maybe there is indeed something unusual about your Mail setup/data store.

Well, as I said I am using 8 accounts, each with their own INBOX. So the indicator you refer to always says “INBOX”. I can’t tell which account it’s working on. But I think I can guess…

I was going to ask about the colored text in the entries in the selection dialog that opens when I use “Select Mailboxes to Filter…” but it is evident to me now that that indicates (warns) about # of messages in the mailbox. I’ve got 2 that are red and 2 that are yellow. I guess I need to move more messages out of those to slim them down. The downside of that is that the moved messages are unavailable for search or review on the non-drones, e.g iPhone. I can only find them on the drone Mac where they are “On My Mac”.

I’m pretty sure my triggering issues are also being caused (or at least confounded) by SS3 meandering thru these large inboxes. How important is marking mail “read”? Does that take them out of consideration next cycle? I’ve never really relied much on the unread markers, maybe I should.

If you hover the cursor over the mailbox name, in the tooltip it will show the account name and the full path to the mailbox.

You can just move them to another server mailbox that’s not selected for filtering. Then they would still be available everywhere.

Not very important. It’s mostly the total number of messages in the mailbox that matters.

So THAT’S what those Archive mailboxes are for!!!

TBH I had only ever dealt with one on GMail. GMail seems to do everything weird, with tags and search reliance… Making things Archive without my doing anything… So I avoided Archive whenever possible.

I hadn’t even noticed most all IMAP mailboxes automatically come with an Archive, and it’s trivial to create if they don’t, and Apple Mail recognizes it.

Duh.

I’ve moved all previous year’s emails to their respective Archive. Watching the next few SS3 cycles.

Yes, I mean any mailbox will do, but Archive is nice that Apple provides a built-in menu command and keyboard shortcut for moving messages there.

This is much faster in SpamSieve 3.0.2b1, especially if you set SpamSieve to check for new messages every 5 seconds or so. If you had set up a script rule, you can remove it.