From e857b9d6591424687ee67336d58843827b04b694 Mon Sep 17 00:00:00 2001 From: Michael Wyraz Date: Tue, 19 Nov 2019 11:02:00 +0100 Subject: [PATCH] Document default antivirus behaviour, add an option to reject viruses --- core/rspamd/conf/antivirus.conf | 3 +++ docs/configuration.rst | 7 +++++++ towncrier/newsfragments/1259.feature | 1 + 3 files changed, 11 insertions(+) create mode 100644 towncrier/newsfragments/1259.feature 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