From: Anton Yuzhaninov Date: Sat, 8 Aug 2020 09:27:42 +0000 (+0100) Subject: [Minor] Update headers used by subscribe.ru X-Git-Tag: 2.6~163^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2a7b9b37d54a6d52d12e459237513c66ce853019;p=rspamd.git [Minor] Update headers used by subscribe.ru Notably Precedence header no longer used and web links use https. While here improve style. --- diff --git a/src/plugins/lua/maillist.lua b/src/plugins/lua/maillist.lua index 252cdd436..79c457662 100644 --- a/src/plugins/lua/maillist.lua +++ b/src/plugins/lua/maillist.lua @@ -122,45 +122,39 @@ local function check_ml_mailman(task) end -- Subscribe.ru --- Precedence: normal --- List-Id: <.*.subscribe.ru> --- List-Help: --- List-Subscribe: --- List-Unsubscribe: --- List-Archive: --- List-Owner: +-- List-Id: <*.subscribe.ru> +-- List-Help: +-- List-Subscribe: +-- List-Unsubscribe: +-- List-Archive: +-- List-Owner: -- List-Post: NO local function check_ml_subscriberu(task) -- List-Id local header = task:get_header('list-id') - if not header or not string.find(header, '^<.*%.subscribe%.ru>$') then - return false - end - -- Precedence - header = task:get_header('precedence') - if not header or not string.match(header, '^normal$') then + if not (header and header:find('^<.*%.subscribe%.ru>$')) then return false end -- Other headers header = task:get_header('list-archive') - if not header or not string.find(header, '^$') then + if not (header and header:find('^$')) then return false end header = task:get_header('list-owner') - if not header or not string.find(header, '^$') then + if not (header and header:find('^$')) then return false end header = task:get_header('list-help') - if not header or not string.find(header, '^$') then + if not (header and header:find('^$')) then return false end -- Subscribe and unsubscribe header = task:get_header('list-subscribe') - if not header or not string.find(header, '^$') then + if not (header and header:find('^$')) then return false end header = task:get_header('list-unsubscribe') - if not header or not string.find(header, '^$') then + if not (header and header:find('^$')) then return false end