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.conf.sample 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. # Sample config file for rspamd
  2. # $Id$
  3. #
  4. # pidfile - path to pid file
  5. # Default: pidfile = /var/run/rspamd.pid
  6. pidfile = "./rspamd.pid";
  7. # Number of workers to process connections
  8. # Default: 1
  9. workers = 1;
  10. # Socket for accepting mail to filter, can be unix socket if begin with '/'
  11. # (bind_socket=/var/run/rspamd.sock for example)
  12. bind_socket = localhost:11333;
  13. # Settings for controller interface
  14. control {
  15. # Bind socket for control interface
  16. bind_socket = localhost:11334;
  17. # Password for privilleged commands
  18. password = "q1";
  19. };
  20. # Sample metric definition
  21. metric {
  22. # Name of metric
  23. name = "testmetric";
  24. # Score to count message as spam by this metric
  25. required_score = 10.1;
  26. };
  27. # Logging settings
  28. logging {
  29. # Log type can be: console, syslog and file
  30. log_type = console;
  31. # Log level can be: DEBUG, INFO, WARN and ERROR
  32. log_level = DEBUG;
  33. # Log facility specifies facility for syslog logging, see syslog (3) for details
  34. # log_facility = "LOG_MAIL";
  35. # Log file is used with log type "file"
  36. # log_file = "/var/log/rspamd.log"
  37. };
  38. # Limit for statfile pool size
  39. # Default: 100M
  40. statfile_pool_size = 40M;
  41. # Sample statfile definition
  42. statfile {
  43. # Alias is used for learning and is used as symbol
  44. alias = "test.spam";
  45. # Pattern is path to file, can include %r - recipient name and %f - mail from value
  46. pattern = "./test.spam";
  47. # Weight in spam/ham classifier
  48. weight = 1.0;
  49. # Size of this statfile class
  50. size = 10M;
  51. # Tokenizer for this statfile
  52. # Deafault: osb-text
  53. tokenizer = "osb-text";
  54. };
  55. statfile {
  56. alias = "test.ham";
  57. pattern = "./test.ham";
  58. weight = -2.0;
  59. size = 10M;
  60. };
  61. # Factors coefficients
  62. factors {
  63. "SURBL_MULTI" = 10.5;
  64. "winnow" = 5.5;
  65. };
  66. # Options for lmtp worker
  67. lmtp {
  68. enabled = yes;
  69. # Bind socket for lmtp interface
  70. bind_socket = localhost:11335;
  71. # Metric that is considered as main. If we have spam result on
  72. # this metric, lmtp delivery would be failed
  73. metric = "default";
  74. # Number of lmtp workers
  75. workers = 1;
  76. };
  77. delivery {
  78. enabled = yes;
  79. # Path to delivery agent, %f is expanded as mail from address and %r
  80. # is expanded as recipient address
  81. # Expample: agent = "/usr/local/bin/procmail -f %f -d %r"
  82. agent = "/dev/null";
  83. # Bind socket for lmtp interface
  84. # Example: bind_socket = localhost:25
  85. # Whether we should use lmtp for MTA delivery
  86. lmtp = no;
  87. };
  88. # SURBL module params, note that single quotes are mandatory here
  89. .module 'surbl' {
  90. # Address to redirector in host:port format
  91. redirector = "localhost:8080";
  92. # Connect timeout for redirector
  93. redirector_connect_timeout = "1s";
  94. # IO timeout for redirector (may be usefull to set this value rather big)
  95. redirector_read_timeout = "10s";
  96. # This is suffix for surbl dns requests,
  97. # %b is replaced with bit metric if it is found
  98. suffix_%b_SURBL_MULTI = "multi.surbl.org";
  99. # Bits that are used to determine specific URI black list
  100. # details are at http://www.surbl.org/lists.html#multi
  101. # sytax is: bit_{number} = "SYMBOL"
  102. bit_2 = "SC"; # sc.surbl.org
  103. bit_4 = "WS"; # ws.surbl.org
  104. bit_8 = "PH"; # ph.surbl.org
  105. bit_16 = "OB"; # ob.surbl.org
  106. bit_32 = "AB"; # ab.surbl.org
  107. bit_64 = "JP"; # jp.surbl.org
  108. # Metric for surbl module
  109. metric = "default";
  110. # List of public known hostings (for which we should use 3 components of domain name instead of 2)
  111. hostings = "narod.ru,pp.ru,org.ru,net.ru";
  112. # Whitelisted urls
  113. whitelist = "highsecure.ru,freebsd.org";
  114. };
  115. $to_blah = "To=/\"blah@blah\"/H";
  116. $from_blah = "From=/blah@blah/H";
  117. $subject_blah = "Subject=/blah/H";
  118. .module 'regexp' {
  119. BLAH_SYMBOL = "${to_blah} & !(${from_blah} | ${subject_blah})";
  120. };
  121. url_filters = "surbl";
  122. header_filters = "regexp";