Clamd Daemon Scanning Patches

Rick Cooper rcooper at dwford.com
Wed May 30 20:27:58 IST 2007


Julian,

I have attached the patches for adding direct clamd daemon support to
MailScanner. I have patched against the 4.60.6 beta. I can't run a plain
vanilla MailScanner setup long as it screws up some reporting scripts as
well as does away with my ArchivedFileName and ArchivedFileType rules and
these are important to a lot of people. But my quick tests didn't show any
issues and the code has been used on six servers for awhile now. IIRC
dropping clamavmodule and talking directly to the daemon reduces the MS
memory footprint by 28mg per child. It's adding the code to a pristine copy
of MS and patching from there that isn't well tested. If you can get it into
a beta soon It would be nice, I plan to fully patch (which my other patches)
and build a 4.60.6 build either this evening or tomorrow.

Feel free to redo what ever trips your trigger, but it shouldn't need any
form of auto update scripting, or file watching as freshclam will reload
clamd, or clamd will check on it's own depending on the system's clamd.conf
Selfcheck setting. In fact one should be able to update ClamAV without
restarting MailScanner and, unless they make huge changes in the clamd API
any clam updates shouldn't affect the code at all. It's also likely that the
clamav user problems that occurred using clamdscan shouldn't happen either
unless the defaults (for dropping privilege) are changed.

Last two items that should probably be asked of the group:

I am assuming that the clamd init scripts are creating lock files, as most
do, (usually /var/lock/subsys/clamd) but if that is not the case I should
remove the check, I am PINGing clamd anyway but if the lock file isn't there
I can short circuit the whole connect process.

I am not using the threaded daemon model (MULTISCAN) but a config parameter
such as "Clamd Use Threads" could be added so clamd can take advantage of
threading on SMP hosts.  



Rick Cooper



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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: virus.scanners.conf.diff
Type: application/octet-stream
Size: 611 bytes
Desc: not available
Url : http://lists.mailscanner.info/pipermail/mailscanner/attachments/20070530/4b538fb9/virus.scanners.conf-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ConfigDefs.pl.diff
Type: application/octet-stream
Size: 586 bytes
Desc: not available
Url : http://lists.mailscanner.info/pipermail/mailscanner/attachments/20070530/4b538fb9/ConfigDefs.pl-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MailScanner.conf.diff
Type: application/octet-stream
Size: 706 bytes
Desc: not available
Url : http://lists.mailscanner.info/pipermail/mailscanner/attachments/20070530/4b538fb9/MailScanner.conf-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SweepViruses.pm.diff
Type: application/octet-stream
Size: 8581 bytes
Desc: not available
Url : http://lists.mailscanner.info/pipermail/mailscanner/attachments/20070530/4b538fb9/SweepViruses.pm-0001.obj


More information about the MailScanner mailing list