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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. SpamAssassin SNF4SA Plugin for SNFServer
  2. Installation and Configuration
  3. Copyright (C) 2009 ARM Research Labs, LLC.
  4. See www.armresearch.com for the copyright terms.
  5. Installing SpamAssassin SNF4SA plugin for SNFServer involves the
  6. following steps:
  7. 1) Copy snf4sa.pm and snf4sa.cf to /etc/mail/spamassassin .
  8. 2) Edit /etc/mail/spamassassin/snf4sa.cf plugin configuration file
  9. to meet your needs. See below for a description of the
  10. configuration settings.
  11. The module writes the email message to a temporary file in
  12. /tmp/snf4sa. If this directory doesn't exist, the script creates it
  13. with permission 777. This allows both the script and SNFServer to
  14. write to that directory. If that directory already exists, ensure
  15. that it has a permission of 777.
  16. Plugin Configuation Settings
  17. ----------------------------
  18. The plugin file (snf4sa.cf) contains required lines that:
  19. 1) Configures SpamAssassin to load the plugin.
  20. 2) Describes the plugin.
  21. 3) Configures SpamAssassin to add the X-Spam-SNF-Result header to
  22. the email. This header contains the results of the SNF scan.
  23. In addition, there are lines that can be configured by the user that
  24. specifies:
  25. 1) Which emails to process through SNFServer.
  26. 2) The relationship between SNFServer results and the SpamAssassin
  27. score. You can specify the value added to or subtracted from the
  28. SpamAssasin score for each SNFServer result. You can also specify
  29. whether SpamAssasin should abort further processing for eacn
  30. SNFServer result.
  31. 3) The relationship between the GBUdb results and the SpamAssassin
  32. score. The GBUdb probability p and confidence c add the following
  33. value to the SpamAssasin score:
  34. (p * c) ^ 2 * sign(p) * MaxWeight
  35. where sign(p) is -1 if p < 0, and +1 otherwise, and MaxWeight is
  36. specified on a configuration line. MaxWeight is greater than or
  37. equal to zero.
  38. To specify which emails to process, use a line similar to:
  39. full SNF4SA eval:snf4sa_sacheck()
  40. The above line specifies that all emails be processed. Please see the
  41. SpamAssassin documentation for other options.
  42. To specify the relationship between the SNFServer results and the
  43. SpamAssassin score, enter zero or more lines with the format:
  44. snf_result NN sa_score S short_circuit_[yes|no]
  45. where NN specifies the SNFServer result, and S is the SpamAssassin
  46. score for that SNFServer result. [yes|no] is "yes" if further
  47. scanning should be skipped if SNFServer returns the result specified
  48. by NN, or "no" if further scanning should not be skipped. NN can be a
  49. combination of a series of one or more integers, and a range of
  50. integers specified by N-M, where N and M are integers. The
  51. "short_circuit_[yes|no]" is optional, and the default value for
  52. [yes|no] is "no" (which specifies that SpamAssasin continue scanning).
  53. NOTE: There must not be any space when specifying a range of integers.
  54. For example, specify "34-43" rather than the incorrect "34 - 43".
  55. For example:
  56. snf_result 63 sa_score 2.5 short_circuit_no
  57. causes the plugin to add 2.5 to the SpamAssassin score if SNFServer
  58. returns 63 (which in the default SNFServer configuration corresponds
  59. to "caution").
  60. Another example:
  61. snf_result 45 47-62 sa_score 5.0 short_circuit_yes
  62. causes the plugin to add 5.0 to the SpamAssassin score and stop
  63. further processing if SNFServer returns 45 or 47 thru 62.
  64. Final example:
  65. snf_result 1 sa_score -5.0
  66. causes the plugin to subtract 5.0 from the SpamAssassin score.
  67. SpamAssassin continues to process the email.
  68. If SNFServer returns a result that isn't specified, then the plugin
  69. adds zero to the SpamAssassin score.
  70. The following line specifies the MaxWeight parameter:
  71. GBUdb_max_weight MaxWeight
  72. where MaxWeight is the value to specify. For example,
  73. GBUdb_max_weight 3.0
  74. specifies a MaxWeight value of 3.0.
  75. Debugging the configuration
  76. ---------------------------
  77. The configuration can be tested by running
  78. spamassassin --lint
  79. This outputs a message if any line in in the configuration file cannot
  80. be parsed, along with the offending line.
  81. In order to obtain more detailed information, run
  82. spamassassin -D --lint
  83. This command outputs information about why a line could not be parsed.
  84. The output includes a great deal of other debugging information; you
  85. can filter the information relevant to this plugin like this:
  86. spamassassin -D --lint 2>&1 | grep snf4sa