Ken, Aaron, others: I maintain a pure Win32 "PerlScript" (some COM programming as well) working as an Exchange Event Sink on the SMTP interface.
I was working with 2.63 and upgraded to 3.04, and will be upgrading to 3.10 (or whatever is stable at the time I take the leap) soon. The code mods from 2.63 to 3.04 were significant, but with the benefit of hindsight, it looks like I was coding for something that turned out to be a part of a bugzilla note, and fixed in a later release. I've been running while only upgrading features for the last 6 - 12 months. I am using the built-in "PerlScript" interpreter that installs with Activestate Perl for the Windows Scripting Host, ASP usage, etc, so Windows calls perl via the Hosted Scripting Engine. <SCRIPT LANGUAGE="PerlScript"> #inside a VBS file use Mail::SpamAssassin; Etc Etc Etc </SCRIPT> At the base of the script, it uses CDO to read the message and pass it to SpamAssassin, and then SpamAssassin's API (just the subroutines) to check the mail and mark it.. Then CDO again, to reimport the message as a string (including attachments) back into the CDO message object in order to hand it back to Exchange for delivery (or destruction). It's full of logging, etc. If you want to look at it, and/or make comments/suggestions, and/or request help installing it, I'd share very willingly. I, too, get less than 500 mails a day (real mails).. And tons more spam than real mail that SA tags for me. As a matter of fact, this list accounts for most of the real mail that my mail server sees in a day's time. :) Steven -----Original Message----- From: Ken Goods [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 21, 2005 10:27 AM To: 'SpamAssassin' Subject: RE: Newbie looking for info... Aaron Boyles wrote: > New to the list, all, and looking for some info on SA. > > First, my background: I'm an applications developer using VB, and > have no experience with Linux, and only passing experience with > Exchange. I am, however, well versed on the SMTP/POP3 protocols, and > have written a number of applications for both. > > Here's the drill: I've got an SMTP filter application currently > running that allows us to monitor traffic real-time on our servers, as > we tend to get "hackers" trying to pry quite often. The application > currently receives all E-Mails, dumps them to a folder (to allow our > virus scanner a chance at them) and then forwards them on to our mail > server. I was hoping I could impliment SpamAssassin at this point in > the loop with a simple API or some such. > > I know that the version of SpamAssassin available on the website can > be run in Windows as a server after a 43 step set-up process, but this > isn't exactly what I'm looking for. Does anyone know of a compiled > API version of SpamAssassin that would allow a programmer to simply > add the library to an application, and call it through API? > > Any ideas would be appreciated! > > -Aaron Boyles > ITC Applications Programmer Greets Aaron! I am also a developer and have worked a lot with email on the windows side. I tried installing SA on win32 using the documented way a while back as a first step in developing a hook into my own applications. I struggled for quite a while to get something that would work as well as a native SA installation and while it worked, it turned out to take more time and to be more maintenance than I was up for. AFAIK there is no "API" for spamassassin (others may know better) but I looked pretty hard a year and a half ago. I'm afraid you'd have to get pretty deep into the internals of SA (and Perl) and develop something on your own. At least this was what I finally figured out. But I still needed something between the mean old internet and our exchange server. So I hit the boneyard and found an old P233 and loaded Linux, MailScanner/Spamassassin/ClamAV and stuck it behind the firewall and in front of the exchange server. Took an afternoon to get it up, running, and configured. Couldn't be happier. I'm processing 5-8k emails a day with a 100% virus detect rate and a 97%+ spam detect rate. I'm sure I could get the spam detection up a little more if I wanted to spend the time but this is fine for both me and management at this time. Updates are easy thanks to Julian (the developer of MailScanner) as he supplies a script to update both ClamAV and Spamassassin along with the frequent MailScanner releases. I can tell you're a "I want to do it myself" kind of guy (as am I), but I'm hoping to save you a little time here. By the time you got something working you'd might as well become one of the Spamassassin developers. :) Just offered as an option to think about. But if you have tons of time and want to pursue hooking into SA at the level you're talking about I'd certainly be interested in seeing what you come up with. Hint... you'd probably be looking at passing the email to spamscan and then deciding how to handle it based on the spamscan markup much like what MailScanner and amavis-new does. You may get some hints from the source of those programs but then you've got the perl thing to think about.... my head hurts... :) Good luck, Ken Ken Goods Network Administrator AIA/CropUSA Insurance, Inc.