FW: [spambayes-dev] Code locations in Spambayes Outlook plugin

TP Diffenbach tp at diffenbach.org
Sat Nov 15 17:27:10 EST 2003



Tim,

thanks for your help. Knowing what to grep on make this a one line code
change, and running "python addin.py" painlessly installed it.

Thanks too to Kenny, for your response.

A bit of mucking about with the Outlook forms (and ignoring an Outlook
popped-up suggestion after a bit of Googling), made it work, and now I can
see the headers without having to delve into Outlook's menus, and I can do
it without code in the form, which disables Outlook's auto-preview (so much
of using Outlook seems to involve working around stupid design decisions in
Outlook).

BTW, I'm signed up to the spambayes-dev list under a different email than I
use to post to the list; will this cause any problems?

Thanks,
Tom

-----Original Message-----

[TP Diffenbach]
> I'd like to extend the Spambayes Outlook plugin a bit.
>
> In the Spambayes Outlook Plugin, in which module are the header lines
> (Outlook lingo: CdoPR_TRANSPORT_MESSAGE_HEADERS) extracted?

The plugin doesn't use the CDO API -- it's too problematic across Outlook
variations (e.g., it appears it's not even available in most IMO
configurations, unless the user manually installs CDO from their Office CD).
It uses low-level MAPI instead.  Search the source for the MAPI
PR_TRANSPORT_MESSAGE_HEADERS_A property and you'll soon find it.  Be warned
that raw MAPI can be extremely painful to work with (although it's a hell of
a lot easier to work with from Python than from C!); OTOH, it's much faster
than CDO too, and that's important to the plugin for high-volume users.

> In which module is the spam percentage score added to the Outlook
> mail item? 

The same module you'll find above, in the SetField method of class
MAPIMsgStoreMsg (I'm resisting becoming a remote search button in your text
editor <wink>).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 1213 bytes
Desc: not available
Url : http://mail.python.org/pipermail/spambayes-dev/attachments/20031115/9c5d5d63/winmail.bin


More information about the spambayes-dev mailing list