Osacript Not Responding

is this the same issue? I can get everything to work well, but Apple Mail hangs every few minutes while running a script. Activity monitor reports:

“oascript not responding” and I can identify this script working through Apple Mail. I can’t type or do anything in Mail until it releases, generally a minute or two.

I moved this to a new thread because it sounds like a different issue, possibly not related to SpamSieve. Which script are you running? Have you tried recording a sample report of Mail?


Thanks for replying. Right now, the Apple Mail Rules list shows as checked:

 Server Junk Mailbox SpamSieve 
 News from Apple

I’ve afraid that doesn’t answer either of my questions. Please explain which script you mean when you say “I can identify this script working through Apple Mail.” How are you invoking the script?

Secondly, when Mail is hung, please record a sample report from Mail.

I am still encountering massive email slowdowns with Spam Sieve. Apple Mail shows these absurd incoming message reports (currently showing 17166 of 17194 incoming messages). I’m guessing something is happening like moving mail from the junk mail folder to the spam folder is prompting Apple Mail to redownload ALL my mail and reindex everything.

When I look at activity monitor, two processes show up as “not responding”:

Mail (of course)


I think the second must be one of the two SpamSieve scripts that are being run.

I’ve tried to change the behavior of my email accounts (I have four of them) by unchecking this behavior: “Store junk mail on server” but that seems to completely undermine the whole reason for SpamSieve.

I have sampled the processes again and have included them here, but i suspect the response will be that the system is hanging while Mail is polling my server. I get that, but is there any way around this?

Sample of Mail.txt (105 KB)

Sample of osascript.txt (32.8 KB)

You posted this in a different thread, but it doesn’t seem to belong there, so I moved it here.

Are you seeing that in the main Mail window or in the separate Activity window?

osascript is not used by SpamSieve proper on Mac OS X 10.9. It’s probably from the Apple Mail - Server Junk Mailbox script that you are using. Please make sure that you are using the latest (August 29, 2014 as of this writing) version of that script.

Secondly, the script will be a lot slower if you have messages in the server Junk mailbox that are deleted but not expunged. Perhaps you can expunge any unwanted messages by logging into Web mail.


AHA! Now we may be getting somewhere.

My “general” GMAIL account had just 30 or so emails in the Spam folder.

But my College’s GMAIL account had over 1500!

So that may be the solution. I may be able to address this with my College, but any idea why one account would apparently accumulate (not delete) the spam while the other would maintain them?

The flow into the College account is a LOT higher, like 100+ a day.

No. I would think that two accounts with the same provider would behave the same way.

I’m trying to sequentially add accounts to the script to see if I can isolate the account causing the trouble.

I think it’s not that the messages are treated differently, its just that the flow into one of the accounts is so heavy (100-150 a day) that combined with the standard (and apparently impossible to reset) Google mail 30 day retention of messages in the Spam folder, this folder quickly becomes huge. After 30 days for example it will have 30,000 emails in it, even though SpamSieve has processed and identified as spam 95% or more of them.

If SpamSieve really re-processes that folder every time, that would be a source of the slow down.

Are you saying that Gmail retains the spam in its Spam mailbox even though the script moves the processed spams to the Spam mailbox “On My Mac”?