summaryrefslogtreecommitdiffstats
path: root/rules/forwarding.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-03-12 10:06:22 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-03-12 10:06:22 +0000
commit25a45b7f2bef43394f9df53116dc5d7bda714ec8 (patch)
tree6f005e00936209cca556837e066bdd2ce9704f4c /rules/forwarding.lua
parent8e131ae06c65d064394673875d1884a0ea22fcc3 (diff)
downloadrspamd-25a45b7f2bef43394f9df53116dc5d7bda714ec8.tar.gz
rspamd-25a45b7f2bef43394f9df53116dc5d7bda714ec8.zip
[Minor] Slightly improve forwarded rule
Diffstat (limited to 'rules/forwarding.lua')
-rw-r--r--rules/forwarding.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/rules/forwarding.lua b/rules/forwarding.lua
index 002c9df7a..a5367173f 100644
--- a/rules/forwarding.lua
+++ b/rules/forwarding.lua
@@ -116,11 +116,11 @@ rspamd_config.FORWARDED = {
local to = task:get_recipients(2)
local matches = 0
-- Retrieve and loop through all Received headers
- local rcvds = task:get_header_full('Received')
+ local rcvds = task:get_received_headers()
if rcvds then
for _, rcvd in ipairs(rcvds) do
- local _,_,addr = rcvd['decoded']:lower():find("%sfor%s<(.-)>")
+ local _,_,addr = rcvd['for']
if addr then
matches = matches + 1
-- Check that it doesn't match the envrcpt