This Clamd support is a very good thing, and sure it would be even better to have it directly scan the data stream.
Regarding the matcher vs mailet issue, I have a plan to create a new mailet called something like SecurityCheck, that does an optional and configurable antivirus scan like IsInfected, an optional and configurable attachment names check like AttachmentFileNameIs, and a new and configurable attachment names check inside zip files, setting both a new header and a new message attribute with the outcome. Ohter ideas are welcome. If the specific antivirus used has to work on the temp files also the zip check if any will be done there; if it can work on the stream it will do also the zip check on it. So I suggest Kraig to enhance IsInfected with the ClamD code, possibly with the data stream scan, and let me have it, so that I can do the mailet porting and extending. Vincenzo > -----Original Message----- > From: Serge Knystautas [mailto:[EMAIL PROTECTED] > Sent: giovedi 27 maggio 2004 17.04 > To: James Users List > Subject: Re: Clam antivirus and JAMES > > > Kraig Schario wrote: > > I think I could have setup it up to scan the a Data Stream removing the need > > for the temp files. However, I needed a quick and dirty solution if you know > > what I mean. So I left it as a matcher like Vincenzo's IsInfected class. > > Hence most of the code is Vincenzo's, except for the part that calls CLAMD. > > Sure, I always appreciate the need to get something working first. > > > Any input on updating it to a Mailet or sending the messages directly to > > Clamd would be appreciated. > > Changing it to a mailet should be almost a no brainer. How it picks up > configuration is the biggest change (you'll use getInitParameter instead > of the StringTokenizer), but otherwise just extend a different class and > have the code in service() instead of match(). > > In terms of eliminating the need for temp files, I would split out the > code that connects to clamd to another method. Then in dumpPart() where > it recurses through all the mime parts, instead of writing a block to > check to disk, take that input stream and send that to the method that > communicates with clamd. > > -- > Serge Knystautas > President > Lokitech >> software . strategy . design >> http://www.lokitech.com > p. 301.656.5501 > e. [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]