Skip to content

Commit

Permalink
[Fix] External_relay: Restore the originating hostname check
Browse files Browse the repository at this point in the history
Issue: #4272
  • Loading branch information
vstakhov committed Sep 22, 2022
1 parent 1171b24 commit 3638ca6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/plugins/lua/external_relay.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3638ca6

Please sign in to comment.