NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
PHP 49% JavaScript 35% HTML 9% CSS 4% Shell 2% Python 1% Lua 0% Perl 0% Ruby 0% SCSS 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git

Commit

[Web, Rspamd] Add bad language map, add map to mailcow UI

58a00cf7
andryyy <[email protected]> 7 years ago
data/conf/rspamd/custom/bad_languages.map | 1 +
 data/conf/rspamd/local.d/multimap.conf    | 9 +++++++++
 data/web/inc/vars.inc.php                 | 2 +-
 3 files changed, 11 insertions(+), 1 deletion(-)
 create mode 100644 data/conf/rspamd/custom/bad_languages.map

Diff

diff --git a/data/conf/rspamd/custom/bad_languages.map b/data/conf/rspamd/custom/bad_languages.map
new file mode 100644
index 00000000..cf9ce3e1
--- /dev/null
+++ b/data/conf/rspamd/custom/bad_languages.map
@@ -0,0 +1 @@
+# Regex! /de/ will also match /de_at/ etc.
diff --git a/data/conf/rspamd/local.d/multimap.conf b/data/conf/rspamd/local.d/multimap.conf
index 8e07628c..ca8e9ead 100644
--- a/data/conf/rspamd/local.d/multimap.conf
+++ b/data/conf/rspamd/local.d/multimap.conf
@@ -127,3 +127,12 @@ BAD_WORDS_DE {
   regexp = true;
   score = 0.1;
 }
+
+BAD_LANG {
+  type = 'selector';
+  selector = 'languages';
+  map = "${LOCAL_CONFDIR}/custom/bad_languages.map";
+  symbols_set = ["LANG_FILTER"];
+  regexp = true;
+  score = 5.0;
+}
diff --git a/data/web/inc/vars.inc.php b/data/web/inc/vars.inc.php
index 2256bc6d..891318aa 100644
--- a/data/web/inc/vars.inc.php
+++ b/data/web/inc/vars.inc.php
@@ -165,5 +165,5 @@ $RSPAMD_MAPS = array(
   'Recipient Whitelist' => 'global_rcpt_whitelist.map',
   'Fishy TLDS (only fired in combination with bad words)' => 'fishy_tlds.map',
   'Bad Words (only fired in combination with fishy TLDs)' => 'bad_words.map',
-  'Bad Words DE (only fired in combination with fishy TLDs)' => 'bad_words_de.map'
+  'Bad languages' => 'bad_languages.map',
 );