From 8f97c6a684a47ff25166c04a1b0e96e20d4b2302 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 9 Feb 2011 19:42:23 +0300 Subject: [PATCH] Polish sample config. --- conf/lua/regexp/headers.lua | 5 -- conf/lua/rspamd.lua | 22 ++++-- rspamd.xml.sample | 129 ++++++++++++++++++++++++++---------- 3 files changed, 113 insertions(+), 43 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 + diff --git a/rspamd.xml.sample b/rspamd.xml.sample index b56820b51..2226eb948 100644 --- a/rspamd.xml.sample +++ b/rspamd.xml.sample @@ -30,90 +30,151 @@ default 10.0 + reject greylist:5 add_header:5 + + + + MISSING_SUBJECT + FORGED_OUTLOOK_TAGS + FORGED_SENDER - DRUGS_MANYKINDS - ADVANCE_FEE_2 - ADVANCE_FEE_3 + SUSPICIOUS_RECIPS + FAKE_REPLY_C + MIME_HTML_ONLY - AB_SURBL_MULTI + FORGED_MSGID_YAHOO - SC_SURBL_MULTI + FORGED_MUA_THEBAT_BOUN + R_MISSING_CHARSET + RCVD_DOUBLE_IP_SPAM - OB_SURBL_MULTI + FORGED_OUTLOOK_HTML - WHITELIST_IP + R_UNDISC_RCPT - DRUGS_ANXIETY - DRUGS_MUSCLE - DRUGS_ANXIETY_EREC - PH_SURBL_MULTI + R_WHITE_ON_WHITE + HTML_SHORT_LINK_IMG_2 + FORGED_MUA_OUTLOOK - DRUGS_ERECTILE + FM_FAKE_HELO_VERIZON + REPTO_QUOTE_YAHOO + MISSING_MIMEOLE - RAMBLER_URIBL + MISSING_TO - FROM_EXCESS_BASE64 - FROM_WORLDBANK - FROM_CBR - FROM_CSHOP - FROM_MIRHOSTING - FROM_PASSIFLORA - R_SPAM_FROM_VALUEHOST + + FROM_EXCESS_BASE64 + R_MIXED_CHARSET + SORTED_RECIPS + R_RCVD_SPAMBOTS - JP_SURBL_MULTI + R_TO_SEEMS_AUTO + SUBJECT_NEEDS_ENCODING + TRACKER_ID - R_LOTTO + R_NO_SPACE_IN_FROM + R_SAJDING + R_BAD_CTE_7BIT - WS_SURBL_MULTI + R_FLASH_REDIR_IMGSHACK + INVALID_MSGID + MISSING_MID - DRUGS_DIET + FORGED_RECIPIENTS + RATWARE_MS_HASH + STOX_REPLY_TYPE + + R_IP_PBL + + ONCE_RECEIVED + + ONCE_RECEIVED_STRICT + + RECEIVED_RBL + + R_PARTS_DIFFER + + MIME_HEADER_CTYPE_ONLY + + R_EMPTY_IMAGE + + + DRUGS_MANYKINDS + + DRUGS_ANXIETY + DRUGS_MUSCLE + DRUGS_ANXIETY_EREC + DRUGS_DIET + DRUGS_ERECTILE + + + ADVANCE_FEE_2 + ADVANCE_FEE_3 + + + R_LOTTO + + BAYES_SPAM BAYES_HAM + + R_FUZZY R_FUZZY1 R_FUZZY2 R_FUZZY3 - + + R_SPF_FAIL R_SPF_SOFTFAIL R_SPF_ALLOW - - MAILLIST - R_IP_PBL + + WHITELIST_IP + + MAILLIST + + + PH_SURBL_MULTI + + OB_SURBL_MULTI + + AB_SURBL_MULTI + + SC_SURBL_MULTI + + JP_SURBL_MULTI + + WS_SURBL_MULTI - ONCE_RECEIVED - ONCE_RECEIVED_STRICT + + RAMBLER_URIBL - RECEIVED_RBL - - R_PARTS_DIFFER - MIME_HEADER_CTYPE_ONLY -- 2.39.5