aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-09-22 20:53:30 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-09-22 20:53:30 +0100
commit3638ca67bdeb181c9ed7b4598933c2655846c280 (patch)
tree5cffbd978b86934f646e9371e2acb0bd791c3e1c /src
parent1171b24a822280d0b04b7a5ed952c83034e19664 (diff)
downloadrspamd-3638ca67bdeb181c9ed7b4598933c2655846c280.tar.gz
rspamd-3638ca67bdeb181c9ed7b4598933c2655846c280.zip
[Fix] External_relay: Restore the originating hostname check
Issue: #4272
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/external_relay.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/lua/external_relay.lua b/src/plugins/lua/external_relay.lua
index 841eca32f..9f65490e9 100644
--- a/src/plugins/lua/external_relay.lua
+++ b/src/plugins/lua/external_relay.lua
@@ -159,6 +159,11 @@ strategies.hostname_map = function(rule)
return
end
+ if not hostname_map:get_key(from_hn) then
+ lua_util.debugm(N, task, 'sender\'s hostname (%s) is not a relay', from_hn)
+ return
+ end
+
local rcvd_hdrs = task:get_received_headers()
-- Try find sending hostname in Received headers
for _, rcvd in ipairs(rcvd_hdrs) do