From 41a715a7018ba3474ee339eb506bc8732d31059d Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 5 Apr 2016 18:50:54 +0100 Subject: [PATCH] [Fix] Fix rfc2369 maillists detection --- src/plugins/lua/maillist.lua | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/plugins/lua/maillist.lua b/src/plugins/lua/maillist.lua index d2069ec4d..c8515f199 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 -- 2.39.5