diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-08-21 16:27:57 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-08-21 16:28:37 +0100 |
commit | accb853f83625bcb993113dc10938a197a551acd (patch) | |
tree | 0b233487d6f9791f2ad5f8ea1b859ba48b6f0148 /src/plugins/lua/dmarc.lua | |
parent | beb43bc463f33fa2c5ba5efeae7d4d1cb6fea3d1 (diff) | |
download | rspamd-accb853f83625bcb993113dc10938a197a551acd.tar.gz rspamd-accb853f83625bcb993113dc10938a197a551acd.zip |
[Fix] Disable DMARC for local/authorized mail
Diffstat (limited to 'src/plugins/lua/dmarc.lua')
-rw-r--r-- | src/plugins/lua/dmarc.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua index 3e72a4d30..c9444b23d 100644 --- a/src/plugins/lua/dmarc.lua +++ b/src/plugins/lua/dmarc.lua @@ -55,7 +55,12 @@ end local function dmarc_callback(task) local from = task:get_from(2) local dmarc_domain + local ip_addr = task:get_ip() + if task:get_user() or (ip_addr and ip_addr:is_local()) then + rspamd_logger.infox(task, "skip SPF checks for local networks and authorized users"); + return + end if from and from[1] and from[1]['domain'] and not from[2] then dmarc_domain = rspamd_util.get_tld(from[1]['domain']) else |