[Mimedefang] Sendmail, MIMEDefang and ClamAV

NFN Smith worldoff9908 at sacbeemail.com
Thu Aug 26 14:36:21 EDT 2004


I have the following setup:

Fedora Core 2
Sendmail 8.13.1
MIMEDefang 2.44
SpamAssassin 2.64
-----------------
ClamAV 0.75


I've got a working setup of Sendmail, MIMEDefang and SpamAssassin, and 
working on adding ClamAV to the mix.

For the moment, I've gone the route of launching ClamAV as a Sendmail 
milter (rather than from MIMEDefang), as described at 
http://linux.sgms-centre.com/howto/sendmailclamav.php (which makes no 
mention at all of MIMEDefang).  Having previously run RAV as a Sendmail 
milter, this method is one that is fairly easy to do.

However, I discover that when run ClamAV as a milter, ClamAV works fine 
on filtering viruses, but it seems to cause MIMEDefang to be completely 
ignored -- among other things, incoming messages have no X-Spam-Status 
headers (as inserted by MD), but do have X-ClamAV headers.  When I 
disabled ClamAV, MIMEDefang activity shows up again.

The relevant sections of my sendmail.mc (with ClamAV):

> define(`_FFR_MILTER', `true')dnl
> INPUT_MAIL_FILTER(`mimedefang',`S=unix:/var/spool/MIMEDefang/mimedefang.sock,F=T,T=S:2m;R:2m')dnl
> INPUT_MAIL_FILTER(`clmilter',`S=local:/var/milter/clmilter.sock, F=, T=S:4m;R:4m')dnl
> define(`confINPUT_MAIL_FILTERS', `clmilter')

Is there something I'm missing in my ClamAV definitions, or would I be 
better off calling ClamAV from MIMEDefang?  If the latter, what do I 
need to have in my mimedefang-filer file?

Also, a related question -- what's the best way of getting the clamd and 
clamav-milter daemons launched at start time?

I've seen several different suggestions.  The linux.sgms-centre site 
suggests simply adding clamd and clamav-milter calls to the rc.local 
file.  I'm suspicious of this one, because I'm pretty sure that the 
ClamAV daemons should be started before MD and Sendmail start.

I've also seen advice of putting these in the mimedefang rc.d file, but 
my preference would be to do a startup file that's separate -- running 
as S78(-something), where the ClamAV daemons can be 
started/stopped/restarted independently of MIMEDefang.  Can somebody 
point me to a link that has a useful startup script?

Thanks in advance.

Smith





More information about the MIMEDefang mailing list