I sent this patch to the list in November last year, and the thread degenerated into a "bikeshed" discussion about the name of the parameter (we decided on "bananas" in the end :) ).
Can this be re-considered for inclusion? If it's OK, I'll update the pod and submit a pathc to fix that too. R. Robin Bowes said the following on 16/11/2005 20:45: > Hi, > > I'm trying to get qpsmtpd + clamav setup on a new FC4 install. > > The clamav install has changed recently and I'm try to get to grips with > how to get it working with qpsmtpd. > > For example, it is recommended to set up individual clamd instances for > each application. This is good in that I can create an instance for > qpsmtpd runnign as the qpsmtpd user (which fixes the spooldir issue!) > > However, the conf file is in /etc/clamd.d/qpsmtpd.conf which I need to > pass to clamdscan as an option, e.g.: > > clamdscan --config-file=/etc/clamd.d/qpsmtpd.conf > > How can I specify this with the clamav plugin? > > Thanks, > > R. Ok, attached is a patch that adds an additional parameter (clamd_conf) to the clamav plugin. It is used as follows: virus/clamav clamscan_path=/usr/bin/clamdscan clamd_conf=/etc/clamd.d/qpsmtpd.conf action=reject max_size=1048576 I may even update the POD text if this patch is acceptable :) R. -- http://robinbowes.com If a man speaks in a forest, and his wife's not there, is he still wrong?
Index: clamav =================================================================== --- clamav (revision 568) +++ clamav (working copy) @@ -120,6 +120,9 @@ elsif (/^clamscan_path=(\/[\/\-\_\.a-z0-9A-Z]*)$/) { $self->{_clamscan_loc} = $1; } + elsif (/^clamd_conf=(\/[\/\-\_\.a-z0-9A-Z]*)$/) { + $self->{_clamd_conf} = " --config-file=$1"; + } elsif (/^tmp_dir=(\/[\/\-\_\.a-z0-9A-Z]*)$/) { $self->{_spool_dir} = $1; } @@ -138,6 +141,7 @@ $self->{_max_size} ||= 512 * 1024; $self->{_spool_dir} ||= $self->spool_dir(); $self->{_back_compat} ||= ''; # make sure something is set + $self->{_clamd_conf} ||= ''; # make sure something is set unless ($self->{_spool_dir}) { $self->log(LOGERROR, "No spool dir configuration found"); @@ -173,7 +177,7 @@ # Now do the actual scanning! my $cmd = $self->{_clamscan_loc}." --stdout " - .$self->{_back_compat} + .$self->{_back_compat} . $self->{_clamd_conf} ." --disable-summary $filename 2>&1"; $self->log(LOGDEBUG, "Running: $cmd"); my $output = `$cmd`;