Subject: Re: clamav-milter under CURRENT
To: None <cube@cubidou.net>
From: Mike M. Volokhov <mishka@apk.od.ua>
List: tech-pkg
Date: 01/30/2004 10:06:02
On Thu, 29 Jan 2004 18:31:45 +0100
cube@cubidou.net wrote:

> On Thu, Jan 29, 2004 at 06:24:56PM +0100, David Ferlier wrote:
> > On Thu, Jan 29, 2004 at 06:19:10PM +0100, Antoine Jacoutot wrote:
> > > On Thursday 29 January 2004 18:04, Mike M. Volokhov wrote:
> > > > > > I have observe that hangs too. First, I will try 0.65 before and if
> > > > > > it will hangs again, I will try to investigate this problem.
> > > > > >
> > > > > > David, what you think about these hangs and Milter support?
> > > > >
> > > > > I'll look into that tonight. Sorry, i just can't right now.
> > > 
> > > Thanks a lot you guys for having a look, I really appreciate.
> > > Now, would you also consider writing an rc script for clamd+clamav-milter ? If 
> > > you're not, maybe I could write one and send it too you so you could include 
> > > it in pkgsrc...
> > > Thanks.
> > 
> > cube@netbsd.org will commit (or already has commited) a patch
> > to update to 0.65. I'll surely take a look at clamav-milter issues tonight.
> 
> I could make a rc.d script for clamd, but i have no idea how the milter thing
> works.  Does it involve a daemon to be launched, too?  If so, should
> clamav-milter be launched with clamd altogether, from the same rc.d script
> (through an option, of course), or should there be two rc.d scripts?
> 

The sendmail has some pass-trough filter hooks inside. That API known as Milter.
Any message depending on sendmail configuration may be "filtered" by number
of such filters. There are some notes for starting sendmail filters:

	- all filters must (should?) be started *before* sendmail;
	- if filters will communicate within some another parts (such as clamd)
	  they should be started *after* that parts;
	- The filters can leave they Unix socket files after unclean shutdown.
	  Thus, on each filter start that stale files must be deleted.
	- When all parts uses TCP sockets, the sendmail, filters, and other
	  parts may be each located on it's own system. For example:
	  [AV daemon, Solaris] <-> [Milter filter, MacOS X] <-> [sendmail, BSD]

Please take a look to wip/drweb/files/drwebd-rcd.src (just like clamd), and
wip/drweb-clients-shared/drweb-smf.sh (just like clamav-milter) for examples.
They were created for DrWeb antivirus suite.

In file wip/drweb-clients/files/sendmail.mc.addon you can found few lines for
addition to sendmail.mc file. That is how inject Milter filters in sendmail.

--
Kind regards,
Mishka.