summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-04-05 18:50:54 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-04-05 18:50:54 +0100
commit41a715a7018ba3474ee339eb506bc8732d31059d (patch)
tree0b5b77f6ceb31a53aaf382eec6881229d6beb91b /src
parent48a1be2cd19f795b2bd26cc061cdc8655e098248 (diff)
downloadrspamd-41a715a7018ba3474ee339eb506bc8732d31059d.tar.gz
rspamd-41a715a7018ba3474ee339eb506bc8732d31059d.zip
[Fix] Fix rfc2369 maillists detection
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/maillist.lua14
1 files 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