home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / xampp-win32-1.6.7-installer.exe / MercuryMail / transflt.mer < prev    next >
Text File  |  2007-12-20  |  5KB  |  94 lines

  1. # Transaction-level filtering expressions for MercuryS
  2. # Mercury Mail Transport System, Copyright (c) 1993-2007, David Harris.
  3. # This version of the file was prepared for Mercury/32 v4.5
  4. #
  5. # Each line in this file defines a test that MercuryS should apply at various
  6. # stages of the SMTP transaction processing phase of mail delivery. Each line
  7. # has the following general format:
  8. #
  9. #   <Operation>, <"Expression">, <Action>[Action]>, ["Response"]
  10. #
  11. # "operation" can be:
  12. #
  13. #    'H' for an expression applied to the client's "HELO" greeting
  14. #    'D' for deferred HELO processing; these filters will only be
  15. #        applied if the client does not issue a successful AUTH after
  16. #        issuing HELO but before issuing any other command. Otherwise,
  17. #        these filters are the same as 'H' filters. They allow a user
  18. #        on a system that might otherwise be rejected to redeem the
  19. #        connection by authenticating his identity.
  20. #    'S' for an expression applied to the subject line of the message
  21. #    'R' for an expression applied to each SMTP RCPT command
  22. #    'M' for an expression applied to the SMTP MAIL FROM: command
  23. #
  24. # "Expression" is a Mercury regular expression - see the Mercury help on
  25. # mail filtering rules or content control for the format of a Mercury
  26. # extended regular expression. The expression must be quoted, and is
  27. # applied to the entire HELO command.
  28. #
  29. # Action is one or more characters indicating the action MercuryS should
  30. # take when the expression is matched: the first character in the action
  31. # can be one of the following:
  32. #
  33. #    'R' to refuse the transaction and block all subsequent commands
  34. #    'F' to fail the current command only (allow further attempts)
  35. #    'D' to drop the connection immediately with no error response
  36. #    'B' to issue an error response then drop the connection immediately.
  37. #    'L' to log a system message
  38. #    'X' to stop this phase of transaction filtering for this message
  39. #    'S' to suppress all transaction filtering stages for this message.      
  40. #
  41. # The difference between 'R' and 'F' is that 'R' will cause all subsequent
  42. # delivery commands in the session to be refused, while 'F' will only fail
  43. # the current command - other commands may still be permitted.
  44. #
  45. # The 'D' and 'B' commands essentially do the same thing, but the 'B'
  46. # command does it more politely. Use 'B' if there's any possibility that
  47. # the connected machine is actually legitimate, because it gives at least
  48. # some level of feedback to the sender or administrator.
  49. #
  50. # To understand the difference between 'X' and 'S', you need to be aware
  51. # that transaction filtering is done in several "passes", each pass testing
  52. # a different state of the SMTP transaction. The 'X' action only exits from
  53. # the current pass, meaning that future passes will still take place. The
  54. # 'S' action, however, exits from the current pass and suppresses all
  55. # further transaction filtering on the message altogether.
  56. #
  57. # The second character in the action string is optional and can have
  58. # one of the following values:
  59. #
  60. #    'S' to blacklist the host for the next half hour
  61. #
  62. # The third character in the action string is optional and can have
  63. # one of the following values:
  64. #
  65. #    'N' if the rule should apply only if the expression does NOT match
  66. #
  67. # Note that optional characters can have the value '-' if they are not
  68. # used... So, if you want to refuse a connection if an expression does not
  69. # match, but do not want to use short term blacklisting, you would use the
  70. # action string "R-N".
  71. #
  72. # "Response" is an optional response code that MercuryS should return to
  73. # the client (for the 'R' action) or the string to log as the system
  74. # message (for the 'L' action). It must be quoted, and if it is returned
  75. # as an error response to the client, then it must start with a 3-digit
  76. # RFC2821 error response code (we recommend 554 for this).
  77.  
  78.  
  79. # ------------- Sample Rules --------------------------------------------
  80. # The rules below are examples you can use to get a feel for writing your
  81. # own. They are harmless, and will cause no problems if you leave them in
  82. # place, but it's probably better to remove them when you add your own
  83. # rules.
  84.  
  85. H, "*192.156.225.44*", R, "554 Get out of here, you worthless scumbag."
  86. R, "*honeypot@aphrodite.pmail.gen.nz*", RS, "554 Fraudulent RCPT rejected."
  87. S, "*viagra*", D, "'Viagra' encountered in subject line - connection dropped."
  88. S, "*vicodin*", R, "554 'Vicodin' encountered in subject line - message refused."
  89. H, "[EHeh][EHeh]LO +[0-9]+.[0-9]+.[0-9]+.[0-9]*", R, "554 Invalid HELO format"
  90.  
  91. S, "/c*CONGRATULATIONS*WON*", BS, "554 Possibly Nigerian 419 Variant - please change and re-send."
  92. S, "*for job*", BS, "554 Possibly employment spam - please change and re-send."
  93.  
  94.