diff options
author | Andrey Igoshin <ai@vsu.ru> | 2018-05-06 16:35:37 +0300 |
---|---|---|
committer | Andrey Igoshin <ai@vsu.ru> | 2018-05-06 16:35:37 +0300 |
commit | 8d637ed84fc810ddc4eac93f682fbeb1094a9a01 (patch) | |
tree | 4d8c9a52fe52245b58e1c56ff91dc67d9797ffae | |
parent | a3191bd7b34d3373d151827a6e6592ea82084747 (diff) | |
download | rspamd-8d637ed84fc810ddc4eac93f682fbeb1094a9a01.tar.gz rspamd-8d637ed84fc810ddc4eac93f682fbeb1094a9a01.zip |
[Feature] support for CommuniGate Pro self-generated messages
-rw-r--r-- | conf/cgp.inc | 11 | ||||
-rw-r--r-- | conf/options.inc | 2 | ||||
-rw-r--r-- | conf/rspamd.conf | 3 | ||||
-rw-r--r-- | utils/cgp_rspamd.pl | 6 |
4 files changed, 21 insertions, 1 deletions
diff --git a/conf/cgp.inc b/conf/cgp.inc new file mode 100644 index 000000000..fd71fa5a6 --- /dev/null +++ b/conf/cgp.inc @@ -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]; +} diff --git a/conf/options.inc b/conf/options.inc index 9238cca3c..f374fe76c 100644 --- a/conf/options.inc +++ b/conf/options.inc @@ -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}/"; diff --git a/conf/rspamd.conf b/conf/rspamd.conf index e340eb08f..115fa5403 100644 --- a/conf/rspamd.conf +++ b/conf/rspamd.conf @@ -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"; diff --git a/utils/cgp_rspamd.pl b/utils/cgp_rspamd.pl index 986c0804e..5a4bd109a 100644 --- a/utils/cgp_rspamd.pl +++ b/utils/cgp_rspamd.pl @@ -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 = {}; |