PC Review


Reply
Thread Tools Rate Thread

COM Addin for Spam Detection

 
 
Moasat
Guest
Posts: n/a
 
      24th Nov 2003
I've written an add-in that uses SpamAssassin to detect
Spam. Similar to the SAProxy, I'm trying to create a new
message in a 'Spam' folder, then attach the original to
it. This all seems to work well, I'm actually copying the
original so as to retain all of the properties/headers,
etc.

My problem comes in when Rules are also in place.
Apparently the Rules can take effect before my addin gets
notified via OnNewItem. For lack of a better method, I'm
wanting to set a timer for about 5-10 seconds that will
come through and scan all folders for any unread mail that
may have been moved via a Rule and process them. I'm
doing this via a second thread and my assumption is that
this is really messing with Outlook in general.

With the second thread, in the worst case scenario,
Outlook will now crash somewhere way down in OUTLIB or
some other module. In most cases, this will happen during
a call to Move the item to the Spam folder. (spMailItem-
>Move(...). It will crash other times when I'm trying to

change the body of the message using put_Body(...).

Regardless, I seem to have a problem with Outlook not
wanting to shutdown. I've verified that my second thread
is closing, and all handles to everything are being
released/closed etc via smart pointers.

To really add to the confusion, any customization I
perform to the Standard Toolbar, or to a Custom toolbar,
seems to be lost. Whether Outlook actually shutsdown on
its own or if I have to kill the process. This happens on
two different machines. I've tried updating to Office SP3
and all the latest updates I can find but nothing has
helped. Even if I remove my addin from Outlook, it still
happens.

My questions are:

1. Assuming the second thread calls
OleInitialize/Unintialize, is Outlook still not very
thread safe? Even with CritSections, is it not happy with
multiple threads from Addins?

2. Why are the toolbars suddenly reverting back to default?

Thanks for any info anyone can offer.

Info:

Windows 2000 Pro
Office 2000 Premium SR-1
MS Visual C++ 6.0
(Don't know what else you might need, but please ask)



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Turn the Entertainment ### SPAM SPAM SPAM ### industry into your personal Cash Cow! Papa DIY PC 0 10th Apr 2005 02:13 AM
FrontPage Spam Spoiler Addin Tom Pepper Willett Microsoft Frontpage 38 3rd Mar 2005 02:26 AM
Bayesian Spam Detection Jim Adams Microsoft Dot NET 0 18th Nov 2004 09:23 PM
Bayesian SPAM Detection Jim Adams Microsoft Dot NET 0 2nd Jun 2004 08:25 PM
Spam spam spam spam - like Monty Python Microsoft Outlook 1 30th Oct 2003 05:15 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:19 PM.