From: Andrew Lewis Date: Thu, 4 Aug 2016 13:51:12 +0000 (+0100) Subject: [Fix] SpamAssassin plugin: support check_freemail_header('EnvelopeFrom', [..]) X-Git-Tag: 1.3.2~43^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=db8cb55bd6e001c735be65008621273fbdf81a88;p=rspamd.git [Fix] SpamAssassin plugin: support check_freemail_header('EnvelopeFrom', [..]) --- diff --git a/src/plugins/lua/spamassassin.lua b/src/plugins/lua/spamassassin.lua index 618cae410..cf17aa247 100644 --- a/src/plugins/lua/spamassassin.lua +++ b/src/plugins/lua/spamassassin.lua @@ -307,7 +307,13 @@ local function gen_eval_rule(arg) end if arg then - local h = task:get_header(arg) + local h + if arg == 'EnvelopeFrom' then + h = task:get_from('smtp') + if h then h = h[1]['addr'] end + else + h = task:get_header(arg) + end if h then local hdr_freemail = freemail_search(string.lower(h))