From 1f9bafd578042211ea70ea36aeffd5f289904a18 Mon Sep 17 00:00:00 2001 From: marrco <840788+marrco@users.noreply.github.com> Date: Tue, 12 Sep 2017 17:02:43 +0200 Subject: [PATCH 1/8] Temporay fix to MX values see https://github.com/mailcow/mailcow-dockerized/issues/576 --- data/conf/rspamd/local.d/metrics.conf | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/data/conf/rspamd/local.d/metrics.conf b/data/conf/rspamd/local.d/metrics.conf index 4fd0953cc..b3afa78c3 100644 --- a/data/conf/rspamd/local.d/metrics.conf +++ b/data/conf/rspamd/local.d/metrics.conf @@ -17,3 +17,20 @@ group "bayes" { description = "Message probably ham, probability: "; } } +group "MX" { + symbol "MX_INVALID" { + score = 0.5; + description = "No connectable MX"; + one_shot = "true"; + } + symbol "MX_MISSING" { + score = 2.0; + description = "No MX record"; + one_shot = "true"; + } + symbol "MX_GOOD" { + score = -0.01; + description = "MX was ok"; + one_shot = "true"; + } +} From a2720cca835651dcc32a2d1251c2307012be8b34 Mon Sep 17 00:00:00 2001 From: marrco <840788+marrco@users.noreply.github.com> Date: Wed, 13 Sep 2017 16:32:10 +0200 Subject: [PATCH 2/8] Update mx_check.conf --- data/conf/rspamd/local.d/mx_check.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/conf/rspamd/local.d/mx_check.conf b/data/conf/rspamd/local.d/mx_check.conf index 6a775a21f..22fcedf19 100644 --- a/data/conf/rspamd/local.d/mx_check.conf +++ b/data/conf/rspamd/local.d/mx_check.conf @@ -1,4 +1,4 @@ -timeout = 1.0; +timeout = 8.0; symbol_bad_mx = "MX_INVALID"; symbol_no_mx = "MX_MISSING"; symbol_good_mx = "MX_GOOD"; From 529c3bcc9c0c9f1cc7203856948a6396430c3096 Mon Sep 17 00:00:00 2001 From: marrco <840788+marrco@users.noreply.github.com> Date: Tue, 19 Sep 2017 09:19:22 +0200 Subject: [PATCH 3/8] Create composites.conf --- data/conf/rspamd/local.d/composites.conf | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/conf/rspamd/local.d/composites.conf diff --git a/data/conf/rspamd/local.d/composites.conf b/data/conf/rspamd/local.d/composites.conf new file mode 100644 index 000000000..2d2eca80f --- /dev/null +++ b/data/conf/rspamd/local.d/composites.conf @@ -0,0 +1,4 @@ +MX_IMPLICIT { + expression = "MX_GOOD and MX_MISSING"; + score = -2.0; +} From 9d611a903a8cb00cdbfc213c321decdd819aa5d4 Mon Sep 17 00:00:00 2001 From: marrco <840788+marrco@users.noreply.github.com> Date: Tue, 19 Sep 2017 09:21:36 +0200 Subject: [PATCH 4/8] Update metrics.conf --- data/conf/rspamd/local.d/metrics.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data/conf/rspamd/local.d/metrics.conf b/data/conf/rspamd/local.d/metrics.conf index b3afa78c3..9dd29fd81 100644 --- a/data/conf/rspamd/local.d/metrics.conf +++ b/data/conf/rspamd/local.d/metrics.conf @@ -33,4 +33,9 @@ group "MX" { description = "MX was ok"; one_shot = "true"; } + symbol "MX_IMPLICIT" { + score = -2.0; + description = "MX not defined but A record at apex"; + one_shot = "true"; + } } From 075284036915d94cfcaeba0b3d2c8b5955dbf1fd Mon Sep 17 00:00:00 2001 From: marrco <840788+marrco@users.noreply.github.com> Date: Tue, 19 Sep 2017 09:23:41 +0200 Subject: [PATCH 5/8] Update mx_check.conf --- data/conf/rspamd/local.d/mx_check.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/data/conf/rspamd/local.d/mx_check.conf b/data/conf/rspamd/local.d/mx_check.conf index 22fcedf19..006e6d01f 100644 --- a/data/conf/rspamd/local.d/mx_check.conf +++ b/data/conf/rspamd/local.d/mx_check.conf @@ -2,6 +2,7 @@ timeout = 8.0; symbol_bad_mx = "MX_INVALID"; symbol_no_mx = "MX_MISSING"; symbol_good_mx = "MX_GOOD"; +symbol_implicit_mx = "MX_IMPLICIT"; expire = 86400; key_prefix = "rmx"; enabled = true; From 5742e3b014fef8304d9e3ff0c9d9620380c4a7cb Mon Sep 17 00:00:00 2001 From: marrco <840788+marrco@users.noreply.github.com> Date: Tue, 19 Sep 2017 10:00:50 +0200 Subject: [PATCH 6/8] Update mx_check.conf --- data/conf/rspamd/local.d/mx_check.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/data/conf/rspamd/local.d/mx_check.conf b/data/conf/rspamd/local.d/mx_check.conf index 006e6d01f..22fcedf19 100644 --- a/data/conf/rspamd/local.d/mx_check.conf +++ b/data/conf/rspamd/local.d/mx_check.conf @@ -2,7 +2,6 @@ timeout = 8.0; symbol_bad_mx = "MX_INVALID"; symbol_no_mx = "MX_MISSING"; symbol_good_mx = "MX_GOOD"; -symbol_implicit_mx = "MX_IMPLICIT"; expire = 86400; key_prefix = "rmx"; enabled = true; From 1fb4f34046fd29b42048c35728b4fc5718b3349e Mon Sep 17 00:00:00 2001 From: marrco <840788+marrco@users.noreply.github.com> Date: Tue, 19 Sep 2017 10:04:39 +0200 Subject: [PATCH 7/8] Update metrics.conf --- data/conf/rspamd/local.d/metrics.conf | 5 ----- 1 file changed, 5 deletions(-) diff --git a/data/conf/rspamd/local.d/metrics.conf b/data/conf/rspamd/local.d/metrics.conf index 9dd29fd81..b3afa78c3 100644 --- a/data/conf/rspamd/local.d/metrics.conf +++ b/data/conf/rspamd/local.d/metrics.conf @@ -33,9 +33,4 @@ group "MX" { description = "MX was ok"; one_shot = "true"; } - symbol "MX_IMPLICIT" { - score = -2.0; - description = "MX not defined but A record at apex"; - one_shot = "true"; - } } From 68c87ce7a6558f3d0ec826bec19f209c5517725b Mon Sep 17 00:00:00 2001 From: Michael Kuron Date: Tue, 19 Sep 2017 14:12:10 +0200 Subject: [PATCH 8/8] rspamd mx_check: composite symbol overrides individual scores --- data/conf/rspamd/local.d/composites.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/conf/rspamd/local.d/composites.conf b/data/conf/rspamd/local.d/composites.conf index 2d2eca80f..e895fb0fa 100644 --- a/data/conf/rspamd/local.d/composites.conf +++ b/data/conf/rspamd/local.d/composites.conf @@ -1,4 +1,4 @@ MX_IMPLICIT { expression = "MX_GOOD and MX_MISSING"; - score = -2.0; + score = -0.01; }