]> git.etc.gen.nz Git - spong.git/commitdiff
Initial revision
authorStephen L Johnson <sjohnson@monsters.org>
Mon, 31 May 1999 19:10:23 +0000 (19:10 +0000)
committerStephen L Johnson <sjohnson@monsters.org>
Mon, 31 May 1999 19:10:23 +0000 (19:10 +0000)
src/lib/Spong/Network/plugins/check_imap [new file with mode: 0755]
src/lib/Spong/Network/plugins/check_nntp [new file with mode: 0755]
src/lib/Spong/Network/plugins/check_smtp [new file with mode: 0755]

diff --git a/src/lib/Spong/Network/plugins/check_imap b/src/lib/Spong/Network/plugins/check_imap
new file mode 100755 (executable)
index 0000000..b2d19cb
--- /dev/null
@@ -0,0 +1,10 @@
+# Register function with the plugin registry
+$PLUGINS{'imap'} = \&check_imap;
+
+# Check the imap service with the built-in check_simple routine
+sub check_imap {
+    my ($host) = @_;
+    return &check_simple( $host, 143, "", "OK", "imap" );
+}
+
+1;
diff --git a/src/lib/Spong/Network/plugins/check_nntp b/src/lib/Spong/Network/plugins/check_nntp
new file mode 100755 (executable)
index 0000000..7464588
--- /dev/null
@@ -0,0 +1,10 @@
+# Register function with the plugin registry
+$PLUGINS{'nntp'} = \&check_nntp;
+
+# Check the nntp service with the built-in check_simple routine
+sub check_nntp {
+    my ($host) = @_;
+    return &check_simple( $host, 119, "", "^\s*200", "nntp" );
+}
+
+1;
diff --git a/src/lib/Spong/Network/plugins/check_smtp b/src/lib/Spong/Network/plugins/check_smtp
new file mode 100755 (executable)
index 0000000..d95ad1b
--- /dev/null
@@ -0,0 +1,10 @@
+# Register function with the plugin registry
+$PLUGINS{'smtp'} = \&check_smtp;
+
+# Check the smtp service with the built-in check_simple routine
+sub check_smtp {
+    my ($host) = @_;
+    return &check_simple( $host, 25, "", "^\s*220", "smtp" );
+}
+
+1;