diff --git a/roles/mail/tasks/main.yml b/roles/mail/tasks/main.yml index 544ec65..531e547 100644 --- a/roles/mail/tasks/main.yml +++ b/roles/mail/tasks/main.yml @@ -56,6 +56,7 @@ notify: Restart rspamd with_items: - options.inc + - settings.conf - arc.conf - dkim_signing.conf diff --git a/roles/mail/templates/rspamd/local.d/settings.conf.j2 b/roles/mail/templates/rspamd/local.d/settings.conf.j2 new file mode 100644 index 0000000..a0a58b7 --- /dev/null +++ b/roles/mail/templates/rspamd/local.d/settings.conf.j2 @@ -0,0 +1,15 @@ +localhost_mail { + id = "localhost_mail"; + priority = high; + ip = "127.0.0.0/8"; + ip = "::1/128"; + apply { + actions { + # Disable any action for mail from localhost + reject = null; + greylist = null; + "add header" = null; + spam = null; + } + } +}