Bläddra i källkod

Increased number of Actions for each Sniffer result code to 255.

Actions 64 thru 99 by default are the milter Error action.
Actions 100 and above by default are the milter NoAction action.
Actions 63 and below are unchanged.


git-svn-id: https://svn.microneil.com/svn/SNFMilter/trunk@15 2c985dca-31e6-41a4-b4a2-d8f5b7f8e074
master
adeniz 10 år sedan
förälder
incheckning
1a3921e847
2 ändrade filer med 9 tillägg och 2 borttagningar
  1. 6
    1
      SNFMilter.cpp
  2. 3
    1
      SNFMilter.hpp

+ 6
- 1
SNFMilter.cpp Visa fil

@@ -104,7 +104,12 @@ void SNFMilterEngine::readConfiguration() {
string NewConfiguration = myRulebase->PlatformConfiguration(); // Get the latest configuration.
if(0 != RunningConfiguration.compare(NewConfiguration)) { // If it does not match, read it!
RunningConfiguration = NewConfiguration; // Capture the latest.
for(int i = 1; i < ResultCodesCount; i++) ResultActions[i] = NoAction; // Init Result/Action config.
for(int i = 1; i < ResultCodesCount; i++) { // Init Result/Action config.
if ( (i >= MinErrorResultCode) && (i <= MaxErrorResultCode) )
ResultActions[i] = Error;
else
ResultActions[i] = NoAction;
}
ResultActions[0] = Allow;
NonZeroAction = NoAction; // NoAction if no configuration for
// non-zero result.

+ 3
- 1
SNFMilter.hpp Visa fil

@@ -56,7 +56,9 @@ const string NoActionMnemonic = "6";
const string TCPMilterSocketMnemonic = "1";
const string UNIXMilterSocketMnemonic = "2";
const int ResultCodesCount = 64; // Number of valid result codes.
const int ResultCodesCount = 256; // Number of valid result codes.
const int MinErrorResultCode = 64; // Minimum result code for Error action.
const int MaxErrorResultCode = 99; // Maximum result code for Error action.
const int ConfigurationLifetime = 1000; // Config life time in ms.
const bool PrependLocalReceivedHeader = true; // True to prepend local received headers
// to the buffer to scan.

Laddar…
Avbryt
Spara