Merge #907
907: Don't generate the clamav configuration if ANTIVIRUS is none. r=mergify[bot] a=mvaled ## What type of PR? bug-fix ## What does this PR do? Avoid rspamd to try to connect to clamav if you choose ANTIVIRUS="none". Otherwise the rspamd will try to connect to none, timing out several times and leading to poor performance. I have a server without CLAMAV; and I'm getting times up to 45s: ``` $ grep 'CLAMAV' ~/downloads/logs-from-antispam-in-mailu-security-5d75fb987-kv958.txt | grep -o 'time: [^m]*' time: 45011.089 time: 45126.002 time: 45002.024 time: 45037.436 time: 45006.775 ... ``` Mails for which clamav is not used range from a tens of miliseconds to a few hundred. ## Prerequistes Before we can consider review and merge, please make sure the following list is done and checked. If an entry in not applicable, you can check it or remove it from the list. - [ ] In case of feature or enhancement: documentation updated accordingly - [ ] Unless it's docs or a minor change: place entry in the [changelog](CHANGELOG.md), under the latest un-released version. Co-authored-by: Manuel Vázquez Acosta <manuel@merchise.org>master
commit
d3a5c70589
@ -1,6 +1,8 @@
|
||||
{% if ANTIVIRUS == 'clamav' %}
|
||||
clamav {
|
||||
attachments_only = true;
|
||||
symbol = "CLAM_VIRUS";
|
||||
type = "clamav";
|
||||
servers = "antivirus:3310";
|
||||
}
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue