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/lua/rspamd.lua | |
parent | 849a4e522197e7bbfcb0c29ca62026e10a2a6361 (diff) | |
download | rspamd-8f97c6a684a47ff25166c04a1b0e96e20d4b2302.tar.gz rspamd-8f97c6a684a47ff25166c04a1b0e96e20d4b2302.zip |
Polish sample config.
Diffstat (limited to 'conf/lua/rspamd.lua')
-rw-r--r-- | conf/lua/rspamd.lua | 22 |
1 files changed, 18 insertions, 4 deletions
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 + |