--- etbemon-1.3.2.orig/alert.d/mailxmpp.alert +++ etbemon-1.3.2/alert.d/mailxmpp.alert @@ -1,14 +1,18 @@ #!/usr/bin/perl use strict; +use BSD::Resource; # -# mail.alert - Mail alert for mon +# mailxmpp.alert - Mail and xmpp alert for mon # # The first line from STDIN is summary information, adequate to send # to a pager or email subject line. # # -f from@addr.x set the smtp envelope "from" address +# -x destination xmpp address +# -m destination smtp address # # Jim Trocki, trockij@arctic.org +# XMPP added by Russell Coker russell@coker.com.au # # $Id: mail.alert,v 1.3 2005/04/17 07:42:26 trockij Exp $ # @@ -28,7 +32,8 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -my $RCSID='$Id: mail.alert,v 1.3 2005/04/17 07:42:26 trockij Exp $'; +setrlimit(RLIMIT_CPU, 5, 5) or die "Can't set CPU time limit to 5 seconds"; + use Getopt::Std; use Text::Wrap; --- etbemon-1.3.2.orig/debian/changelog +++ etbemon-1.3.2/debian/changelog @@ -1,4 +1,21 @@ -etbemon (1.3.2-0) UNRELEASED; urgency=medium +etbemon (1.3.2-3) unstable; urgency=medium + + * Make smtpswaks.monitor use long form swaks arguments for ease of searching + the man page + * Made mailxmpp.alert set a CPU time limit + + -- Russell Coker Mon, 01 Jan 2018 15:25:22 +1100 + +etbemon (1.3.2-2) unstable; urgency=medium + + * Conflict with mon-contrib (<= 1.0+dfsg-3+nmu1), Closes: #876088 + * Use dh_installsystemd to comply with latest debhelper, Closes: #878850 + * Recommends libtimedate-perl for imap test + * Added support for authentication to smtpswaks.monitorm, for relay tests. + + -- Russell Coker Thu, 07 Dec 2017 01:57:42 +1100 + +etbemon (1.3.2-1) unstable; urgency=medium * Made http.monitor use strict and made it not give an error if the server doesn't close the connection after sending the data. @@ -22,7 +39,7 @@ and not display processes using less than 5% CPU. * Made mailxmpp.alert use TLS for XMPP - -- Russell Coker Sat, 12 Aug 2017 17:35:30 +1000 + -- Russell Coker Sun, 17 Sep 2017 16:19:34 +1000 etbemon (1.3.1-1) unstable; urgency=medium --- etbemon-1.3.2.orig/debian/control +++ etbemon-1.3.2/debian/control @@ -13,9 +13,9 @@ Package: mon Architecture: any Depends: mon-client (>= 1.2.0), libtime-period-perl, adduser, ${shlibs:Depends}, ${misc:Depends} -Recommends: fping, libauthen-pam-perl, libfilesys-df-perl, libnet-perl, libnet-dns-perl, libnet-ldap-perl, libnet-telnet-perl, libsnmp-perl, libstatistics-descriptive-perl, libtime-parsedate-perl, libcrypt-ssleay-perl, libmail-imapclient-perl, swaks, libcgi-pm-perl, bc, libproc-processtable-perl +Recommends: fping, libauthen-pam-perl, libfilesys-df-perl, libnet-perl, libnet-dns-perl, libnet-ldap-perl, libnet-telnet-perl, libsnmp-perl, libstatistics-descriptive-perl, libtime-parsedate-perl, libcrypt-ssleay-perl, libmail-imapclient-perl, libtimedate-perl, swaks, libcgi-pm-perl, bc, libproc-processtable-perl Suggests: mon-contrib -Conflicts: mon-contrib (<= 1.0+dfsg-3) +Conflicts: mon-contrib (<= 1.0+dfsg-3+nmu1) Description: monitor hosts/services/whatever and alert about problems "mon" is a tool for monitoring the availability of services. Services may be network-related, environmental conditions, or anything that can --- etbemon-1.3.2.orig/debian/rules +++ etbemon-1.3.2/debian/rules @@ -2,7 +2,7 @@ #export DH_VERBOSE=1 %: - dh $@ --with systemd + dh $@ override_dh_auto_clean: dh_auto_clean @@ -19,6 +19,7 @@ chmod +x $(CURDIR)/debian/mon/usr/lib/mon/mon.d/*.monitor chmod +x $(CURDIR)/debian/mon/usr/lib/mon/mon-local.d/*.monitor chmod +x $(CURDIR)/debian/mon/usr/lib/mon/bin/* + dh_installsystemd override_dh_installman: dh_installman clients/skymon/skymon.1 doc/mon.8 doc/moncmd.1 doc/monshow.1 doc/monfailures.1 --- etbemon-1.3.2.orig/etc/mon.cf +++ etbemon-1.3.2/etc/mon.cf @@ -5,10 +5,6 @@ # Date: Mon, 07 Sep 2009 13:57:38 +0200 # -# Packages: -# libcgi-pm-perl for monshow on unstable -# libfilesys-df-perl for freespace.monitor - # # Global options # --- etbemon-1.3.2.orig/mon.d/smtpswaks.monitor +++ etbemon-1.3.2/mon.d/smtpswaks.monitor @@ -2,6 +2,7 @@ # Mon script to check sending mail with swaks # Options: -f FROM [-e EHLO] [-t TIMEOUT] RECIPIENT[:SERVER] [RECIPIENT[:SERVER] ...] +# [ -a authuser ] [ -p authpass ] TIMEOUT=10 EHLO=$(cat /etc/mailname) @@ -9,7 +10,7 @@ # Copyright Russell Coker GPLv3 -TEMP=$(getopt -o f:e:t: -n "$0" -- "$@") +TEMP=$(getopt -o f:e:t:a:p:P: -n "$0" -- "$@") if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi @@ -30,6 +31,21 @@ TIMEOUT="$2" shift 2 ;; + -a) + AUTHUSER="--auth-user $2" + TLS="-tls --auth --tls-verify" + shift 2 + ;; + -p) + AUTHPASS="-ap $2" + TLS="-tls --auth --tls-verify" + shift 2 + ;; + -P) + AUTHPASS="-ap $(cat $2)" + TLS="-tls --auth --tls-verify" + shift 2 + ;; --) shift break @@ -49,9 +65,9 @@ if [ "$SERVER" = "$RECIPIENT" ]; then SERVER="" else - SERVER="-s $SERVER" + SERVER="--server $SERVER" fi - RESULT=$(swaks --timeout $TIMEOUT --ehlo $EHLO -f $FROM -t $RECIPIENT $SERVER -S2 2>&1) || FAILED="$FAILED ($TEST $RESULT)" + RESULT=$(swaks --timeout $TIMEOUT $TLS $AUTHUSER $AUTHPASS --ehlo $EHLO --from $FROM --to $RECIPIENT $SERVER -S2 2>&1) || FAILED="$FAILED ($TEST $RESULT)" done if [ "$FAILED" != "" ]; then