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.

regexp.conf 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. .include(duplicate=append,priority=0) "{= env.TESTDIR =}/configs/plugins.conf"
  2. regexp {
  3. SA_BODY_WORD_BOUNDARY_ON_NEWLINE {
  4. re = '/\bhello\s/{sa_body}',
  5. score = 0.0,
  6. description = 'Test if word boundary works correctly on sa_body regexes',
  7. group = 'body',
  8. }
  9. SA_BODY_WORD {
  10. re = '/hello/{sa_body}',
  11. score = 0.0,
  12. description = 'Test if regex works at all in sa_body',
  13. group = 'body',
  14. }
  15. SA_BODY_WORD_WITH_NEWLINE {
  16. re = '/helloworld/{sa_body}',
  17. score = 0.0,
  18. description = 'Test if regex matches word separated with newline (should not work!)',
  19. group = 'body',
  20. }
  21. SA_BODY_WORD_WITH_SPACE {
  22. re = '/hello world/{sa_body}',
  23. score = 0.0,
  24. description = 'Test if regex matches word separated with newline (should work - newline is replaced with space)',
  25. group = 'body',
  26. }
  27. SA_BODY_WORD_WITH_SPACE_BOUNDARIES {
  28. re = '/\bhello world\b/{sa_body}',
  29. score = 0.0,
  30. description = 'Test if regex matches word separated with newline (should work - newline is replaced with space)',
  31. group = 'body',
  32. }
  33. SA_BODY_WORD_WITH_SPACE_BOUNDARIES_2 {
  34. re = '/\shello\sworld\s/{sa_body}',
  35. score = 0.0,
  36. description = 'Test if regex matches word separated with newline (should work - newline is replaced with space)',
  37. group = 'body',
  38. }
  39. SA_BODY_WORD_WITH_SPACE_BOUNDARIES_3 {
  40. re = '/\shello\sworld\sthis\s/{sa_body}',
  41. score = 0.0,
  42. description = 'Test if regex matches word separated with newline (should work - newline is replaced with space)',
  43. group = 'body',
  44. }
  45. SA_BODY_WORD_WITH_SPACE_AND_DOT {
  46. re = '/\bword\.\sagain\b/{sa_body}',
  47. score = 0.0,
  48. description = 'Test if regex matches word separated with newline (should work - newline is replaced with space)',
  49. group = 'body',
  50. }
  51. }
  52. options {
  53. dynamic_conf = "{= env.TESTDIR =}/configs/dynamic.conf";
  54. }
  55. dmarc { }
  56. spf { }
  57. dkim { }
  58. modules {
  59. path = "{= env.TESTDIR =}/../../src/plugins/lua/"
  60. }
  61. lua = "{= env.TESTDIR =}/lua/regex_test.lua"