diff options
author | Alexey AL <AlexeySa@users.noreply.github.com> | 2016-08-21 14:44:02 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-21 14:44:02 +0300 |
commit | 4e4876ac8d2249b7275f059b0763104a2ba4f1eb (patch) | |
tree | dde7c166c401ee4d68c57cd28d36c7380f5dd955 /rules/forwarding.lua | |
parent | 1774605d5b3966f4f53072b5a07d66b803930529 (diff) | |
download | rspamd-4e4876ac8d2249b7275f059b0763104a2ba4f1eb.tar.gz rspamd-4e4876ac8d2249b7275f059b0763104a2ba4f1eb.zip |
[Feature] Add Yandex and Mail.ru forwarding rules
Diffstat (limited to 'rules/forwarding.lua')
-rw-r--r-- | rules/forwarding.lua | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/rules/forwarding.lua b/rules/forwarding.lua index 65c5e3100..df9a97b80 100644 --- a/rules/forwarding.lua +++ b/rules/forwarding.lua @@ -45,6 +45,42 @@ rspamd_config.FWD_GOOGLE = { group = "forwarding" } +rspamd_config.FWD_YANDEX = { + callback = function (task) + if not (task:has_from(1) and task:has_recipients(1)) then + return false + end + local hostname = task:get_hostname() + if hostname and hostname:lower():find('%.yandex%.[a-z]+$') then + if task:get_header_raw('X-Yandex-Forward') then + return true + end + end + return false + end, + score = 0.0, + description = "Message was forwarded by Yandex", + group = "forwarding" +} + +rspamd_config.FWD_MAILRU = { + callback = function (task) + if not (task:has_from(1) and task:has_recipients(1)) then + return false + end + local hostname = task:get_hostname() + if hostname and hostname:lower():find('%.mail%.ru$') then + if task:get_header_raw('X-MailRu-Forward') then + return true + end + end + return false + end, + score = 0.0, + description = "Message was forwarded by Mail.ru", + group = "forwarding1" +} + rspamd_config.FWD_SRS = { callback = function (task) if not (task:has_from(1) and task:has_recipients(1)) then |