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.

SNF4SA_INSTALL 6.2KB

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