Author: felicity
Date: Sat Jan 24 10:07:38 2004
New Revision: 6258
Modified:
incubator/spamassassin/trunk/spamd/README
incubator/spamassassin/trunk/spamd/spamd.raw
Log:
bug 2858: add a "PING" protocol command to spamd which allows for remote
monitoring to see if spamd is alive without it complaining there was no
message sent.
Modified: incubator/spamassassin/trunk/spamd/README
==============================================================================
--- incubator/spamassassin/trunk/spamd/README (original)
+++ incubator/spamassassin/trunk/spamd/README Sat Jan 24 10:07:38 2004
@@ -220,6 +220,8 @@
SKIP -- Ignore this message -- client opened connection then changed its mind
+PING -- Return a confirmation that spamd is alive.
+
PROCESS -- Process this message as described above and return modified message
CHECK command returns just a header (terminated by "\r\n\r\n") with the first
@@ -266,6 +268,16 @@
REPORT_IFSPAM returns the same as REPORT if the message is spam, or nothing at
all if the message is non-spam.
+
+The PING command does not actually trigger any spam checking, and (as with
+SKIP) no additional input is expected. It returns a simple confirmation
+response, like this:
+
+SPAMD/1.2 0 PONG
+
+This facility may be useful for monitoring programs which wish to check that
+the daemon is alive and providing at least a basic response within a reasonable
+time frame.
Shared Library
Modified: incubator/spamassassin/trunk/spamd/spamd.raw
==============================================================================
--- incubator/spamassassin/trunk/spamd/spamd.raw (original)
+++ incubator/spamassassin/trunk/spamd/spamd.raw Sat Jan 24 10:07:38 2004
@@ -583,6 +583,11 @@
check ($1, $2, $start);
}
+ elsif (/PING SPAMC\/(.*)/)
+ {
+ print $client "SPAMD/1.2 $resphash{EX_OK} PONG\r\n";
+ return 0;
+ }
# If it was none of the above, then we don't know what it was.
else
Date: Sat Jan 24 10:07:38 2004
New Revision: 6258
Modified:
incubator/spamassassin/trunk/spamd/README
incubator/spamassassin/trunk/spamd/spamd.raw
Log:
bug 2858: add a "PING" protocol command to spamd which allows for remote
monitoring to see if spamd is alive without it complaining there was no
message sent.
Modified: incubator/spamassassin/trunk/spamd/README
==============================================================================
--- incubator/spamassassin/trunk/spamd/README (original)
+++ incubator/spamassassin/trunk/spamd/README Sat Jan 24 10:07:38 2004
@@ -220,6 +220,8 @@
SKIP -- Ignore this message -- client opened connection then changed its mind
+PING -- Return a confirmation that spamd is alive.
+
PROCESS -- Process this message as described above and return modified message
CHECK command returns just a header (terminated by "\r\n\r\n") with the first
@@ -266,6 +268,16 @@
REPORT_IFSPAM returns the same as REPORT if the message is spam, or nothing at
all if the message is non-spam.
+
+The PING command does not actually trigger any spam checking, and (as with
+SKIP) no additional input is expected. It returns a simple confirmation
+response, like this:
+
+SPAMD/1.2 0 PONG
+
+This facility may be useful for monitoring programs which wish to check that
+the daemon is alive and providing at least a basic response within a reasonable
+time frame.
Shared Library
Modified: incubator/spamassassin/trunk/spamd/spamd.raw
==============================================================================
--- incubator/spamassassin/trunk/spamd/spamd.raw (original)
+++ incubator/spamassassin/trunk/spamd/spamd.raw Sat Jan 24 10:07:38 2004
@@ -583,6 +583,11 @@
check ($1, $2, $start);
}
+ elsif (/PING SPAMC\/(.*)/)
+ {
+ print $client "SPAMD/1.2 $resphash{EX_OK} PONG\r\n";
+ return 0;
+ }
# If it was none of the above, then we don't know what it was.
else