From: Vsevolod Stakhov Date: Tue, 5 Apr 2016 17:50:54 +0000 (+0100) Subject: [Fix] Fix rfc2369 maillists detection X-Git-Tag: 1.2.3~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41a715a7018ba3474ee339eb506bc8732d31059d;p=thirdparty%2Frspamd.git [Fix] Fix rfc2369 maillists detection --- diff --git a/src/plugins/lua/maillist.lua b/src/plugins/lua/maillist.lua index d2069ec4db..c8515f199f 100644 --- a/src/plugins/lua/maillist.lua +++ b/src/plugins/lua/maillist.lua @@ -168,16 +168,12 @@ end -- RFC 2369 headers local function check_rfc2369(task) - local header = task:get_header('List-Id') - if not header then - return false - end header = task:get_header('List-Unsubscribe') - if not header or not string.find(header, '^^<.+>$') then + if not header or not string.find(header, '<.+>') then return false end - header = task:get_header('List-Subscribe') - if not header or not string.find(header, '^^<.+>$') then + header = task:get_header('List-Post') + if not header or not string.find(header, '<.+>') then return false end @@ -187,7 +183,7 @@ end -- RFC 2919 headers local function check_rfc2919(task) local header = task:get_header('List-Id') - if not header or not string.find(header, '^<.+>$') then + if not header or not string.find(header, '<.+>') then return false end @@ -203,7 +199,7 @@ local function check_ml_googlegroup(task) if not header then header = task:get_header('X-Google-Group-Id') - + if not header then return false end