]> source.dussan.org Git - rspamd.git/commitdiff
[Feature] support for CommuniGate Pro self-generated messages 2224/head
authorAndrey Igoshin <ai@vsu.ru>
Sun, 6 May 2018 13:35:37 +0000 (16:35 +0300)
committerAndrey Igoshin <ai@vsu.ru>
Sun, 6 May 2018 13:35:37 +0000 (16:35 +0300)
conf/cgp.inc [new file with mode: 0644]
conf/options.inc
conf/rspamd.conf
utils/cgp_rspamd.pl

diff --git a/conf/cgp.inc b/conf/cgp.inc
new file mode 100644 (file)
index 0000000..fd71fa5
--- /dev/null
@@ -0,0 +1,11 @@
+arc {
+    sign_networks = [127.2.4.7];
+}
+
+dkim_signing {
+    sign_networks = [127.2.4.7];
+}
+
+options {
+    local_addrs = [127.2.4.7];
+}
index 9238cca3c3f3640abba075ead3859e88bad360f2..f374fe76cf2b7d3c5fc192589bf0e202abcb8e14 100644 (file)
@@ -40,5 +40,5 @@ words_decay = 200;
 rrd = "${DBDIR}/rspamd.rrd";
 
 # Local networks
-local_addrs = "192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, fd00::/8, 169.254.0.0/16, fe80::/10";
+local_addrs = [192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, fd00::/8, 169.254.0.0/16, fe80::/10];
 hs_cache_dir = "${DBDIR}/";
index e340eb08f9859bfec442896f107dc904a65ff27f..115fa54037d0a3676b44339c48f0a7169b3d0df8 100644 (file)
@@ -24,6 +24,9 @@ options {
     .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/options.inc"
 }
 
+.include(try=true; duplicate=merge) "$CONFDIR/cgp.inc"
+.include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/cgp.inc"
+
 logging {
     type = "file";
     filename = "$LOGDIR/rspamd.log";
index 986c0804ede644ee9fe2b87345980e1465225fbc..5a4bd109afe7bc65b9ba0953b41648071ecc0a74 100644 (file)
@@ -209,6 +209,12 @@ sub rspamd_scan {
               $ip = $2;
             }
           }
+          elsif ( $elt =~ /^S (?:<([^>]+)> )?(?:DSN|GROUP|LIST|PBX|PIPE|RULE) \[0\.0\.0\.0\]/ ) {
+            if ($1) {
+              $user = $1;
+            }
+            $ip = '127.2.4.7';
+          }
         }
 
         my $headers = {};