You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rspamd.lua 967B

1234567891011121314151617181920212223242526
  1. -- This is main lua config file for rspamd
  2. config['regexp'] = {}
  3. dofile('regexp/headers.lua')
  4. dofile('regexp/lotto.lua')
  5. dofile('regexp/fraud.lua')
  6. dofile('regexp/drugs.lua')
  7. local reconf = config['regexp']
  8. -- Uncategorized rules
  9. local html_length_1024_1536 = 'has_content_part_len(\'text\', \'html\', 1024, 1536)'
  10. local html_link_image = '/<img /iPr'
  11. reconf['HTML_SHORT_LINK_IMG_2'] = string.format('(%s) & (%s)', html_length_1024_1536, html_link_image)
  12. -- Local rules
  13. local r_bgcolor = '/BGCOLOR=/iM'
  14. local r_font_color = '/font color=[\\"\']?\\#FFFFFF[\\"\']?/iM'
  15. reconf['R_WHITE_ON_WHITE'] = string.format('(!(%s) & (%s))', r_bgcolor, r_font_color)
  16. reconf['R_FLASH_REDIR_IMGSHACK'] = '/^(?:http:\\/\\/)?img\\d{1,5}\\.imageshack\\.us\\/\\S+\\.swf/U'
  17. local r_rcvd_from_valuehost = 'Received=/\\sb0\\.valuehost\\.ru/H'
  18. local r_cyr_phone = '/8 \\(\\xD799\\)/P'
  19. reconf['R_SPAM_FROM_VALUEHOST'] = string.format('(%s) & (%s)', r_rcvd_from_valuehost, r_cyr_phone)