Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

upstream_spam_filters.lua 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. --[[
  2. Copyright (c) 2011-2016, Vsevolod Stakhov <vsevolod@highsecure.ru>
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. ]]--
  13. -- Rules for upstream services that have already run spam checks
  14. local reconf = config['regexp']
  15. reconf['PRECEDENCE_BULK'] = {
  16. re = 'Precedence=/bulk/Hi',
  17. score = 0.0,
  18. description = "Message marked as bulk",
  19. group = 'upstream_spam_filters'
  20. }
  21. reconf['MICROSOFT_SPAM'] = {
  22. -- https://technet.microsoft.com/en-us/library/dn205071(v=exchg.150).aspx
  23. re = 'X-Forefront-Antispam-Report=/SFV:SPM/H',
  24. score = 4.0,
  25. description = "Microsoft says the message is spam",
  26. group = 'upstream_spam_filters'
  27. }
  28. reconf['AOL_SPAM'] = {
  29. re = 'X-AOL-Global-Disposition=/^S/H',
  30. score = 5.0,
  31. description = "AOL says this message is spam",
  32. group = 'upstream_spam_filters'
  33. }
  34. reconf['KLMS_SPAM'] = {
  35. re = 'X-KLMS-AntiSpam-Status=/^spam/H',
  36. score = 5.0,
  37. description = "Kaspersky Security for Mail Server says this message is spam",
  38. group = 'upstream_spam_filters'
  39. }
  40. reconf['SPAM_FLAG'] = {
  41. re = string.format('%s || %s || %s',
  42. 'X-Spam-Flag=/^(?:yes|true)/Hi',
  43. 'X-Spam=/^(?:yes|true)/Hi',
  44. 'X-Spam-Status=/^(?:yes|true)/Hi'),
  45. score = 5.0,
  46. description = "Message was already marked as spam",
  47. group = 'upstream_spam_filters'
  48. }
  49. reconf['UNITEDINTERNET_SPAM'] = {
  50. re = 'X-UI-Out-Filterresults=/^junk:/H',
  51. score = 5.0,
  52. description = "United Internet says this message is spam",
  53. group = 'upstream_spam_filters'
  54. }