debian/0000755000000000000000000000000011717145146007175 5ustar debian/postrm0000644000000000000000000000255411717145146010452 0ustar #!/bin/sh # postrm script for sqlgrey # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `purge' # * `upgrade' # * `failed-upgrade' # * `abort-install' # * `abort-install' # * `abort-upgrade' # * `disappear' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) DBDIR='/var/lib/sqlgrey' CONFDIR='/var/lib/sqlgrey' if [ -d $DBDIR ]; then rmdir $DBDIR || true dpkg-statoverride --remove $DBDIR || true fi if [ -d $CONFDIR ]; then rm -f $CONFDIR/*~ \ $CONFDIR/clients_fqdn_whitelist \ $CONFDIR/clients_ip_whitelist \ $CONFIR/dyn_fqdn.regexp \ $CONFDIR/README \ $CONFDIR/smtp_server.regexp rmdir $CONFDIR || true fi ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/changelog0000644000000000000000000000237711717145146011060 0ustar sqlgrey (1:1.8.0-1) unstable; urgency=low * [8e942a4] Imported Upstream version 1.8.0 Allow * false as config value, patch by Joost van Baal-Ilić (Closes: #659987) -- Antonin Kral Thu, 16 Feb 2012 10:12:11 +0100 sqlgrey (1.8.0rc2-1) unstable; urgency=low * New upstream release -- Antonin Kral Thu, 11 Feb 2010 09:29:57 +0100 sqlgrey (1.6.8-4) unstable; urgency=low * Added /var/lib/sqlgrey to dirs (Closes: #532950, #532948) * Chdir to /var/lib/sqlgrey before starting daemon (Closes: #552261) -- Antonin Kral Tue, 22 Dec 2009 21:18:33 +0100 sqlgrey (1.6.8-3) unstable; urgency=low * fixed /etc/sqlgrey/sqlgrey.conf mode (Closes: #514834) -- Antonin Kral Wed, 11 Feb 2009 11:41:56 +0100 sqlgrey (1.6.8-2) unstable; urgency=low * added dependencies for supported DB models (Closes: #513597) * fixed Lintian warning description-contains-homepage * fixed Lintian warning binary-without-manpage -- Antonin Kral Sun, 08 Feb 2009 15:03:12 +0100 sqlgrey (1.6.8-1) unstable; urgency=low * Initial release (Closes: #389472) -- Antonin Kral Wed, 19 Mar 2008 21:18:15 +0100 debian/watch0000644000000000000000000000007011717145146010223 0ustar version=3 http://sf.net/sqlgrey/sqlgrey-(.*)\.tar\.gz debian/patches/0000755000000000000000000000000011717145146010624 5ustar debian/patches/0003-add-logstats-manpage.patch0000644000000000000000000000170111717145146016220 0ustar From: Antonin Kral Date: Thu, 16 Feb 2012 09:56:43 +0100 Subject: =?UTF-8?q?add-logstats-manpage=0Aadd=20generation=20of=20logstats=20?= =?UTF-8?q?manpage?= --- Makefile | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 043504c..a4b7eff 100644 --- a/Makefile +++ b/Makefile @@ -36,9 +36,10 @@ use_dbi: manpage: perldoc -u sqlgrey | pod2man -n sqlgrey > sqlgrey.1 + perldoc -u sqlgrey-logstats | pod2man -n sqlgrey-logstats | sed 's/sqlgrey.*-logstats\.pl/sqlgrey-logstats/g' > sqlgrey-logstats.1 clean: - rm -f sqlgrey.1 + rm -f sqlgrey.1 sqlgrey-logstats.1 rm -f *~ .#* init/*~ etc/*~ install: all @@ -59,6 +60,7 @@ install: all $(INSTALL) -m 644 etc/smtp_server.regexp $(CONFDIR) $(INSTALL) -m 644 etc/README $(CONFDIR) $(INSTALL) -m 644 sqlgrey.1 $(MANDIR) + $(INSTALL) -m 644 sqlgrey-logstats.1 $(MANDIR) rh-install: install $(INSTALL) init/sqlgrey $(INITDIR) debian/patches/0002-change-build-order.patch0000644000000000000000000000114311717145146015656 0ustar From: Antonin Kral Date: Thu, 16 Feb 2012 09:40:31 +0100 Subject: =?UTF-8?q?change-build-order=0Aupdate=20version=20first,=20then=20b?= =?UTF-8?q?uild=20manpages?= --- Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 5506982..043504c 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ VERSION := $(shell cat VERSION) default: @echo "See INSTALL textfile"; -all: manpage update-version +all: update-version manpage update-version: cat sqlgrey | sed 's/^my $$VERSION = .*;/my $$VERSION = "$(VERSION)";/' > sqlgrey.new debian/patches/series0000644000000000000000000000017311717145146012042 0ustar 0001-remove-pl-suffix.patch 0002-change-build-order.patch 0003-add-logstats-manpage.patch 0004-allow-false-in-config.patch debian/patches/0004-allow-false-in-config.patch0000644000000000000000000000155611717145146016312 0ustar From: Antonin Kral Date: Thu, 16 Feb 2012 10:11:40 +0100 Subject: =?UTF-8?q?allow-false-in-config=0AAllow=20false=20to=20be=20passed=20?= =?UTF-8?q?as=20value,=20patch=20by=20Joost=20van=20Baal-Ili=C4=87=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sqlgrey | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/sqlgrey b/sqlgrey index cac780f..b664a79 100755 --- a/sqlgrey +++ b/sqlgrey @@ -2475,7 +2475,7 @@ sub read_conffile($) s/\s+$//; # no trailing white next unless length; # anything left ? my ($var, $value) = split(/\s*=\s*/, $_, 2); - $dflt{$var} = $value || 1; + $dflt{$var} = $value // ''; } close CONF or die "Couldn't close config file $config_file\n"; debian/patches/0001-remove-pl-suffix.patch0000644000000000000000000000240311717145146015432 0ustar From: Antonin Kral Date: Thu, 16 Feb 2012 09:48:29 +0100 Subject: =?UTF-8?q?remove-pl-suffix=0Aremove=20.pl=20suffix=20from=20sqlgrey?= =?UTF-8?q?-logstats.pl?= --- Makefile | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5bceb02..5506982 100644 --- a/Makefile +++ b/Makefile @@ -20,8 +20,8 @@ update-version: cat sqlgrey.spec | sed 's/^%define ver .*/%define ver $(VERSION)/' > sqlgrey.spec.new mv sqlgrey.spec.new sqlgrey.spec cat sqlgrey-logstats.pl | sed 's/^my $$VERSION = .*;/my $$VERSION = "$(VERSION)";/' > sqlgrey-logstats.pl.new - mv sqlgrey-logstats.pl.new sqlgrey-logstats.pl - chmod a+x sqlgrey-logstats.pl + mv sqlgrey-logstats.pl.new sqlgrey-logstats + chmod a+x sqlgrey-logstats use_dbcluster: cat sqlgrey | sed 's/^use DBI;/use DBIx::DBCluster;/' > sqlgrey.new @@ -50,7 +50,7 @@ install: all $(INSTALL) -d -m 755 $(BINDIR) $(INSTALL) -m 755 sqlgrey $(SBINDIR) $(INSTALL) -m 755 update_sqlgrey_config $(SBINDIR) - $(INSTALL) -m 755 sqlgrey-logstats.pl $(BINDIR) + $(INSTALL) -m 755 sqlgrey-logstats $(BINDIR) $(INSTALL) -m 644 etc/sqlgrey.conf $(CONFDIR) $(INSTALL) -m 644 etc/clients_ip_whitelist $(CONFDIR) $(INSTALL) -m 644 etc/clients_fqdn_whitelist $(CONFDIR) debian/source/0000755000000000000000000000000011717145146010475 5ustar debian/source/format0000644000000000000000000000001411717145146011703 0ustar 3.0 (quilt) debian/copyright0000644000000000000000000000222511717145146011131 0ustar This package was debianized by Antonin Kral on Wed, 19 Mar 2008 21:18:15 +0100. It was downloaded from http://sqlgrey.sourceforge.net/ Upstream Author: Lionel Bouton Copyright: 2004 - 2010 Lionel Bouton 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. 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 with the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL-2; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. The Debian packaging is (C) 2008, Antonin Kral and is licensed under the GPL-2, see `/usr/share/common-licenses/GPL-2'. debian/compat0000644000000000000000000000000211717145146010373 0ustar 5 debian/README.Debian0000644000000000000000000000056611717145146011245 0ustar sqlgrey for Debian ------------------ To use Postgrey, put something along the lines of smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination, check_policy_service inet:127.0.0.1:2501 in your /etc/postfix/main.cf (Postfix 2.1 or newer is required.) -- Antonin Kral Wed, 19 Mar 2008 21:18:15 +0100 debian/docs0000644000000000000000000000006311717145146010047 0ustar FAQ README README.OPTINOUT README.PERF TODO HOWTO debian/rules0000755000000000000000000000257411717145146010265 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 configure: configure-stamp configure-stamp: dh_testdir touch configure-stamp build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp build-stamp: dh_testdir $(MAKE) all touch $@ clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp $(MAKE) clean dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs # Add here commands to install the package into debian/sqlgrey. $(MAKE) ROOTDIR=$(CURDIR)/debian/sqlgrey install binary-arch: build install binary-indep: build install dh_testdir dh_testroot dh_installchangelogs Changelog dh_installdocs dh_installexamples # dh_install dh_installinit -- defaults 19 dh_installman dh_installman debian/update_sqlgrey_config.1 dh_link dh_strip dh_compress dh_fixperms dh_perl dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure debian/control0000644000000000000000000000134011717145146010576 0ustar Source: sqlgrey Section: mail Priority: optional Maintainer: Antonin Kral Build-Depends: debhelper (>= 5), perl-doc Standards-Version: 3.9.2 Vcs-Git: git://github.com/bobek/sqlgrey-debian.git Vcs-Browser: https://github.com/bobek/sqlgrey-debian Homepage: http://sqlgrey.sourceforge.net/ Package: sqlgrey Architecture: all Depends: ${perl:Depends}, ${misc:Depends}, adduser, perl, libnet-server-perl, libdate-calc-perl, libdbd-pg-perl | libdbd-mysql-perl | libdbd-sqlite3-perl Recommends: postfix, libdbd-pg-perl Description: Postfix Greylisting Policy Server A policy server for Postfix implementing greylisting. . Could be configured to use MySQL, PostgreSQL or SQLite. PostgreSQL is recommended by author. . debian/init.d0000644000000000000000000000354211717145146010311 0ustar #! /bin/sh # # sqlgrey start/stop the postgrey greylisting deamon for postfix # (priority should be smaller than that of postfix) # # Author: (c)2008 Antonin Kral # Based on Debian sarge's 'skeleton' example # Distribute and/or modify at will. # ### BEGIN INIT INFO # Provides: sqlgrey # Required-Start: $syslog $local_fs $remote_fs # Required-Stop: $syslog $local_fs $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/stop the sqlgrey daemon ### END INIT INFO set -e PATH=/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/sqlgrey SQLGREY_HOME=/var/lib/sqlgrey NAME=sqlgrey DESC="postfix greylisting daemon (sqlgrey)" PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME # Gracefully exit if the package has been removed. test -x $DAEMON || exit 0 # Read config file if it is present. if [ -r /etc/default/$NAME ] then . /etc/default/$NAME fi SQLGREY_OPTS="--daemonize $SQLGREY_OPTS" case "$1" in start) echo -n "Starting $DESC: $NAME" start-stop-daemon --start --quiet --pidfile $PIDFILE \ --chdir $SQLGREY_HOME \ --exec $DAEMON -- $SQLGREY_OPTS echo "." ;; stop) echo -n "Stopping $DESC: $NAME" start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo rm -f $PIDFILE echo "." ;; reload|force-reload) echo -n "Reloading $DESC configuration..." start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE echo "done." ;; restart) echo -n "Restarting $DESC: $NAME" start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE rm -f $PIDFILE sleep 1 start-stop-daemon --start --quiet --pidfile $PIDFILE \ --chdir $SQLGREY_HOME \ --exec $DAEMON -- $SQLGREY_OPTS echo "." ;; *) echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 exit 1 ;; esac exit 0 debian/update_sqlgrey_config.10000644000000000000000000000102111717145146013626 0ustar .TH UPDATE_SQLGREY_CONFIG "1" "Feb 2010" "Antonin Kral" "sqlgrey" .SH "NAME" update_sqlgrey_config \- the simple white\-list updater .SH "SYNOPSIS" \fBupdate_sqlgrey_config .SH "DESCRIPTION" .PP \fBupdate_sqlgrey_config\fR is a simple bash script, which downloads white\-list file from defined web server (sqlgrey.bouton.name is used by default). Host could be changed in sqlgrey.conf. .PP Beware of the fact that script will overwrite any local changes. .SH "COPYRIGHT" .PP Copyright 2010 Antonin Kral .SH "AUTHOR" Antonin Kral debian/postinst0000644000000000000000000000275411717145146011013 0ustar #!/bin/sh # postinst script for sqlgrey # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in configure) DBDIR='/var/lib/sqlgrey' getent passwd sqlgrey > /dev/null || \ adduser --system --home "$DBDIR" --no-create-home \ --disabled-password --group sqlgrey getent group sqlgrey > /dev/null || \ addgroup --system sqlgrey chown sqlgrey /etc/sqlgrey/sqlgrey.conf chgrp sqlgrey /etc/sqlgrey/sqlgrey.conf chmod 0660 /etc/sqlgrey/sqlgrey.conf if [ ! -e "$DBDIR" ]; then mkdir -p "$DBDIR" dpkg-statoverride --update --add \ sqlgrey sqlgrey 0700 "$DBDIR" fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 debian/dirs0000644000000000000000000000007011717145146010056 0ustar usr/bin usr/sbin var/lib/sqlgrey etc/sqlgrey etc/init.d