Hi Rainer,

The pull request you linked was merged prior to 1.5, but it only includes regex 
support for OnAccessExcludePath and not OnAccessIncludePath.  It was mentioned 
in the release notes for 1.5.0 but I suppose I neglected to update the sample 
configs and online documentation to reflect the change.
We should correct that.

Sadly, I do not know of a way to solve the exact problem you're describing, 
though I do see the value. I'm absolutely open to an additional change to make 
OnAccessIncludePath be a regex as well, or else adding a second option for 
each, that is explicitly a regex, and deprecating the originals. Swapping 
OnAccessExcludePath to be a regex directly was a risky maneuver considering 
strings like ".cache" change meaning, and should really be "\.cache".

Anyways, I'm sorry this is probably not the response you were hoping for.

Respectfully,
Val

Valerie Snyder (she/they)
ClamAV Development
Talos
Cisco Systems, Inc.
________________________________
From: clamav-users <[email protected]> on behalf of Dr 
Rainer Woitok via clamav-users <[email protected]>
Sent: Monday, July 13, 2026 3:57 PM
To: [email protected] <[email protected]>
Cc: Dr Rainer Woitok <[email protected]>
Subject: [clamav-users] Regexps for "OnAccess*cludePath"?

Greetings,

do the values  for configuration variables  "OnAccess*cludePath"  really
have to be absolute paths?  Searching the Internet I find

   https://github.com/Cisco-Talos/clamav/issues/1074
   https://github.com/Cisco-Talos/clamav/issues/178
   https://github.com/Cisco-Talos/clamav/pull/1314

which all suggest that allowing regexps  was at least discussed in 2024.
But neither the documentation at

   https://docs.clamav.net/manual/OnAccess.html

nor my local Clamav 1.5.2 file  "/etc/clamav/clamd.conf.sample" contains
any indication  that regular expressions  are supported  (in contrast to
configuration variable "ExcludePath").  Have these pull requests been a-
bandoned?  And if yes why?

I hesitate to configure

   OnAccessIncludePath /home

because I'm afraid this could cause massive delays.  I would rather only
specify files which really are retrieved from the Internet, as in

   OnAccessIncludePath /home/.+/Downloads
   OnAccessIncludePath /home/.+/.cache/mozilla/firefox/.+/cache2/entries

Is there a way to achieve this?

Sincerely,
  Rainer
_______________________________________________

Manage your clamav-users mailing list subscription / unsubscribe:
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/Cisco-Talos/clamav-documentation

https://docs.clamav.net/#mailing-lists-and-chat
_______________________________________________

Manage your clamav-users mailing list subscription / unsubscribe:
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/Cisco-Talos/clamav-documentation

https://docs.clamav.net/#mailing-lists-and-chat

Reply via email to