From 8cdb454941be870e66a16faace68863695343fda Mon Sep 17 00:00:00 2001
From: Stephen L Johnson <sjohnson@monsters.org>
Date: Mon, 31 May 1999 19:10:23 +0000
Subject: [PATCH] Initial import

---
 src/lib/Spong/Network/plugins/check_imap | 10 ++++++++++
 src/lib/Spong/Network/plugins/check_nntp | 10 ++++++++++
 src/lib/Spong/Network/plugins/check_smtp | 10 ++++++++++
 3 files changed, 30 insertions(+)
 create mode 100755 src/lib/Spong/Network/plugins/check_imap
 create mode 100755 src/lib/Spong/Network/plugins/check_nntp
 create mode 100755 src/lib/Spong/Network/plugins/check_smtp

diff --git a/src/lib/Spong/Network/plugins/check_imap b/src/lib/Spong/Network/plugins/check_imap
new file mode 100755
index 0000000..b2d19cb
--- /dev/null
+++ b/src/lib/Spong/Network/plugins/check_imap
@@ -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
index 0000000..7464588
--- /dev/null
+++ b/src/lib/Spong/Network/plugins/check_nntp
@@ -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
index 0000000..d95ad1b
--- /dev/null
+++ b/src/lib/Spong/Network/plugins/check_smtp
@@ -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;
-- 
2.30.2