[clamav-users] clamav-milter exclude files from scanning

Christian seclists at lownoize.org
Wed May 24 12:49:55 UTC 2023


Hi all,

we have a mailserver with clamav-milter and clamd Version 
0.103.8+dfsg-0ubuntu0.16.04.1+esm1.
There we have a cdb ruleset to block some filetypes:

/var/lib/clamav/archive_blocker.cdb withe following content:
attach.blockgz2:*:*:\.[Gg][Zz]$:*:*:*:*:*:*

Now I want to exclude some file extension and added the following 
configuration parameter to my clamd.conf:
ExcludePath .*\.dev$

Then I created two files, one with the extension .123 and one with the 
extension .dev and scanned those files with clamdscan and it works like 
expected:

root at mail:/tmp/test# clamdscan *
/tmp/test/test1.123: attach.blockgz2.UNOFFICIAL FOUND
/tmp/test/test1.dev: OK

----------- SCAN SUMMARY -----------
Infected files: 1
Time: 0.021 sec (0 m 0 s)
Start Date: 2023:05:24 14:22:18
End Date:   2023:05:24 14:22:18

The file test1.123 gets detected by the cdb rule and the file test1.dev 
is excluded and marked as clean.

But when those files get scanned via clamav-milter both files get 
detected by the cdb rule.
Is there a way to exclude a file extension from being scanned via 
clamav-milter?

Cheers,

Christian


More information about the clamav-users mailing list