Browse Source

[Minor] Convert from rspamd_text

tags/1.6.2
Vsevolod Stakhov 7 years ago
parent
commit
011de521fb
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/plugins/lua/greylist.lua

+ 2
- 2
src/plugins/lua/greylist.lua View File

task:insert_result(settings['symbol'], 0.0, 'greylisted', end_time) task:insert_result(settings['symbol'], 0.0, 'greylisted', end_time)


local ua = task:get_request_header('User-Agent') or '' local ua = task:get_request_header('User-Agent') or ''
if ua == 'rspamc' then return end -- Likely rspamc scan
if tostring(ua) == 'rspamc' then return end -- Likely rspamc scan


if settings.message_func then if settings.message_func then
task:set_pre_result('soft reject', task:set_pre_result('soft reject',


local ua = task:get_request_header('User-Agent') or '' local ua = task:get_request_header('User-Agent') or ''
local is_rspamc = false local is_rspamc = false
if ua == 'rspamc' then is_rspamc = true end
if tostring(ua) == 'rspamc' then is_rspamc = true end


if is_whitelisted then if is_whitelisted then
if action == 'greylist' then if action == 'greylist' then

Loading…
Cancel
Save