C-Command Software Forum

SpamSieve v2.8.4 and Office 2011: error with Set Category

Running Office 2011 Mac OS X and SpamSieve v 2.8.4 I get the following error:

Rule “SpameSieve - Set Category” could not be successfully executed. An unknown error has occurred in Outlook.

Has this error always occurred or just recently? Does it happen for every message or just some?

It might help to rebuild Outlook’s database by holding down the Command and Option keys when you launch it.

It looks like it’s for every message, the outlook errorlog is full.

I installed Office 2011 yesterday and added SpameSieve today, so this is a “clean” install. I have 3 mail accounts, one exchange and 2 imap. (it fails on both exchange and imap). I’ll disable one of the imap but it didn’t help. Please PM me if you want the source of one of the emails that failed.

Did you try rebuilding the Outlook database?

What happens if you select a message in Outlook, then open the attached file in AppleScript Editor and click Run?

I did not rebuild the outlook database, I’ll have to wait until tomorrow to do that, I’m traveling and surfing over 3G. I’ll get back to you after I’ve rebuilt the database and have run you test script.

Thank you for your excellent support.

Ran rebuild outlook database (by holding down the command and option keys when launching outlook). SpamSieve acted fine until I did a Apply All Rules on the account (8000+ email), at the end of the run the set category error started to appear.

Running the Test Set Category script doesn’t produce any results/errors
replies shows that it has parsed the email:
tell application “SpamSieve”
lookup current application keys {“Border”, “OutlookUncertainJunk”} default values {75, true} given «class Krtn»:{“gUncertainThreshold”, “gUncertainJunk”}
–> {75, true}
end tell
tell application “Microsoft Outlook”
get current messages
–> {incoming message id 32924}
get source of incoming message id 32924

//I’ve removed the rest of the content - pm me if you need it

end tell

If it works in AppleScript Editor but not in Outlook, that’s probably something you would need to ask Microsoft about. However, just to be sure there isn’t something else going on here, could you post a screenshot of your Set Category rule?

Exchange Set Category rule: http://screencast.com/t/UHE6FMW01vDG
IMAP Set Category: http://screencast.com/t/Cy2vl6Z4o

The rules look correct to me. Could you clarify when the error occurs? At one point you said that it was for every message, but later you seemed to say it was only towards the end of a multi-thousand message batch. (And for the test script you get no errors?)

Any resolution to this? I’m seeing the same issue.

SpamSieve 2.8.4
Outlook 14.0.1
OSX 10.6.4 (haven’t put 10.6.5 on yet)

The test script above runs just fine, but the Set Category script just won’t run within Outlook.

I reinstalled scripts, etc. and tried the usual workarounds.

Please list, specifically, which things you are seeing that are the same. This may help us track down the cause of the problem.

Does “doesn’t run” refer to:

  1. When Outlook applies the rule automatically?
  2. When you manually ask Outlook to apply the rule?
  3. When you choose the script from Outlook’s script menu?

What happens when it “doesn’t run”?

Outlook loads correctly without errors and is able to sync to all accounts without issues.

When a new email is received, the Set Category rule correctly fires and begins to process the Set Category script.

An error then appears in the error log:

While processing message “{subject here}” (ID 20001), the rule “SpamSieve - Set Category” could not be successfully executed. An unknown error has occurred in Outlook.

If I manually run the Set Category rule on one or more messages (via Apply Rules), I will see the same results … an error appears in the error log for the Set Category message.

If I manually change the category of a message to Junk or Uncertain Junk, the Move Messages script works correctly (whether fired manually or via rules), so that script seems to be fine.

If I go to the Script menu and choose Set Category, the rule does not generate an error – but the category is not set either. So in that case it’s as if it didn’t run at all.

If I run your test script from Applescript editor, the script runs fine, and the Applescript event log shows that it is reading the full body of the email as expected.

I can also run other Applescript scripts against Outlook without issues, so I know that Outlook is able to communicate via applescript.

I tried something just now, on a hunch…

I turned outlook Offline and quit and restarted, so that it would start without connecting to Exchange. I was able to run the Set Category script manually (via Apply Rules) without error. I then let Outlook go online and perform a complete sync. Then tried running the Set Category script again, and it failed.

Hope this might be a clue.

I am going to try a new Identity. I already rebuilt it, but I will completely delete and re-create to see if that makes any difference.

Continuing on…

I created a whole new identity. That didn’t change anything. However, I can clearly see the following pattern:

Upon each start of Outlook, I can run the Category script a limited number of times. It will run successfully for a while, and then produce the errors described above.

Not sure what the magic number is, or what causes it to get upset and stop running the Category script. Also can’t tell if the problem is in the category script or in Outlook. I think it might be in the script, because even when the Category script is producing errors, the Move script will continue to run without issue (on messages whose category is already set).

I suggest that you contact Microsoft and tell them that you are seeing this error, so that at least maybe they can improve the error message.

There is no Move Messages script, so I assume you mean that you’re applying the rule.

What happens if you run the script:

/Users/<username>/Documents/Microsoft User Data/Outlook Script Menu Items/SpamSieve - Set Category.scpt

via AppleScript Editor? And if you get info on that script file in the Finder, how many bytes is it?

This is interesting. Thanks.

As I said, there’s no Move script, so I don’t think that tells us anything. It seems to me that if Outlook can’t run the script the bug is in Outlook (or the OS), but there may be a way to rewrite the script to avoid triggering that bug.

Please change your “SpamSieve - Set Category” rule to run the attached test script, and see whether that helps.