diff options
author | ghen <ghen@pkgsrc.org> | 2007-11-13 16:43:04 +0000 |
---|---|---|
committer | ghen <ghen@pkgsrc.org> | 2007-11-13 16:43:04 +0000 |
commit | 2dc3f515fa06869f08ded9bd0e14d9fcdd2b8ea4 (patch) | |
tree | 97ff867d859ac513cf8107925ca4559d56cb0608 /mail | |
parent | a5fadd41580b664f2acbae00397fd82f63b7a3c2 (diff) | |
download | pkgsrc-2dc3f515fa06869f08ded9bd0e14d9fcdd2b8ea4.tar.gz |
Import sqlgrey-1.6.8 package as requested by Petr Janda on pkgsrc-users list.
SQLgrey is a postfix policy service implementing a greylisting policy. It is
written in Perl and uses DBI to access an SQL database. Its goal is reducing
the SPAM reaching user mailboxes.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/sqlgrey/DESCR | 3 | ||||
-rw-r--r-- | mail/sqlgrey/Makefile | 62 | ||||
-rw-r--r-- | mail/sqlgrey/PLIST | 13 | ||||
-rw-r--r-- | mail/sqlgrey/distinfo | 9 | ||||
-rw-r--r-- | mail/sqlgrey/files/sqlgrey.sh | 19 | ||||
-rw-r--r-- | mail/sqlgrey/patches/patch-aa | 29 | ||||
-rw-r--r-- | mail/sqlgrey/patches/patch-ab | 44 | ||||
-rw-r--r-- | mail/sqlgrey/patches/patch-ac | 22 | ||||
-rw-r--r-- | mail/sqlgrey/patches/patch-ad | 33 |
9 files changed, 234 insertions, 0 deletions
diff --git a/mail/sqlgrey/DESCR b/mail/sqlgrey/DESCR new file mode 100644 index 00000000000..35b885d8eae --- /dev/null +++ b/mail/sqlgrey/DESCR @@ -0,0 +1,3 @@ +SQLgrey is a postfix policy service implementing a greylisting policy. It is +written in Perl and uses DBI to access an SQL database. Its goal is reducing +the SPAM reaching user mailboxes. diff --git a/mail/sqlgrey/Makefile b/mail/sqlgrey/Makefile new file mode 100644 index 00000000000..950195438d3 --- /dev/null +++ b/mail/sqlgrey/Makefile @@ -0,0 +1,62 @@ +# $NetBSD: Makefile,v 1.1.1.1 2007/11/13 16:43:04 ghen Exp $ + +DISTNAME= sqlgrey-1.6.8 +CATEGORIES= mail +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=sqlgrey/} +EXTRACT_SUFX= .tar.bz2 + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://sqlgrey.sourceforge.net/ +COMMENT= Postfix greylisting policy daemon + +USE_TOOLS+= perl:run + +DEPENDS+= p5-Net-Server>=0.87:../../net/p5-Net-Server +DEPENDS+= p5-IO-Multiplex>=1:../../devel/p5-IO-Multiplex + +PKG_SYSCONFSUBDIR= ${PKGBASE} +EGDIR= ${PREFIX}/share/examples/${PKGBASE} + +.include "../../mk/bsd.prefs.mk" + +SQLGREY_USER?= sqlgrey +SQLGREY_GROUP?= sqlgrey + +PKG_USERS= ${SQLGREY_USER}:${SQLGREY_GROUP} +PKG_GROUPS= ${SQLGREY_GROUP} + +RCD_SCRIPTS= sqlgrey + +MAKE_ENV+= EGDIR=${EGDIR} + +CONF_FILES= ${EGDIR}/clients_fqdn_whitelist \ + ${PKG_SYSCONFDIR}/clients_fqdn_whitelist +CONF_FILES+= ${EGDIR}/clients_ip_whitelist \ + ${PKG_SYSCONFDIR}/clients_ip_whitelist +CONF_FILES+= ${EGDIR}/dyn_fqdn.regexp \ + ${PKG_SYSCONFDIR}/dyn_fqdn.regexp +CONF_FILES+= ${EGDIR}/smtp_server.regexp \ + ${PKG_SYSCONFDIR}/smtp_server.regexp +CONF_FILES+= ${EGDIR}/sqlgrey.conf \ + ${PKG_SYSCONFDIR}/sqlgrey.conf + +REPLACE_PERL= sqlgrey-logstats.pl +REPLACE_PERL+= sqlgrey +REPLACE_SH= update_sqlgrey_config + +SUBST_CLASSES+= sysconfdir +SUBST_STAGE.sysconfdir= pre-configure +SUBST_FILES.sysconfdir= sqlgrey update_sqlgrey_config etc/sqlgrey.conf +SUBST_SED.sysconfdir= -e 's,%%PKG_SYSCONFDIR%%,${PKG_SYSCONFDIR},g' +SUBST_SED.sysconfdir+= -e 's,%%VARBASE%%,${VARBASE},g' +SUBST_SED.sysconfdir+= -e 's,%%SQLGREY_USER%%,${SQLGREY_USER},g' +SUBST_SED.sysconfdir+= -e 's,%%SQLGREY_GROUP%%,${SQLGREY_GROUP},g' + +BUILD_DEFS+= VARBASE +BUILD_DEFS+= SQLGREY_USER SQLGREY_GROUP + +PKG_USERS_VARS= SQLGREY_USER +PKG_GROUPS_VARS= SQLGREY_GROUP + +.include "../../databases/p5-DBI/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/mail/sqlgrey/PLIST b/mail/sqlgrey/PLIST new file mode 100644 index 00000000000..75c0f5a0ad0 --- /dev/null +++ b/mail/sqlgrey/PLIST @@ -0,0 +1,13 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2007/11/13 16:43:04 ghen Exp $ +bin/sqlgrey-logstats.pl +man/man1/sqlgrey.1 +sbin/sqlgrey +sbin/update_sqlgrey_config +share/examples/rc.d/sqlgrey +share/examples/sqlgrey/README +share/examples/sqlgrey/clients_fqdn_whitelist +share/examples/sqlgrey/clients_ip_whitelist +share/examples/sqlgrey/dyn_fqdn.regexp +share/examples/sqlgrey/smtp_server.regexp +share/examples/sqlgrey/sqlgrey.conf +@dirrm share/examples/sqlgrey diff --git a/mail/sqlgrey/distinfo b/mail/sqlgrey/distinfo new file mode 100644 index 00000000000..5fe610c7e4c --- /dev/null +++ b/mail/sqlgrey/distinfo @@ -0,0 +1,9 @@ +$NetBSD: distinfo,v 1.1.1.1 2007/11/13 16:43:04 ghen Exp $ + +SHA1 (sqlgrey-1.6.8.tar.bz2) = 1c687d1839fd2911bf9ef535eef8e84bc97d56a6 +RMD160 (sqlgrey-1.6.8.tar.bz2) = f5f13004fa1a9228eb1c5a141ec1658738447899 +Size (sqlgrey-1.6.8.tar.bz2) = 43551 bytes +SHA1 (patch-aa) = 9471d72a66d8557b969aef8d5400ff6d4da06c9a +SHA1 (patch-ab) = 637dc9870d6b01caa9cfe10109aeafd3192fbb66 +SHA1 (patch-ac) = 29100eb0d591abec3c2f628cc1c3eeaf46e739ac +SHA1 (patch-ad) = 661dc0b5b08ca96bdc0f7b571e62a706b174fa13 diff --git a/mail/sqlgrey/files/sqlgrey.sh b/mail/sqlgrey/files/sqlgrey.sh new file mode 100644 index 00000000000..10d04201b56 --- /dev/null +++ b/mail/sqlgrey/files/sqlgrey.sh @@ -0,0 +1,19 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: sqlgrey.sh,v 1.1.1.1 2007/11/13 16:43:04 ghen Exp $ +# +# PROVIDE: sqlgrey +# REQUIRE: DAEMON +# BEFORE: mail + +. /etc/rc.subr + +name="sqlgrey" +rcvar=${name} +command="@PREFIX@/sbin/${name}" +required_files="@PKG_SYSCONFDIR@/${name}.conf" +command_args="-d" +stop_cmd="${command} -k" + +load_rc_config $name +run_rc_command "$1" diff --git a/mail/sqlgrey/patches/patch-aa b/mail/sqlgrey/patches/patch-aa new file mode 100644 index 00000000000..91f0d4da168 --- /dev/null +++ b/mail/sqlgrey/patches/patch-aa @@ -0,0 +1,29 @@ +$NetBSD: patch-aa,v 1.1.1.1 2007/11/13 16:43:04 ghen Exp $ + +--- Makefile.orig 2005-06-07 02:28:38.000000000 +0200 ++++ Makefile +@@ -1,10 +1,8 @@ + INSTALL = install +-ETCDIR = $(ROOTDIR)/etc +-CONFDIR = $(ETCDIR)/sqlgrey +-SBINDIR = $(ROOTDIR)/usr/sbin +-BINDIR = $(ROOTDIR)/usr/bin +-INITDIR = $(ETCDIR)/init.d +-MANDIR = $(ROOTDIR)/usr/share/man/man1 ++CONFDIR = $(EGDIR) ++SBINDIR = $(PREFIX)/sbin ++BINDIR = $(PREFIX)/bin ++MANDIR = $(PREFIX)/$(PKGMANDIR)/man1 + + VERSION := $(shell cat VERSION) + TBZ2 = sqlgrey-$(VERSION).tar.bz2 +@@ -30,9 +28,7 @@ clean: + + install: all + $(INSTALL) -d -m 755 $(SBINDIR) +- $(INSTALL) -d -m 755 $(ETCDIR) + $(INSTALL) -d -m 755 $(CONFDIR) +- $(INSTALL) -d -m 755 $(INITDIR) + $(INSTALL) -d -m 755 $(MANDIR) + $(INSTALL) -d -m 755 $(BINDIR) + $(INSTALL) -m 755 sqlgrey $(SBINDIR) diff --git a/mail/sqlgrey/patches/patch-ab b/mail/sqlgrey/patches/patch-ab new file mode 100644 index 00000000000..e7363218764 --- /dev/null +++ b/mail/sqlgrey/patches/patch-ab @@ -0,0 +1,44 @@ +$NetBSD: patch-ab,v 1.1.1.1 2007/11/13 16:43:04 ghen Exp $ + +--- sqlgrey.orig 2007-08-05 22:41:19.000000000 +0200 ++++ sqlgrey +@@ -52,11 +52,11 @@ my $config = 'config'; + # defaults + my %dflt; + $dflt{loglevel} = 2; # used for $dflt{log} entries in read_conffile() +-$dflt{user} = 'sqlgrey'; +-$dflt{group} = 'sqlgrey'; ++$dflt{user} = '%%SQLGREY_USER%%'; ++$dflt{group} = '%%SQLGREY_GROUP%%'; + $dflt{inet} = '2501'; +-$dflt{pidfile} = '/var/run/sqlgrey.pid'; +-$dflt{conf_dir} = '/etc/sqlgrey'; ++$dflt{pidfile} = '%%VARBASE%%/run/sqlgrey.pid'; ++$dflt{conf_dir} = '%%PKG_SYSCONFDIR%%'; + $dflt{reconnect_delay} = 5; # 5 minutes + $dflt{max_connect_age} = 24; # 24 hours + $dflt{awl_age} = 60; # 60 days +@@ -91,7 +91,7 @@ $dflt{log} = { # note values here are no + }; + + # Default configuration file +-my $config_file = '/etc/sqlgrey/sqlgrey.conf'; ++my $config_file = '%%PKG_SYSCONFDIR%%/sqlgrey.conf'; + + # whitelist files + my $stat_ip_whitelist_file = $dflt{conf_dir} . '/clients_ip_whitelist'; +@@ -2390,12 +2390,12 @@ B<sqlgrey> [I<options>...] + -k, --kill kill a running sqlgrey + (identified by 'pidfile' content) + -f, --configfile=FILE read config from FILE +- (default /etc/sqlgrey/sqlgrey.conf) ++ (default %%PKG_SYSCONFDIR%%/sqlgrey.conf) + expecting config_param=value lines, + - spaces are ignored, + - '#' is used for comments + +-See the default config file at /etc/sqlgrey/sqlgrey.conf for runtime parameters. ++See the default config file at %%PKG_SYSCONFDIR%%/sqlgrey.conf for runtime parameters. + If you got sqlgrey from sources, read the HOWTO file in the compressed archive. + If it came prepackaged, look into the documentation tree for this file: + /usr/share/doc/sqlgrey-<version>/ on most Linux distributions for example. diff --git a/mail/sqlgrey/patches/patch-ac b/mail/sqlgrey/patches/patch-ac new file mode 100644 index 00000000000..7a00bab4b1e --- /dev/null +++ b/mail/sqlgrey/patches/patch-ac @@ -0,0 +1,22 @@ +$NetBSD: patch-ac,v 1.1.1.1 2007/11/13 16:43:04 ghen Exp $ + +--- update_sqlgrey_config.orig 2005-03-02 01:49:41.000000000 +0100 ++++ update_sqlgrey_config +@@ -24,7 +24,7 @@ fi + LANG=C + LC_ALL=C + +-MYDIR=/etc/sqlgrey ++MYDIR=%%PKG_SYSCONFDIR%% + CONF=$MYDIR/sqlgrey.conf + + # Get whitelists host and pidfile from conf +@@ -36,7 +36,7 @@ fi + pidfile=`grep "^[[:space:]]*pidfile" $CONF | cut -d= -f2 | awk '{print $1}'` + if [ -z "$pidfile" ] + then +- pidfile="/var/run/sqlgrey.pid" ++ pidfile="/%%VARBASE%%/run/sqlgrey.pid" + fi + + # Go into a temp directory diff --git a/mail/sqlgrey/patches/patch-ad b/mail/sqlgrey/patches/patch-ad new file mode 100644 index 00000000000..a79141610d0 --- /dev/null +++ b/mail/sqlgrey/patches/patch-ad @@ -0,0 +1,33 @@ +$NetBSD: patch-ad,v 1.1.1.1 2007/11/13 16:43:04 ghen Exp $ + +--- etc/sqlgrey.conf.orig 2005-12-20 11:41:30.000000000 +0100 ++++ etc/sqlgrey.conf +@@ -7,7 +7,7 @@ + # - SQLgrey uses a specific config file when called with -f <conf_file> + + ## Configuration files +-# conf_dir = /etc/sqlgrey ++# conf_dir = %%PKG_SYSCONFDIR%% + + ## Log level + # Uncomment to change the log level (default is normal: 2) +@@ -59,8 +59,8 @@ + # log_ident = + + ## username and groupname the daemon runs as +-# user = sqlgrey +-# group = sqlgrey ++# user = %%SQLGREY_USER%% ++# group = %%SQLGREY_GROUP%% + + ## Socket + # On which socket do SQLgrey wait for queries +@@ -75,7 +75,7 @@ + + ## Config directory + # where to look for other configuration files (whitelists) +-# confdir = /etc/sqlgrey ++# confdir = %%PKG_SYSCONFDIR%% + + ## Greylisting delays + # If you want to be really strict (RFC-wise) use these |