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

[Rspamd] Split global wl from to mime-from and smtp-from

8da54e51
andryyy <[email protected]> 7 years ago
...lacklist.map => global_mime_from_blacklist.map} |  0
 ...hitelist.map => global_mime_from_whitelist.map} |  0
 .../rspamd/custom/global_smtp_from_blacklist.map   |  1 +
 .../rspamd/custom/global_smtp_from_whitelist.map   |  1 +
 data/conf/rspamd/local.d/multimap.conf             | 26 ++++++++++++++++++----
 5 files changed, 24 insertions(+), 4 deletions(-)
 rename data/conf/rspamd/custom/{global_from_blacklist.map => global_mime_from_blacklist.map} (100%)
 rename data/conf/rspamd/custom/{global_from_whitelist.map => global_mime_from_whitelist.map} (100%)
 create mode 100644 data/conf/rspamd/custom/global_smtp_from_blacklist.map
 create mode 100644 data/conf/rspamd/custom/global_smtp_from_whitelist.map

Diff

diff --git a/data/conf/rspamd/custom/global_from_blacklist.map b/data/conf/rspamd/custom/global_mime_from_blacklist.map
similarity index 100%
rename from data/conf/rspamd/custom/global_from_blacklist.map
rename to data/conf/rspamd/custom/global_mime_from_blacklist.map
diff --git a/data/conf/rspamd/custom/global_from_whitelist.map b/data/conf/rspamd/custom/global_mime_from_whitelist.map
similarity index 100%
rename from data/conf/rspamd/custom/global_from_whitelist.map
rename to data/conf/rspamd/custom/global_mime_from_whitelist.map
diff --git a/data/conf/rspamd/custom/global_smtp_from_blacklist.map b/data/conf/rspamd/custom/global_smtp_from_blacklist.map
new file mode 100644
index 00000000..3c872889
--- /dev/null
+++ b/data/conf/rspamd/custom/global_smtp_from_blacklist.map
@@ -0,0 +1 @@
+# /.+example\.com/i
diff --git a/data/conf/rspamd/custom/global_smtp_from_whitelist.map b/data/conf/rspamd/custom/global_smtp_from_whitelist.map
new file mode 100644
index 00000000..3c872889
--- /dev/null
+++ b/data/conf/rspamd/custom/global_smtp_from_whitelist.map
@@ -0,0 +1 @@
+# /.+example\.com/i
diff --git a/data/conf/rspamd/local.d/multimap.conf b/data/conf/rspamd/local.d/multimap.conf
index 47eca4ff..7752b813 100644
--- a/data/conf/rspamd/local.d/multimap.conf
+++ b/data/conf/rspamd/local.d/multimap.conf
@@ -34,17 +34,35 @@ LOCAL_BL_ASN {
   symbols_set = ["LOCAL_BL_ASN"];
 }
 
-GLOBAL_FROM_WL {
+GLOBAL_SMTP_FROM_WL {
   type = "from";
-  map = "$LOCAL_CONFDIR/custom/global_from_whitelist.map";
+  map = "$LOCAL_CONFDIR/custom/global_smtp_from_whitelist.map";
   regexp = true;
   prefilter = true;
   action = "accept";
 }
 
-GLOBAL_FROM_BL {
+GLOBAL_SMTP_FROM_BL {
   type = "from";
-  map = "$LOCAL_CONFDIR/custom/global_from_blacklist.map";
+  map = "$LOCAL_CONFDIR/custom/global_smtp_from_blacklist.map";
+  regexp = true;
+  prefilter = true;
+  action = "reject";
+}
+
+GLOBAL_MIME_FROM_WL {
+  type = "header";
+  header = "from";
+  map = "$LOCAL_CONFDIR/custom/global_mime_from_whitelist.map";
+  regexp = true;
+  prefilter = true;
+  action = "accept";
+}
+
+GLOBAL_MIME_FROM_BL {
+  type = "header";
+  header = "from";
+  map = "$LOCAL_CONFDIR/custom/global_mime_from_blacklist.map";
   regexp = true;
   prefilter = true;
   action = "reject";