[Spambayes] [Outlook addin] Filtering unread messages on startup

Mark Hammond mhammond@skippinet.com.au
Fri Nov 15 12:14:47 2002

> Looking at the code for GetNewUnscoredMessageGenerator, it seems to
> scan the folder for messages with Unread = True and no "Spam" field.
> There were 40 or so unread messages, so I can only assume that they
> had a Spam field.

See if you can convince the Outlook2000/sandbox/dump_props.py script to
produce anything useful.  It should tell you if such a field exists (and
plenty of other things!)

> I don't know enough about MAPI to diagnose this much further - I do,
> however, have the "Spam" field displayed in my Inbox - could that be
> enough to cause the field to be automatically created?

It shouldn't.  Indeed, having a blank score would indicate there is no such
field on the message.  Getting the field automatically created in the folder
is a different problem we are yet to solve, but that is different.

> But I know Mark will be better able to make the appropriate fix :-)

That may be right, but I would prefer to see some output from dump_props
first for you.  delete_outlook_field.py can also be useful - it can be used
to remove the Spam field from all messages in a folder.  This is indeed how
I did most of my testing.

Eg, I run:

F:\...>delete_outlook_field.py -d --no-outlook Spam
Processing folder Inbox
Deleting field Spam
Deleted 1257 field instances via MAPI
Could not find property to delete in the folder

Then when I restart outlook, I see:

Processing 16 missed spam in folder 'Inbox' took 349.376ms

As I do indeed have 16 unread mail in my inbox :(  These 16 messages are the
only ones now showing the Spam field.  Further, I have indeed seen this work
for me, for real - this was to scratch a personal itch for when Outlook
crashes due to a buggy PGP plugin a client insists I use :(

I will also forward the test script I used to come up with the fastest
technique I could for the usual case of zero missed messages.


More information about the Spambayes mailing list