diff --git a/core/rspamd/conf/antivirus.conf b/core/rspamd/conf/antivirus.conf index a0582a0d..57cde1b3 100644 --- a/core/rspamd/conf/antivirus.conf +++ b/core/rspamd/conf/antivirus.conf @@ -4,5 +4,8 @@ clamav { symbol = "CLAM_VIRUS"; type = "clamav"; servers = "{{ ANTIVIRUS_ADDRESS }}"; + {% if ANTIVIRUS_ACTION|default('discard') == 'reject' %} + action = "reject" + {% endif %} } {% endif %} diff --git a/docs/configuration.rst b/docs/configuration.rst index 46429b61..386fa41c 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -131,6 +131,13 @@ See the `python docs`_ for more information. .. _`python docs`: https://docs.python.org/3.6/library/logging.html#logging-levels +Antivirus settings +------------------ + +The ``ANTIVIRUS_ACTION`` switches behaviour if a virus is detected. It defaults to 'discard', +so any detected virus is silently discarded. If set to 'reject', rspamd is configured to reject +virus mails during SMTP dialogue, so the sender will receive a reject message. + Infrastructure settings ----------------------- diff --git a/towncrier/newsfragments/1259.feature b/towncrier/newsfragments/1259.feature new file mode 100644 index 00000000..e726a6a9 --- /dev/null +++ b/towncrier/newsfragments/1259.feature @@ -0,0 +1 @@ +Allow to reject virus mails by setting ANTIVITUS_ACTION=reject \ No newline at end of file