Browse Source

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

andryyy 6 năm trước cách đây
mục cha
commit
8da54e5194

+ 0 - 0
data/conf/rspamd/custom/global_from_blacklist.map → data/conf/rspamd/custom/global_mime_from_blacklist.map


+ 0 - 0
data/conf/rspamd/custom/global_from_whitelist.map → data/conf/rspamd/custom/global_mime_from_whitelist.map


+ 1 - 0
data/conf/rspamd/custom/global_smtp_from_blacklist.map

@@ -0,0 +1 @@
+# /.+example\.com/i

+ 1 - 0
data/conf/rspamd/custom/global_smtp_from_whitelist.map

@@ -0,0 +1 @@
+# /.+example\.com/i

+ 22 - 4
data/conf/rspamd/local.d/multimap.conf

@@ -34,17 +34,35 @@ LOCAL_BL_ASN {
   symbols_set = ["LOCAL_BL_ASN"];
   symbols_set = ["LOCAL_BL_ASN"];
 }
 }
 
 
-GLOBAL_FROM_WL {
+GLOBAL_SMTP_FROM_WL {
   type = "from";
   type = "from";
-  map = "$LOCAL_CONFDIR/custom/global_from_whitelist.map";
+  map = "$LOCAL_CONFDIR/custom/global_smtp_from_whitelist.map";
   regexp = true;
   regexp = true;
   prefilter = true;
   prefilter = true;
   action = "accept";
   action = "accept";
 }
 }
 
 
-GLOBAL_FROM_BL {
+GLOBAL_SMTP_FROM_BL {
   type = "from";
   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;
   regexp = true;
   prefilter = true;
   prefilter = true;
   action = "reject";
   action = "reject";