On 11/12/2006 03:28, gene wrote:
Hello,

I am using qmail. I've written a scanner which uses libclamav to virus check emails before they get delivered into local maildirs. Now I would like to run clamd on the seperate server and have my scanner connect to it via TCP/IP socket. Is there a documented API or an example of how to do it ? I know clamdscan has the code that does it, but I was wondering if there is a documented API.

You can use the TCPSocket option in clamd.conf to listen on a TCP port. The commands to send to the socket are documented in the clamd man page. I guess you'd want to use the STREAM command. This returns an arbitrary port number you can connect to to scan an arbitrary stream of data, so as Dennis mentioned, you may need to configure your firewall to allow these connections to arbitrary port numbers as well as connections to the main clamd port number.

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <[EMAIL PROTECTED]>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html

Reply via email to