qpsmtp + clamscan plugin combo broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qpsmtpd (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
When using clamscan virus scanner plugin with qpsmtpd, it dies with the following error message:
Fri Aug 19 20:08:45 2011 utest-oos32[5453]: clamscan results: /usr/bin/clamscan: unrecognized option `--config-
ERROR: Unknown option passed
ERROR: Can't parse command line options
Fri Aug 19 20:08:45 2011 utest-oos32[5453]: ClamAV error: /usr/bin/clamscan --stdout --config-
Fri Aug 19 20:08:45 2011 utest-oos32[5453]: 452 Message denied temporarily
The plugin is configured like this:
root@utest-
virus/clamav clamscan_
clamscan's command line options changed a lot and qpsmtpd's clamav plugin needs to be updated to not pass unknow parameters to clamscan (--config-file was removed, but I didn't find this in clamav's changelog anywhere).
Note: clamdscan plugin works just fine
Note2: as clamav 0.97.2 gets backported all the way to Hardy, this needs to be fixed in every release (Hardy, Lucid, Maverick, Natty) otherwise clamscan will not work
Note3: clamdscan (which works) should be the preferred plugin to use (because it's way faster) but this still need fixing, maybe not everybody is running clamav-daemon
tags: | added: patch |
Attached a minimal patch for clamav plugin which should take care of this. Tested and working on Oneiric, the error message is gone and the mail gets scanned and flagged correctly.
Fri Aug 19 20:28:19 2011 utest-oos32[5831]: clamscan results: Eicar-Test- Signature Signature Signature
Fri Aug 19 20:28:19 2011 utest-oos32[5831]: Virus(es) found: Eicar-Test-
Fri Aug 19 20:28:19 2011 utest-oos32[5831]: 552 Virus Found: Eicar-Test-
Fri Aug 19 20:28:19 2011 utest-oos32[5831]: dispatching QUIT
I did attach the patch but I think this might/should be resolved in some other way. Looking at the clamav plugin code there is a back_compat flag which adds some deprecated options when using clamav < 0.80. Maybe something like this should be used here also.
(Note: nobody should use any older version of clamav and anything less than clamav 0.97 should be thrown out)