diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/lua/whitelist.lua | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/plugins/lua/whitelist.lua b/src/plugins/lua/whitelist.lua index 0f4c41f85..7a196ec89 100644 --- a/src/plugins/lua/whitelist.lua +++ b/src/plugins/lua/whitelist.lua @@ -22,10 +22,14 @@ function check_whitelist (task) -- check client's from domain local from = task:get_from() if from then - local _,_,domain = string.find(from, '@(.+)>?$') - local key = h:get_key(domain) - if key then - task:insert_result(symbol_from, 1) + local from_addr = from[1]['addr'] + + if from_addr then + local _,_,domain = string.find(from_addr, '@(.+)>?$') + local key = h:get_key(domain) + if key then + task:insert_result(symbol_from, 1) + end end end end |