Alexander Dalloz wrote:
Am Do, den 18.08.2005 schrieb Justin Willmert um 23:29:
Well, after playing around for a while (with versions from Redhat and
Crash-Hat), I've finally gotten ClamAV (from Redhat) to work with
sendmail, but I'm not really happy with the solution. As it is, I have
to manually edit sendmail.cf and add in the InputMailFilter settings. It
seems that the INPUT_MAIL_FILTER macro for sendmail.mc is not working
correctly. Here is part of my sendmail.mc:
It works correctly, I am pretty sure.
INPUT_MAIL_FILTER(`clamav',
`S=local:/var/run/clamav-milter/clamav.sock, F=, T=S:4m;R:4m')dnl
Where do you place that line inside /etc/mail/sendmail.mc? The location
matters. Place it right after the last "define" statement. The line
itself is proper.
I did have it near the beginning of the file with all of my other edits
I've made. This is the first one to ever create problems for me, so I
had no idea order mattered that much, but I guess it does make sense
when you think about it. I think I'll more all my other edits toward the
bottom just to be on the save side.
define(`confINPUT_MAIL_FILTERS', `clamav')dnl
That line isn't necessary.
This line actually helped me out a bit (I actually got some output
compared to no output without it), but now that I've got my
'INPUT_MAIL_FILTER...' statement in the right place, I don't need it
anymore.
Now from what I've figured out so far, the 'define...' line puts
something like this into sendmail.cf:
O InputMailFilter=clamav
Yes, and whatever milters you include in your setup, Sendmail will only
use the one called clamav.
And from what I've gathered from scowering through a bunch of websites,
the 'INPUT_MAIL_FILTER...' line should output this right after the line
above:
Xclamav, S=local:/var/run/clamav-milter/clamav.sock, F=, T=S:4m;R:4m
...but it doesn't. This is the part I'm not happy about. If I ever make
a change to sendmail.mc and recompile sendmail.cf, I'm going to have to
go in and add this line again. Could somebody point out why this is not
working as it is expected to?
Yes, editing the sendmail.cf is bad, exactly from the reason you mention
(and some others).
Be sure you have the rpm sendmail-cf installed. Else you can't create a
new sendmail.cf file from sendmail.mc modified. "make -C /etc/mail"
would show you an error then even.
Yes, I do have sendmail-cf installed (don't want to sound arrogant or
anything, but I am at least that competent ;) )
Justin
Alexander
Thanks so much for your help Alexander,
Justin