--- policyd-weight-0.1.14-beta.orig/debian/postinst +++ policyd-weight-0.1.14-beta/debian/postinst @@ -0,0 +1,65 @@ +#!/bin/sh +# based on arpwatch.postinst: v11 2004/09/15 KELEMEN Peter +# postinst: v1 2006/01/12 Jan Wagner + +set -e + +NUSER="polw" +NGROUP="polw" +NHOME="/var/lib/$NUSER" +NGECOS="policy-weight user" + +case "$1" in + configure) + # Take care of group. + if NGROUP_ENTRY=`getent group $NGROUP`; then + # group exists + : + else + # group does not exist yet + addgroup --quiet --system $NGROUP + fi + + # Take care of user. + if NUSER_ENTRY=`getent passwd $NUSER`; then + # user exists + adduser --quiet $NUSER $NGROUP + # + if [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.1.14-beta-3"; then + usermod -s /bin/false -c "$NGECOS" $NUSER + fi + else + # user does not exist yet + adduser --quiet --system \ + --ingroup $NGROUP \ + --gecos "$NGECOS" \ + --home $NHOME \ + --no-create-home \ + --shell /bin/sh \ + --disabled-login \ + --disabled-password \ + --shell /bin/false \ + $NUSER + fi + + # be shure we get new startscript + if [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.1.14-beta-4"; then + rm -f /etc/rc?.d/*policyd-weight + fi + + # Set up home directory. + if [ -d $NHOME ]; then + chown -R ${NUSER}:${NGROUP} $NHOME + chmod -R o-rwX $NHOME + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# --- policyd-weight-0.1.14-beta.orig/debian/copyright +++ policyd-weight-0.1.14-beta/debian/copyright @@ -0,0 +1,30 @@ +This package was debianized by Jan Wagner on +Wed, 8 Nov 2006 22:44:24 +0100. + +It was downloaded from + +Upstream Author: Robert Felber + +Copyright: (C) 2005-2006 Robert Felber + +License: + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU General Public License +can be found in /usr/share/common-licenses/GPL file. + +The Debian packaging is (C) 2006, Jan Wagner and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. --- policyd-weight-0.1.14-beta.orig/debian/docs +++ policyd-weight-0.1.14-beta/debian/docs @@ -0,0 +1,2 @@ +documentation.txt +todo.txt --- policyd-weight-0.1.14-beta.orig/debian/README.Debian +++ policyd-weight-0.1.14-beta/debian/README.Debian @@ -0,0 +1,14 @@ +policyd-weight for Debian +------------------------- + +You can create a file /etc/policyd-weight.conf with different setting from +default (can be got with "/usr/sbin/policyd-weight defaults"). + +For instructions to setup policyd-weight please refer to +/usr/share/doc/policyd-weight/documentation.txt.gz or to +http://www.policyd-weight.org! + +Feel free to also contact the policyd-weight mailing list + if you has questions/problems. + + -- Jan Wagner Wed, 8 Nov 2006 22:44:24 +0100 --- policyd-weight-0.1.14-beta.orig/debian/changelog +++ policyd-weight-0.1.14-beta/debian/changelog @@ -0,0 +1,32 @@ +policyd-weight (0.1.14-beta-5) unstable; urgency=medium + + * add remove_ordb.diff to remove ORDB DNSBL from default config since they + got offline today + + -- Jan Wagner Mon, 18 Dec 2006 00:05:29 +0100 + +policyd-weight (0.1.14-beta-4) unstable; urgency=medium + + * fix startup script S20, so make polw start before postfix + * provide update path via postinst + + -- Jan Wagner Sun, 17 Dec 2006 14:19:46 +0100 + +policyd-weight (0.1.14-beta-3) unstable; urgency=medium + + * fixed attributes of system user (Closes: #402314). + + -- Jan Wagner Fri, 24 Nov 2006 21:55:27 +0100 + +policyd-weight (0.1.14-beta-2) unstable; urgency=medium + + * removed libsys-syslog-perl from Depencies and add to Recommends + * fixed watch file + + -- Jan Wagner Sun, 12 Nov 2006 22:17:36 +0100 + +policyd-weight (0.1.14-beta-1) unstable; urgency=low + + * Initial release (Closes: #397704). + + -- Jan Wagner Wed, 8 Nov 2006 22:44:24 +0100 --- policyd-weight-0.1.14-beta.orig/debian/init.d +++ policyd-weight-0.1.14-beta/debian/init.d @@ -0,0 +1,60 @@ +#! /bin/sh +# Written by Miquel van Smoorenburg . +# Modified for Debian +# by Ian Murdock . +# +# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl +# /etc/init.d/policyd-weight: v1 2006/11/08 Jan Wagner + +### BEGIN INIT INFO +# Provides: policyd-weight +# Required-Start: $local_fs $network $remote_fs $syslog +# Required-Stop: $local_fs $network $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: start and stop the policyd-weight daemon +# Description: a Perl policy daemon for the Postfix MTA +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/policyd-weight +NAME=policyd-weight +DESC=policyd-weight + +test -x $DAEMON || exit 0 + +# Include policyd-weight defaults if available +if [ -f /etc/default/policyd-weight ] ; then + . /etc/default/policyd-weight +fi + +set -e + +case "$1" in + start) + echo -n "Starting $DESC: " + $DAEMON $DAEMON_OPTS start + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + $DAEMON $DAEMON_OPTS stop + echo "$NAME." + ;; + reload) + echo "Reloading $DESC configuration files." + $DAEMON $DAEMON_OPTS reload + ;; + restart|force-reload) + echo -n "Restarting $DESC: " + $DAEMON $DAEMON_OPTS restart + echo "$NAME." + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 --- policyd-weight-0.1.14-beta.orig/debian/rules +++ policyd-weight-0.1.14-beta/debian/rules @@ -0,0 +1,46 @@ +#!/usr/bin/make -f +# written by Jan Wagner +# +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +build: + +clean: + dh_testdir + dh_testroot + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/policyd-weight. + install -D -m 644 policyd-weight debian/policyd-weight/usr/sbin/policyd-weight + # patch polw + patch -p0 +Build-Depends: debhelper (>= 5) +Standards-Version: 3.7.2 + +Package: policyd-weight +Architecture: all +Depends: ${perl:Depends}, adduser, libnet-dns-perl +Recommends: libsys-syslog-perl +Description: a Perl policy daemon for the Postfix MTA + Its intended to eliminate forged envelope senders and HELOs (i.e. in bogus + mails). It allows you to score DNSBLs (RBL/RHSBL), HELO, MAIL FROM and client + IP addresses before any queuing is done. It allows you to REJECT messages + which have a score higher than allowed, providing improved blocking of spam + and virus mails. policyd-weight caches the most frequent client/sender + combinations (SPAM as well as HAM) to reduce the number of DNS queries. + . + Homepage: --- policyd-weight-0.1.14-beta.orig/debian/postrm +++ policyd-weight-0.1.14-beta/debian/postrm @@ -0,0 +1,58 @@ +#!/bin/sh +# based on arpwatch.postrm: v2 2004/09/15 KELEMEN Peter +# postrm: v1 2006/10/12 Jan Wagner + +NUSER="polw" +NGROUP="polw" + +set -e + +case "$1" in + purge) + # find first and last SYSTEM_UID numbers + for LINE in `grep SYSTEM_UID /etc/adduser.conf | grep -v "^#"`; do + case $LINE in + FIRST_SYSTEM_UID*) + FIST_SYSTEM_UID=`echo $LINE | cut -f2 -d '='` + ;; + LAST_SYSTEM_UID*) + LAST_SYSTEM_UID=`echo $LINE | cut -f2 -d '='` + ;; + *) + ;; + esac + done + # remove system account if necessary + if [ -n "$FIST_SYSTEM_UID" ] && [ -n "$LAST_SYSTEM_UID" ]; then + if USERID=`getent passwd $NUSER | cut -f 3 -d ':'`; then + if [ -n "$USERID" ]; then + if [ "$FIST_SYSTEM_UID" -le "$USERID" ] && \ + [ "$USERID" -le "$LAST_SYSTEM_UID" ]; then + + deluser --quiet $NUSER || true + # And then remove the group + GROUPID=`getent group $NGROUP | cut -f 3 -d ':'` + if [ -n "$GROUPID" ] ; then + delgroup --quiet $NGROUP || true + fi + fi + fi + fi + fi + + # Remove state files + if [ -d /var/lib/arpalert ]; then + find /var/lib/arpalert/ -type f | xargs rm -f + fi + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# --- policyd-weight-0.1.14-beta.orig/debian/patches/remove_ordb.diff +++ policyd-weight-0.1.14-beta/debian/patches/remove_ordb.diff @@ -0,0 +1,11 @@ +diff -Nur trunk.orig/policyd-weight trunk/policyd-weight +--- trunk.orig/policyd-weight 2006-11-09 22:17:47.000000000 +0100 ++++ trunk/policyd-weight 2006-12-19 14:33:02.954849015 +0100 +@@ -331,7 +331,6 @@ + 'dnsbl.njabl.org', 4.25, -1.5, 'BL_NJABL', + 'list.dsbl.org', 4.35, 0, 'DSBL_ORG', + 'ix.dnsbl.manitu.net', 4.35, 0, 'IX_MANITU', +- 'relays.ordb.org', 3.25, 0, 'ORDB_ORG' + ); + + my $MAXDNSBLHITS = 2; # If Client IP is listed in MORE