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.

INSTALL 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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. The plugin uses the SNFServer results to calculate a plugin score.
  17. For SpamAssassin with a version of 3.2.0 or later, this plugin score
  18. is added to the SpamAssassin score for the message.
  19. If the SpamAssassin version is earlier than 3.2.0, then the plugin
  20. compares the plugin score to plugin score threshold. If the plugin
  21. score is greater than or equal to the plugin score threshold, then a
  22. static score is added to the SpamAssassin score for the message. Both
  23. the plugin score threshold and static score are specified in the
  24. configuration file.
  25. Plugin Configuration Settings
  26. -----------------------------
  27. The plugin file (snf4sa.cf) contains required lines that:
  28. 1) Configures SpamAssassin to load the plugin.
  29. 2) Describes the plugin.
  30. 3) Configures SpamAssassin to add the X-Spam-SNF-Result header to
  31. the email. This header contains the results of the SNF scan.
  32. In addition, there are lines that can be configured by the user that
  33. specifies:
  34. 1) Which emails to process through SNFServer.
  35. 2) The relationship between SNFServer results and the plugin score.
  36. You can specify the value added to or subtracted from the
  37. SpamAssasin score for each SNFServer result. You can also specify
  38. whether SpamAssasin should abort further processing for eacn
  39. SNFServer result.
  40. 3) The relationship between the GBUdb results and the plugin score.
  41. The GBUdb probability p and confidence c add the following value to
  42. the SpamAssasin score:
  43. abs(p * c) ^ 0.5 * sign(p) * MaxWeight
  44. where sign(p) is -1 if p < 0, and +1 otherwise, and MaxWeight is
  45. specified in a configuration line. MaxWeight is greater than or
  46. equal to zero. If MaxWeight isn't specified in the configuration
  47. file, then the GBUdb results don't affect the plugin score.
  48. 4) The plugin score threshold and static score (used only if the
  49. SpamAssassin version is earlier than 3.2.0).
  50. To specify which emails to process, use a line similar to:
  51. full SNF4SA eval:snf4sa_sacheck()
  52. The above line specifies that all emails be processed. Please see the
  53. SpamAssassin documentation for other options.
  54. To specify the relationship between the SNFServer results and the
  55. plugin score, enter zero or more lines with the format:
  56. snf_result NN sa_score S short_circuit_[yes|no]
  57. where NN specifies the SNFServer result, and S is the plugin score for
  58. that SNFServer result. [yes|no] is "yes" if further scanning should
  59. be skipped if SNFServer returns the result specified by NN, or "no" if
  60. further scanning should not be skipped. NN can be a combination of a
  61. series of one or more integers, and a range of integers specified by
  62. N-M, where N and M are integers. The "short_circuit_[yes|no]" is
  63. optional, and the default value for [yes|no] is "no" (which specifies
  64. that SpamAssasin continue scanning).
  65. NOTE: There must not be any space when specifying a range of integers.
  66. For example, specify "34-43" rather than the incorrect "34 - 43".
  67. For example:
  68. snf_result 63 sa_score 2.5 short_circuit_no
  69. causes the plugin to add 2.5 to the plugin score if SNFServer returns
  70. 63 (which in the default SNFServer configuration corresponds to
  71. "caution").
  72. Another example:
  73. snf_result 45 47-62 sa_score 5.0 short_circuit_yes
  74. causes the plugin to add 5.0 to the plugin score and stop further
  75. processing if SNFServer returns 45 or 47 thru 62.
  76. Final example:
  77. snf_result 1 sa_score -5.0
  78. causes the plugin to subtract 5.0 from the plugin score. SpamAssassin
  79. continues to process the email.
  80. If SNFServer returns a result that isn't specified, then the plugin
  81. adds zero to the plugin score.
  82. The following line specifies the MaxWeight parameter:
  83. GBUdb_max_weight MaxWeight
  84. where MaxWeight is the value to specified. For example,
  85. GBUdb_max_weight 3.0
  86. specifies a MaxWeight value of 3.0.
  87. For SpamAssassin with version earlier than 3.2.0
  88. ------------------------------------------------
  89. The following line specifies the plugin score threshold:
  90. pre_3.2_plugin_score_threshold Threshold
  91. where Threshold is the value to specified. For example:
  92. pre_3.2_plugin_score_threshold 1.1
  93. causes the static score to be added if the plugin score is equal to or
  94. greater than 1.1.
  95. The following line specifies the static score:
  96. score SNF4SA Score
  97. where Score is the static score to add to the SpamAssassin score for
  98. the message. For example:
  99. score SNF4SA 8.0
  100. specifies a static score of 8.0. If the SpamAssassin version is
  101. earlier than 3.2.0, and the plugin score is equal to or greater than
  102. the plugin score threshold, then a value of 8.0 would be added to the
  103. SpamAssassin score for the message.
  104. Debugging the configuration
  105. ---------------------------
  106. The configuration can be tested by running
  107. spamassassin --lint
  108. This outputs a message if any line in in the configuration file cannot
  109. be parsed, along with the offending line.
  110. In order to obtain more detailed information, run
  111. spamassassin -D --lint
  112. This command outputs information about why a line could not be parsed.
  113. The output includes a great deal of other debugging information; you
  114. can filter the information relevant to this plugin like this:
  115. spamassassin -D --lint 2>&1 | grep snf4sa