pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mail/dnsbl-milter Add dnsbl 6.40 packaged as dnsbl-mil...
details: https://anonhg.NetBSD.org/pkgsrc/rev/f83a058cdac8
branches: trunk
changeset: 634267:f83a058cdac8
user: sborrill <sborrill%pkgsrc.org@localhost>
date: Tue May 13 15:31:40 2014 +0000
description:
Add dnsbl 6.40 packaged as dnsbl-milter. This is a milter for sendmail
that performs DNSBL filtering.
diffstat:
mail/dnsbl-milter/DESCR | 1 +
mail/dnsbl-milter/Makefile | 46 +++++++++++++++++++++++
mail/dnsbl-milter/PLIST | 8 ++++
mail/dnsbl-milter/distinfo | 8 ++++
mail/dnsbl-milter/files/dnsbl-milter.sh | 20 ++++++++++
mail/dnsbl-milter/patches/patch-src_context.cpp | 22 +++++++++++
mail/dnsbl-milter/patches/patch-src_dnsbl.cpp | 24 ++++++++++++
mail/dnsbl-milter/patches/patch-src_tokenizer.cpp | 21 ++++++++++
8 files changed, 150 insertions(+), 0 deletions(-)
diffs (182 lines):
diff -r ac9c500ec749 -r f83a058cdac8 mail/dnsbl-milter/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/dnsbl-milter/DESCR Tue May 13 15:31:40 2014 +0000
@@ -0,0 +1,1 @@
+A sendmail milter with per-user dnsbl filtering
diff -r ac9c500ec749 -r f83a058cdac8 mail/dnsbl-milter/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/dnsbl-milter/Makefile Tue May 13 15:31:40 2014 +0000
@@ -0,0 +1,46 @@
+# $NetBSD: Makefile,v 1.1 2014/05/13 15:31:40 sborrill Exp $
+#
+
+VERSION= 6.40
+PKGNAME= dnsbl-milter-${VERSION}
+DISTNAME= dnsbl-${VERSION}
+CATEGORIES= mail
+MASTER_SITES= http://www.five-ten-sg.com/dnsbl/packages/
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= http://www.five-ten-sg.com/dnsbl/
+COMMENT= DNSBL Sendmail milter
+LICENSE= gnu-gpl-v3
+
+GNU_CONFIGURE= yes
+PKG_SYSCONFSUBDIR?= dnsbl-milter
+CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}/${PKG_SYSCONFSUBDIR}
+
+USE_LANGUAGES= c c++
+
+RCD_SCRIPTS= dnsbl-milter
+
+SUBST_CLASSES+= conf
+SUBST_STAGE.conf= pre-configure
+SUBST_FILES.conf= src/dnsbl.cpp
+SUBST_FILES.conf+= src/tokenizer.cpp
+SUBST_FILES.conf+= src/context.cpp
+SUBST_SED.conf+= -e "s|@CONFDIR@|${PKG_SYSCONFDIR}|g"
+SUBST_MESSAGE.conf= Fixing paths for configuration
+
+EGDIR= share/examples/dnsbl-milter
+
+CONFS= dnsbl.conf hosts-ignore.conf tld.conf html-tags.conf
+.for f in ${CONFS}
+CONF_FILES+= ${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f}
+.endfor
+
+INSTALLATION_DIRS= ${EGDIR} ${PKGMANDIR}/man1 ${PKGMANDIR}/man5
+INSTALL_DIRS= src man
+
+post-install:
+ cd ${WRKSRC} && ${INSTALL_DATA} ${CONFS} ${DESTDIR}${PREFIX}/${EGDIR}
+
+.include "../../mail/libmilter/buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r ac9c500ec749 -r f83a058cdac8 mail/dnsbl-milter/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/dnsbl-milter/PLIST Tue May 13 15:31:40 2014 +0000
@@ -0,0 +1,8 @@
+@comment $NetBSD: PLIST,v 1.1 2014/05/13 15:31:40 sborrill Exp $
+man/man1/dnsbl.1
+man/man5/dnsbl.conf.5
+sbin/dnsbl
+share/examples/dnsbl-milter/dnsbl.conf
+share/examples/dnsbl-milter/hosts-ignore.conf
+share/examples/dnsbl-milter/html-tags.conf
+share/examples/dnsbl-milter/tld.conf
diff -r ac9c500ec749 -r f83a058cdac8 mail/dnsbl-milter/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/dnsbl-milter/distinfo Tue May 13 15:31:40 2014 +0000
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2014/05/13 15:31:40 sborrill Exp $
+
+SHA1 (dnsbl-6.40.tar.gz) = c545055cbb2739925d3d3202a8c0b4aafb6dea43
+RMD160 (dnsbl-6.40.tar.gz) = 7057ef71d62c72bc96946082deb66d6341ed29d7
+Size (dnsbl-6.40.tar.gz) = 605285 bytes
+SHA1 (patch-src_context.cpp) = 9cfd237be9ac059acd741e4430f43c4152001fd8
+SHA1 (patch-src_dnsbl.cpp) = c5b7cfdd4656472f170c32c452e71741e9715323
+SHA1 (patch-src_tokenizer.cpp) = 3f628ffabcddd7c9a90118c8165b90f468d4a1b7
diff -r ac9c500ec749 -r f83a058cdac8 mail/dnsbl-milter/files/dnsbl-milter.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/dnsbl-milter/files/dnsbl-milter.sh Tue May 13 15:31:40 2014 +0000
@@ -0,0 +1,20 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: dnsbl-milter.sh,v 1.1 2014/05/13 15:31:40 sborrill Exp $
+#
+
+# PROVIDE: dnsblmilter
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name="dnsblmilter"
+pidfile="@VARBASE@/run/dnsbl.pid"
+rcvar=$name
+command="@PREFIX@/sbin/dnsbl"
+command_args="-p local:@VARBASE@/run/dnsbl.sock -r @VARBASE@/run/dnsbl-resolver.sock"
+required_files="@PKG_SYSCONFDIR@/dnsbl.conf"
+
+load_rc_config $name
+run_rc_command "$1"
diff -r ac9c500ec749 -r f83a058cdac8 mail/dnsbl-milter/patches/patch-src_context.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/dnsbl-milter/patches/patch-src_context.cpp Tue May 13 15:31:40 2014 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_context.cpp,v 1.1 2014/05/13 15:31:40 sborrill Exp $
+
+Don't force configuration files to be relative to cwd
+
+--- src/context.cpp.orig 2014-05-13 16:06:05.000000000 +0100
++++ src/context.cpp 2014-05-13 16:08:21.000000000 +0100
+@@ -445,7 +445,14 @@
+ void WHITELISTER::merge() {
+ time_t now = time(NULL);
+ ifstream ifs;
+- ifs.open(fn);
++
++ if (fn[0] != '/') {
++ string fullpath("@CONFDIR@");
++ fullpath += "/";
++ fullpath += fn;
++ ifs.open(fullpath.c_str());
++ } else
++ ifs.open(fn);
+ if (!ifs.fail()) {
+ const int maxlen = 1000;
+ char buf[maxlen];
diff -r ac9c500ec749 -r f83a058cdac8 mail/dnsbl-milter/patches/patch-src_dnsbl.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/dnsbl-milter/patches/patch-src_dnsbl.cpp Tue May 13 15:31:40 2014 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_dnsbl.cpp,v 1.1 2014/05/13 15:31:40 sborrill Exp $
+
+Don't force configuration files to be relative to cwd
+
+--- src/dnsbl.cpp.orig 2014-02-05 15:55:12.000000000 +0000
++++ src/dnsbl.cpp 2014-05-13 15:00:44.000000000 +0100
+@@ -1625,7 +1625,7 @@
+ snprintf(buf, sizeof(buf), "loading configuration generation %d", newc->generation);
+ my_syslog(buf);
+ }
+- if (load_conf(*newc, "dnsbl.conf")) {
++ if (load_conf(*newc, "@CONFDIR@/dnsbl.conf")) {
+ newc->load_time = time(NULL);
+ return newc;
+ }
+@@ -1700,7 +1700,7 @@
+ else {
+ // failed to load new config
+ my_syslog("failed to load new configuration");
+- system("echo 'failed to load new dnsbl configuration from /etc/dnsbl' | mail -s 'error in /etc/dnsbl configuration' root");
++ system("echo 'failed to load new dnsbl configuration from @CONFDIR@' | mail -s 'error in @CONFDIR@ configuration' root");
+ // update the load time on the current config to prevent complaining every 3 minutes
+ dc.load_time = time(NULL);
+ }
diff -r ac9c500ec749 -r f83a058cdac8 mail/dnsbl-milter/patches/patch-src_tokenizer.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/dnsbl-milter/patches/patch-src_tokenizer.cpp Tue May 13 15:31:40 2014 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-src_tokenizer.cpp,v 1.1 2014/05/13 15:31:40 sborrill Exp $
+
+Don't force configuration files to be relative to cwd
+
+--- src/tokenizer.cpp.orig 2014-02-05 15:55:12.000000000 +0000
++++ src/tokenizer.cpp 2014-05-13 16:05:49.000000000 +0100
+@@ -346,7 +346,13 @@
+ return false;
+ }
+ ifstream *is = new ifstream;
+- is->open(fn);
++ if (fn[0] != '/') {
++ string fullpath("@CONFDIR@");
++ fullpath += "/";
++ fullpath += fn;
++ is->open(fullpath.c_str());
++ } else
++ is->open(fn);
+ if (is->fail()) {
+ char buf[maxlen];
+ snprintf(buf, sizeof(buf), "include file %s not found", fn);
Home |
Main Index |
Thread Index |
Old Index