Bug 7786 - Clamav plugin
Summary: Clamav plugin
Status: RESOLVED WORKSFORME
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Plugins (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: All All
: P3 enhancement
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-18 15:55 UTC by Giovanni Bechis
Modified: 2022-04-22 07:01 UTC (History)
2 users (show)



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Giovanni Bechis 2020-01-18 15:55:38 UTC
If anyone would like to play with it, here is the clamav plugin I recently wrote,
working but still under heavy development.

https://github.com/bigio/spamassassin-clamav
Comment 1 Henrik Krohns 2022-04-22 05:37:39 UTC
Not sure what the purpose of keeping this bug open is.. of course you are free to commit it for SA project to take over maintaining. But please not "Clamav", as again proper designation for it is "ClamAV".. details matter.

But here's some observations if that was the point of this bug:

- clamd_sock seems to assume that clamd is always running on localhost and not some other server
- it's useless to have separate hardcoded "check_clamav_sanesecurity" function, everything should go through check_clamav, otherwise you need to update plugin and if can(foo) constantly for every signature. So check_clamav() should just accept a custom regex
- add result caching if called multiple times (with different regex as above for different scoring etc)
- it's loading two modules needlessly, try loading other only if other was not available
- why is it using $self->{main}->{registryboundaries}->{conf}
- of course custom async call would be preferable, instead of waiting for clamd response. The protocol is so simple it's probably pointless to even use external modules for this.

So I'd rather see it committed only after much polishing.
Comment 2 Giovanni Bechis 2022-04-22 07:01:58 UTC
Thanks, I will commit it when/if I will find time/interest to improve it.