Browse Source

Update default configs.

tags/0.7.0
Vsevolod Stakhov 9 years ago
parent
commit
7c5fd966bf
3 changed files with 7 additions and 7 deletions
  1. 3
    3
      conf/lua/regexp/headers.lua
  2. 3
    3
      conf/lua/rspamd.lua
  3. 1
    1
      src/rdns

+ 3
- 3
conf/lua/regexp/headers.lua View File



reconf['FORGED_GENERIC_RECEIVED4'] = 'Received=/^\\s*(.+\\n)*from localhost by \\S+;\\s+\\w{3}, \\d+ \\w{3} 20\\d\\d \\d\\d\\:\\d\\d\\:\\d\\d [+-]\\d\\d\\d0[\\s\\r\\n]*$/X' reconf['FORGED_GENERIC_RECEIVED4'] = 'Received=/^\\s*(.+\\n)*from localhost by \\S+;\\s+\\w{3}, \\d+ \\w{3} 20\\d\\d \\d\\d\\:\\d\\d\\:\\d\\d [+-]\\d\\d\\d0[\\s\\r\\n]*$/X'


reconf['FORGED_GENERIC_RECEIVED5'] = function (task)
rspamd_config.FORGED_GENERIC_RECEIVED5 = function (task)
local regexp_text = '^\\s*from \\[(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})\\].*\\n(.+\\n)*\\s*from \\1 by \\S+;\\s+\\w{3}, \\d+ \\w{3} 20\\d\\d \\d\\d\\:\\d\\d\\:\\d\\d [+-]\\d\\d\\d0$' local regexp_text = '^\\s*from \\[(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})\\].*\\n(.+\\n)*\\s*from \\1 by \\S+;\\s+\\w{3}, \\d+ \\w{3} 20\\d\\d \\d\\d\\:\\d\\d\\:\\d\\d [+-]\\d\\d\\d0$'
local re = regexp.get_cached(regexp_text) local re = regexp.get_cached(regexp_text)
if not re then re = regexp.create(regexp_text, 'i') end if not re then re = regexp.create(regexp_text, 'i') end


reconf['INVALID_POSTFIX_RECEIVED'] = 'Received=/ \\(Postfix\\) with ESMTP id [A-Z\\d]+([\\s\\r\\n]+for <\\S+?>)?;[\\s\\r\\n]*[A-Z][a-z]{2}, \\d{1,2} [A-Z][a-z]{2} \\d\\d\\d\\d \\d\\d:\\d\\d:\\d\\d [\\+\\-]\\d\\d\\d\\d$/X' reconf['INVALID_POSTFIX_RECEIVED'] = 'Received=/ \\(Postfix\\) with ESMTP id [A-Z\\d]+([\\s\\r\\n]+for <\\S+?>)?;[\\s\\r\\n]*[A-Z][a-z]{2}, \\d{1,2} [A-Z][a-z]{2} \\d\\d\\d\\d \\d\\d:\\d\\d:\\d\\d [\\+\\-]\\d\\d\\d\\d$/X'


reconf['INVALID_EXIM_RECEIVED'] = function (task)
rspamd_config.INVALID_EXIM_RECEIVED = function (task)
local checked = 0 local checked = 0
local headers_to = task:get_message():get_header('To') local headers_to = task:get_message():get_header('To')
if headers_to then if headers_to then
return false return false
end end


reconf['INVALID_EXIM_RECEIVED2'] = function (task)
rspamd_config.INVALID_EXIM_RECEIVED2 = function (task)
local checked = 0 local checked = 0
local headers_to = task:get_message():get_header('To') local headers_to = task:get_message():get_header('To')
if headers_to then if headers_to then

+ 3
- 3
conf/lua/rspamd.lua View File

-- Different text parts -- Different text parts
reconf['R_PARTS_DIFFER'] = 'compare_parts_distance(50)'; reconf['R_PARTS_DIFFER'] = 'compare_parts_distance(50)';


reconf['R_EMPTY_IMAGE'] = function (task)
rspamd_config.R_EMPTY_IMAGE = function (task)
parts = task:get_text_parts() parts = task:get_text_parts()
if parts then if parts then
for _,part in ipairs(parts) do for _,part in ipairs(parts) do
end end


-- Date issues -- Date issues
reconf['DATE_IN_FUTURE'] = function(task)
rspamd_config.DATE_IN_FUTURE = function(task)
if rspamd_config:get_api_version() >= 5 then if rspamd_config:get_api_version() >= 5 then
local m = task:get_message() local m = task:get_message()
local dm = m:get_date() local dm = m:get_date()
return false return false
end end
reconf['DATE_IN_PAST'] = function(task)
rspamd_config.DATE_IN_PAST = function(task)
if rspamd_config:get_api_version() >= 5 then if rspamd_config:get_api_version() >= 5 then
local m = task:get_message() local m = task:get_message()
local dm = m:get_date() local dm = m:get_date()

+ 1
- 1
src/rdns

Subproject commit 40d4eb2ad845643fe6a949f98042bb14c1ea24ba
Subproject commit 221f5b4d44b9ad288c218dc0a241220742b3a7dc

Loading…
Cancel
Save