feature: provide better rspamd suppport (#3016)

* added options to toggle OpenDKIM & OpenDMARC

rspamd can provide DKIM signing and DMARC checking itself, so users
should be able to disable OpenDKIM & OpenDMARC. The default is left at
1, so users have to to opt-in when the want to disable the features.

* misc small enhancements

* adjusted start of rspamd

The order of starting redis + rspamd was reversed (now correct) and
rspamd now starts with the correct user.

* adjusted rspamd core configuration

The main configuration was revised. This includes AV configuration as
well as worker/proxy/controller configuration used to control the main
rspamd processes.

The configuration is not tested extensively, but well enough that I am
confident to go forward with it until we declare rspamd support as
stable.

* update & improve the documentation

* add tests

These are some initial tests which test the most basic functionality.

* tests(refactor): Improve consistency and documentation for test helpers (#3012)

* added `ALWAYS_RUN` target `Makefile` recipies (#3013)

This ensures the recipies are always run.

Co-authored-by: georglauterbach <44545919+georglauterbach@users.noreply.github.com>

* adjusted rspamd test to refactored test helper functions

* improve documentation

* apply suggestions from code review (no. 1 by @polarthene)

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>

* streamline heredoc (EOM -> EOF)

* adjust rspamd test (remove unnecessary run arguments)

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
This commit is contained in:
Georg Lauterbach 2023-01-25 10:28:59 +01:00 committed by GitHub
parent 2033eeaf54
commit 555fbb78c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 324 additions and 50 deletions

View file

@ -0,0 +1,3 @@
# documentation: https://rspamd.com/doc/configuration/metrics.html#actions
subject = "***SPAM*** %s"

View file

@ -0,0 +1,13 @@
# documentation: https://rspamd.com/doc/modules/antivirus.html
enabled = false;
ClamAV {
type = "clamav";
servers = "/var/run/clamav/clamd.ctl";
action = "reject";
message = '${SCANNER} FOUND VIRUS "${VIRUS}"';
scan_mime_parts = false;
symbol = "CLAM_VIRUS";
log_clean = true;
}

View file

@ -1,10 +0,0 @@
# documentation: https://rspamd.com/doc/modules/antivirus.html
ClamAV {
action = "reject";
scan_mime_parts = true;
message = '${SCANNER}: virus found: "${VIRUS}"';
type = "clamav";
log_clean = false;
servers = "127.0.0.1:3310";
}

View file

@ -1,6 +1,6 @@
# documentation: https://rspamd.com/doc/configuration/logging.html
type = "console";
level = "notice";
color = true;
level = "silent";
color = false;
systemd = false;

View file

@ -0,0 +1,3 @@
# documentation: https://rspamd.com/doc/workers/controller.html
bind_socket = "0.0.0.0:11334";

View file

@ -0,0 +1,4 @@
# documentation: https://rspamd.com/doc/workers/normal.html
enabled = false;
bind_socket = "127.0.0.1:11333";

View file

@ -0,0 +1,18 @@
# documentation: https://rspamd.com/doc/workers/rspamd_proxy.html
# see also: https://rspamd.com/doc/quickstart.html#using-of-milter-protocol-for-rspamd--16
bind_socket = "127.0.0.1:11332";
milter = yes;
timeout = 120s;
upstream "local" {
default = yes;
self_scan = yes;
}
count = 2;
max_retries = 5;
discard_on_reject = false;
quarantine_on_reject = false;
spam_header = "X-Spam";