Hey there.
I followed the installed readmes to get clamd/clamav-milter working, as you suggested. I 'think' clamd is working, but still nothing happens when I send the eicar virus through my sendmail. My sendmail.mc is below. As before, all the services run fine, after a bit of debugging. Clamav-milter was writing to the log when I had file permissions wrong on the clamd.milter/clamd.sock file - I fixed that, now it writes nothing to the log when the service starts, and there's no errors to see.
Would it help to see the milter.conf file as well?
Thanks for the help. Mike
=============================================================================
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl FEATURE(delay_checks)dnl FEATURE(masquerade_envelope)dnl FEATURE(allmasquerade)dnl FEATURE(masquerade_entire_domain)dnl FEATURE(`dnsbl', `ipwhois.rfc-ignorant.org',`"550 Mail from " $&{client_addr} " refused. Rejected for bad WHOIS info on IP of your SMTP server - see http://www.rfc-ignorant.org/%22%27)dnl FEATURE(`dnsbl', `bl.spamcop.net', `"450 Mail from " $`'&{client_addr} " refused - see http://spamcop.net/bl.shtml%22%27)dnl FEATURE(`dnsbl',`sbl.spamhaus.org',`Rejected - see http://spamhaus.org/%27)dnl LOCAL_DOMAIN(`mydomain')dnl MASQUERADE_AS(`mydomain')dnl MASQUERADE_DOMAIN(localhost)dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl MASQUERADE_DOMAIN(mydomain)dnl MASQUERADE_DOMAIN(127.0.0.1)dnl MASQUERADE_DOMAIN(192.168.1.102)dnl MAILER(smtp)dnl MAILER(procmail)dnl INPUT_MAIL_FILTER(`clamav', `S=local:/var/run/clamd.milter/clamd.sock, F=, T=S:4m;R:4m')dnl define(`confINPUT_MAIL_FILTERS', `clamav')dnl
=============================================================================
Original message: From: Alexander Dalloz <ad+lists uni-x org> To: For users of Fedora Core releases <fedora-list redhat com> Subject: Re: need help with clamd, freshclam & clamav-milter setup... Date: Thu, 01 Dec 2005 12:50:46 +0100
Am Do, den 01.12.2005 schrieb Mike Leahy um 12:40:
I'm wondering if anyone knows a fairly straightforward way to get ClamAV running on FC4. I got the rpms through yum, but this did not actually install a daemon for clamd. I was eventually able to hack a script into the init.d folder that runs clamd, and I have clamav-milter running with
Did you read through the documentation the packages ship with? The Fedora Extras packages have extra readmes.
sendmail. While I have all of this stuff running without errors (services are all ok, as far as I can tell, sendmail is hooked into clamav-milter). However I have two problems.
First, I'm getting emails sent to root with the following warning:
WARNING: update of clamav database is disabled; please see '/etc/sysconfig/freshclam' for information how to enable the periodic update resp. how to turn off this message.
I've looked at that file, and it's not very explanatory...does anyone know how to get freshclam enabled?
The clamav-update package ships with a cron job, running every 3 hours. As explained in the /etc/sysconfig/freshclam file you have to remove or comment the line
FRESHCLAM_DELAY=disabled-warn
to activate automatic signature updates.
Second, I tried sending the eicar test virus through my sendmail server, but as far as I can tell, nothing was detected...and no logs 'at all' are being generated by the clamav-milter service (even though the config is telling it to). What do I need to get sendmail/clamav-milter working in harmony? In this case, I'd almost prefer errors, so I'd have an idea what might be the problem.
Without seeing your sendmail.mc configuration regarding the clamav-milter setup it is hard to say what is going wrong.
Mike
Alexander
Am Do, den 01.12.2005 schrieb Mike Leahy um 22:01:
Please don't top-post.
I followed the installed readmes to get clamd/clamav-milter working, as you suggested. I 'think' clamd is working, but still nothing happens when I send the eicar virus through my sendmail. My sendmail.mc is below. As before, all the services run fine, after a bit of debugging. Clamav-milter was writing to the log when I had file permissions wrong on the clamd.milter/clamd.sock file - I fixed that, now it writes nothing to the log when the service starts, and there's no errors to see.
Would it help to see the milter.conf file as well?
Mike
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
So you don't want to receive any mail?
FEATURE(delay_checks)dnl FEATURE(masquerade_envelope)dnl FEATURE(allmasquerade)dnl FEATURE(masquerade_entire_domain)dnl FEATURE(`dnsbl', `ipwhois.rfc-ignorant.org',`"550 Mail from " $&{client_addr} " refused. Rejected for bad WHOIS info on IP of your SMTP server - see http://www.rfc-ignorant.org/%22%27)dnl FEATURE(`dnsbl', `bl.spamcop.net', `"450 Mail from " $`'&{client_addr} " refused - see http://spamcop.net/bl.shtml%22%27)dnl FEATURE(`dnsbl',`sbl.spamhaus.org',`Rejected - see http://spamhaus.org/%27)dnl LOCAL_DOMAIN(`mydomain')dnl MASQUERADE_AS(`mydomain')dnl MASQUERADE_DOMAIN(localhost)dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl MASQUERADE_DOMAIN(mydomain)dnl MASQUERADE_DOMAIN(127.0.0.1)dnl MASQUERADE_DOMAIN(192.168.1.102)dnl
Those 2 masquerading lines above aren't valid and don't make much sense.
MAILER(smtp)dnl MAILER(procmail)dnl INPUT_MAIL_FILTER(`clamav', `S=local:/var/run/clamd.milter/clamd.sock,
Check the milter socket path! The default /etc/sysconfig/clamav-milter contains
local:/var/run/clamav-milter/clamav.sock
which obviously differ what you specify in sendmail.mc. You may be confused by the entry in /etc/clamd.d/milter.conf which specifies
LocalSocket /var/run/clamd.milter/clamd.sock
But that is a different socket! You have to distinguish between the clamd socket and the socket which is used for communication between clamav-milter and Sendmail. The clamd socket is for communication between the clamd daemon and a client application like the clamav-milter.
F=, T=S:4m;R:4m')dnl define(`confINPUT_MAIL_FILTERS', `clamav')dnl
Don't place entries below the MAILEr definitions! That asks for trouble. The seconds milter configuration line isn't necessary at all. Put the INPUT_MAIL_FILTER line into the region where you have the DAEMON_OPTIONS set.
Alexander