Package: hobbit-plugins Version: 20080705 Severity: wishlist Tags: patch Hi,
I wrote a simple plugin to check if the local postfix has soft_bounce enabled in its configuration. --- begin /usr/lib/hobbit/client/ext/sftbnc --- #!/usr/bin/perl -w # Copyright (C) 2007, 2008 Christoph Berg <m...@debian.org> # Copyright (C) 2010 Axel Beckert <a...@debian.org> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"), to deal in the Software without # restriction, including without limitation the rights to use, # copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following # conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES # OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. use strict; use IPC::Open3; use Hobbit; $ENV{'PATH'} = '/bin:/sbin:/usr/bin:/usr/sbin'; $ENV{'LC_ALL'} = 'C'; delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; my $bb = new Hobbit('sftbnc'); open(MAIN, '<', '/etc/postfix/main.cf') or die "Can't open /etc/postfix/main.cf: $!"; my $softbounce = 0; while ($_ = <MAIN>) { next if /^\#/; $softbounce = 1 if /^\s*soft_bounce\s*=\s*yes\b/i; } close(MAIN); $bb->print("\n"); $bb->color_line($softbounce ? 'yellow' : 'green', "Postfix soft_bounce is ".($softbounce ? 'on' : 'off')); $bb->send; --- end /usr/lib/hobbit/client/ext/sftbnc --- --- begin /etc/hobbit/clientlaunch.d/sftbnc.cfg --- [sftbnc] #DISABLED ENVFILE /etc/hobbit/hobbitclient.cfg CMD $HOBBITCLIENTHOME/ext/sftbnc LOGFILE /var/log/hobbit/hobbitclient.log INTERVAL 5m --- end /etc/hobbit/clientlaunch.d/sftbnc.cfg --- -- System Information: Debian Release: 5.0.4 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.26-2-amd64 (SMP w/1 CPU core) Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Shell: /bin/sh linked to /bin/bash Versions of packages hobbit-plugins depends on: ii hobbit-client 4.2.0.dfsg-14lenny3 client for the Hobbit network moni Versions of packages hobbit-plugins recommends: ii lsof 4.78.dfsg.1-4 List open files Versions of packages hobbit-plugins suggests: ii fping 2.4b2-to-ipv6-15 sends ICMP ECHO_REQUEST packets to pn ipmitool <none> (no description available) pn libdbd-pg-perl <none> (no description available) pn libnet-irc-perl <none> (no description available) ii ntp 1:4.2.4p4+dfsg-8lenny3 Network Time Protocol daemon and u -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org