new dovecot monitor
authorJamie Cameron <jcameron@webmin.com>
Fri, 5 Jun 2009 16:31:36 +0000 (16:31 +0000)
committerJamie Cameron <jcameron@webmin.com>
Fri, 5 Jun 2009 16:31:36 +0000 (16:31 +0000)
status/CHANGELOG
status/dovecot-monitor.pl [new file with mode: 0644]
status/lang/en

index 7c497bd..870a1b4 100644 (file)
@@ -62,3 +62,4 @@ Added an option to the FTP status monitor to make a TLS encrypted connection. Re
 Added a tooltip to status icons to show the hostname.
 ---- Changes since 1.470 ----
 Corrected the domain for AT&T SMS emails.
+Added a new monitor type for Dovecot.
diff --git a/status/dovecot-monitor.pl b/status/dovecot-monitor.pl
new file mode 100644 (file)
index 0000000..5135247
--- /dev/null
@@ -0,0 +1,18 @@
+# Monitor the Dovecot server on this host
+
+sub get_dovecot_status
+{
+local ($serv, $mod) = @_;
+return { 'up' => -1 } if (!&foreign_check($mod));
+&foreign_require($mod);
+local $r = &foreign_call($mod, "is_dovecot_running");
+if ($r > 0) {
+       return { 'up' => 1 };
+       }
+else {
+       return { 'up' => 0 };
+       }
+}
+
+1;
+
index f5f3090..ec776bf 100644 (file)
@@ -56,6 +56,7 @@ type_webmin=Webmin Webserver
 type_cfengine=Configuration Engine Daemon
 type_memory=Free Memory
 type_proftpd=ProFTPD Server
+type_dovecot=Dovecot IMAP/POP3 Server
 type_mailserver=Mailserver Response
 type_sshd=SSH Server
 type_raid=RAID Device Status