From 481f09c2cacf4db1d881514ea863c135f8bd19c0 Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 14 Sep 2018 01:30:33 +0200 Subject: Parametrise spamd definition --- conf.d/010_main.conf | 4 ++++ conf.d/020_acl.conf | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'conf.d') diff --git a/conf.d/010_main.conf b/conf.d/010_main.conf index 4dde142..5ad88ab 100644 --- a/conf.d/010_main.conf +++ b/conf.d/010_main.conf @@ -32,6 +32,10 @@ acl_smtp_dkim = acl_mta_dkim # spamd_address = 127.0.0.1 783 # spamd_address = 127.0.0.1 11333 variant=rspamd +.ifdef SPAMD_ADDRESS +spamd_address = SPAMD_ADDRESS +.endif + # If Exim is compiled with support for TLS, you may want to enable the # following options so that Exim allows clients to make encrypted diff --git a/conf.d/020_acl.conf b/conf.d/020_acl.conf index 6c978b1..2ae207c 100644 --- a/conf.d/020_acl.conf +++ b/conf.d/020_acl.conf @@ -142,12 +142,19 @@ acl_mta_rcpt: accept +.ifdef SPAMD_ADDRESS +SCAN_SPAM = yes +.else +SCAN_SPAM = no +.endif + acl_mta_data: deny set acl_m_msg = Maximum allowed line length is 998 octets, got $max_received_linelength. condition = ${if > {$max_received_linelength}{998}} - warn spam = nobody:true/defer_ok + warn condition = SCAN_SPAM + spam = nobody:true/defer_ok remove_header = x-spam-bar : x-spam-score : x-spam-report : x-spam-status add_header = X-Spam-Score: $spam_score ($spam_bar) add_header = X-Spam-Report: $spam_report -- cgit v1.2.3