diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-02-09 19:42:23 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-02-09 19:42:23 +0300 |
commit | 8f97c6a684a47ff25166c04a1b0e96e20d4b2302 (patch) | |
tree | ff152b4de9c0993294316b6c61afe7da6ace1852 /conf | |
parent | 849a4e522197e7bbfcb0c29ca62026e10a2a6361 (diff) | |
download | rspamd-8f97c6a684a47ff25166c04a1b0e96e20d4b2302.tar.gz rspamd-8f97c6a684a47ff25166c04a1b0e96e20d4b2302.zip |
Polish sample config.
Diffstat (limited to 'conf')
-rw-r--r-- | conf/lua/regexp/headers.lua | 5 | ||||
-rw-r--r-- | conf/lua/rspamd.lua | 22 |
2 files changed, 18 insertions, 9 deletions
diff --git a/conf/lua/regexp/headers.lua b/conf/lua/regexp/headers.lua index 9a40995f1..85208b982 100644 --- a/conf/lua/regexp/headers.lua +++ b/conf/lua/regexp/headers.lua @@ -164,11 +164,6 @@ local from_yahoo_com = 'From=/\\@yahoo\\.com\\b/iH' reconf['FORGED_MSGID_YAHOO'] = string.format('(%s) & !(%s)', at_yahoo_msgid, from_yahoo_com) local r_from_yahoo_groups = 'From=/rambler.ru\\@returns\\.groups\\.yahoo\\.com\\b/iH' local r_from_yahoo_groups_ro = 'From=/ro.ru\\@returns\\.groups\\.yahoo\\.com\\b/iH' -reconf['FROM_CBR'] = 'From=/\\@cbr\\.ru\\b/iH' -reconf['FROM_CSHOP'] = 'From=/\\@cshop\\.ru\\b/iH' -reconf['FROM_MIRHOSTING'] = 'From=/\\@mirhosting\\.com\\b/iH' -reconf['FROM_PASSIFLORA'] = 'From=/\\@passiflora\\.ru\\b/iH' -reconf['FROM_WORLDBANK'] = 'From=/\\@worldbank\\.org\\b/iH' -- Forged The Bat! MUA headers local thebat_mua_v1 = 'X-Mailer=/^The Bat! \\(v1\\./H' diff --git a/conf/lua/rspamd.lua b/conf/lua/rspamd.lua index bd04beab4..2f337aa9f 100644 --- a/conf/lua/rspamd.lua +++ b/conf/lua/rspamd.lua @@ -20,9 +20,23 @@ local r_bgcolor = '/BGCOLOR=/iP' local r_font_color = '/font color=[\\"\']?\\#FFFFFF[\\"\']?/iP' reconf['R_WHITE_ON_WHITE'] = string.format('(!(%s) & (%s))', r_bgcolor, r_font_color) reconf['R_FLASH_REDIR_IMGSHACK'] = '/^(?:http:\\/\\/)?img\\d{1,5}\\.imageshack\\.us\\/\\S+\\.swf/U' -local r_rcvd_from_valuehost = 'Received=/\\sb0\\.valuehost\\.ru/H' -local r_cyr_phone = '/8 \\(\\xD799\\)/P' -reconf['R_SPAM_FROM_VALUEHOST'] = string.format('(%s) & (%s)', r_rcvd_from_valuehost, r_cyr_phone) -- Different text parts -reconf['R_PARTS_DIFFER'] = 'compare_parts_distance(70)'; +reconf['R_PARTS_DIFFER'] = 'compare_parts_distance(85)'; + +reconf['R_EMPTY_IMAGE'] = function (task) + parts = task:get_text_parts() + if parts then + for _,part in ipairs(parts) do + if part:is_empty() then + images = task:get_images() + if images then + return true + end + return false + end + end + end + return false +end + |