Clamav suggestions

Rick Cooper rcooper at dwford.com
Sat May 5 19:23:22 IST 2007


 

> -----Original Message-----
> From: mailscanner-bounces at lists.mailscanner.info 
> [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf 
> Of Julian Field
> Sent: Saturday, May 05, 2007 12:23 PM
> To: MailScanner discussion
> Subject: Re: Clamav suggestions
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
[...]

> Yes, I welcome any contribution, so long as the patch isn't 
> *too* big! :-)
> Please try to keep your patch as self-contained as possible, so you 
> just, for example, rewrite the init code for the clamd parser and the 
> output parser itself. Please just make it as clean and modular as you 
> can. You can see from the rest of the code the type of Perl I 
> write. I 
> use the syntactical short-cut facilities in the language, I 
> don't just 
> write Java/C in Perl the way a lot of people do. And please 
> don't feel 
> upset if I take your code and appear to rewrite it :-)
> 
> Thanks,
> Jules.
> 

I will have to try and rememeber the program flow, and look at the
clamavmodule code and how it's called because this would work pretty much
the same. It would be easy enough to make the output the same as the
clamavmodule output so the same parser could be used if the current parser
had some minor changes such as MailScanner::Log::InfoLog("ClamAVModule:: to
MailScanner::Log::InfoLog("$Name:: would it not? I have already tried to
make the code more like yours (from my unrar experience) such as "last if
time > $TimeOut;" or "LogIt("ClamD Timed Out!\n") if $TimeOut < time &&
$Debug;". In any event you know I don't care if you rewrite everything..
It's your program ;-) The size should be pretty fair, the current stand
alone proof of concept code is only 144 lines including a Logging function,
line comments, 18 lines of description comments, the various "use "
statements and debug and blank lines. I would expect the finished MS ready
code would be half that, maybe less (even with comments). There would, of
course, be additional config lines. I would expect you should have:
	clamd socket (IpAddr or full path to socket file)
	clamd port default 3310
	clamd lock file (to check if clamd is even running)
	clamd timeout 

And would you want to scan an entire batch at once, or one message/dir at a
time? I can even send you the stand alone code I have an let you play with
it at your leasure if you wish.

Rick


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the MailScanner mailing list