diff options
author | ghen <ghen@pkgsrc.org> | 2007-08-07 12:34:56 +0000 |
---|---|---|
committer | ghen <ghen@pkgsrc.org> | 2007-08-07 12:34:56 +0000 |
commit | 8a75bc97495b881418d74732c96c4ff63c4575ce (patch) | |
tree | 82f45391aa96288575f22607fca2261c0fcd472d /mail | |
parent | a0aba5f2d3d5d28aa800568dfe8a7324a0507c3a (diff) | |
download | pkgsrc-8a75bc97495b881418d74732c96c4ff63c4575ce.tar.gz |
Import policyd-1.81, based on input from Marcin M. Jessa <yazzy@yazzy.org>.
Policyd is an anti-spam plugin for Postfix (written in C) that does
greylisting, sender-(envelope, SASL or host/ip)-based throttling (on
messages and/or volume per defined time unit), recipient rate limiting,
spamtrap monitoring/blacklisting, HELO auto blacklisting and HELO
randomization preventation.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/policyd/DESCR | 5 | ||||
-rw-r--r-- | mail/policyd/MESSAGE | 12 | ||||
-rw-r--r-- | mail/policyd/Makefile | 48 | ||||
-rw-r--r-- | mail/policyd/PLIST | 12 | ||||
-rw-r--r-- | mail/policyd/distinfo | 7 | ||||
-rw-r--r-- | mail/policyd/files/policyd.sh | 21 | ||||
-rw-r--r-- | mail/policyd/patches/patch-aa | 31 | ||||
-rw-r--r-- | mail/policyd/patches/patch-ab | 13 |
8 files changed, 149 insertions, 0 deletions
diff --git a/mail/policyd/DESCR b/mail/policyd/DESCR new file mode 100644 index 00000000000..052f7d7f277 --- /dev/null +++ b/mail/policyd/DESCR @@ -0,0 +1,5 @@ +Policyd is an anti-spam plugin for Postfix (written in C) that does +greylisting, sender-(envelope, SASL or host/ip)-based throttling (on +messages and/or volume per defined time unit), recipient rate limiting, +spamtrap monitoring/blacklisting, HELO auto blacklisting and HELO +randomization preventation. diff --git a/mail/policyd/MESSAGE b/mail/policyd/MESSAGE new file mode 100644 index 00000000000..605964eee19 --- /dev/null +++ b/mail/policyd/MESSAGE @@ -0,0 +1,12 @@ +=========================================================================== +$NetBSD: MESSAGE,v 1.1.1.1 2007/08/07 12:34:56 ghen Exp $ + +A script to create the necessary tables can be found in: + + ${EGDIR}/DATABASE.mysql + +For regular database maintenance, add the following crontab entry: + + 0 * * * * ${BINDIR}/cleanup -c ${PKG_SYSCONFDIR}/policyd.conf + +=========================================================================== diff --git a/mail/policyd/Makefile b/mail/policyd/Makefile new file mode 100644 index 00000000000..69d9210b7ce --- /dev/null +++ b/mail/policyd/Makefile @@ -0,0 +1,48 @@ +# $NetBSD: Makefile,v 1.1.1.1 2007/08/07 12:34:56 ghen Exp $ + +DISTNAME= policyd-1.81 +CATEGORIES= mail +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=policyd/} + +MAINTAINER= ghen@NetBSD.org +HOMEPAGE= http://www.policyd.org/ +COMMENT= Policy daemon for Postfix with greylisting and throttling + +USE_TOOLS+= gmake +USE_LANGUAGES= c c++ + +BUILD_TARGET= build +MAKE_ENV+= MYSQL_PREFIX=${BUILDLINK_PREFIX.mysql-client} + +BUILD_DEFS+= VARBASE + +BINDIR= ${PREFIX}/libexec/policyd +DOCDIR= ${PREFIX}/share/doc/policyd +EGDIR= ${PREFIX}/share/examples/policyd +INSTALLATION_DIRS= ${BINDIR} ${DOCDIR} ${EGDIR} + +CONF_FILES= ${EGDIR}/policyd.conf ${PKG_SYSCONFDIR}/policyd.conf + +RCD_SCRIPTS= policyd + +SUBST_CLASSES+= config +SUBST_STAGE.config= post-build +SUBST_FILES.config= policyd.conf +SUBST_SED.config= -e 's,%%VARBASE%%,${VARBASE},' + +FILES_SUBST+= BINDIR=${BINDIR} +MESSAGE_SUBST+= BINDIR=${BINDIR} +MESSAGE_SUBST+= EGDIR=${EGDIR} + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/policyd ${BINDIR} + ${INSTALL_PROGRAM} ${WRKSRC}/cleanup ${BINDIR} + ${INSTALL_PROGRAM} ${WRKSRC}/stats ${BINDIR} + ${INSTALL_DATA} ${WRKSRC}/README ${DOCDIR} + ${INSTALL_DATA} ${WRKSRC}/policyd.conf ${EGDIR} + ${INSTALL_DATA} ${WRKSRC}/doc/blacklist_helo.sql ${EGDIR} + ${INSTALL_DATA} ${WRKSRC}/doc/whitelist.sql ${EGDIR} + ${INSTALL_DATA} ${WRKSRC}/DATABASE.mysql ${EGDIR} + +.include "../../mk/mysql.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/mail/policyd/PLIST b/mail/policyd/PLIST new file mode 100644 index 00000000000..c92c5ee8e58 --- /dev/null +++ b/mail/policyd/PLIST @@ -0,0 +1,12 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2007/08/07 12:34:56 ghen Exp $ +libexec/policyd/cleanup +libexec/policyd/policyd +libexec/policyd/stats +share/doc/policyd/README +share/examples/policyd/DATABASE.mysql +share/examples/policyd/blacklist_helo.sql +share/examples/policyd/policyd.conf +share/examples/policyd/whitelist.sql +share/examples/rc.d/policyd +@dirrm share/examples/policyd +@dirrm share/doc/policyd diff --git a/mail/policyd/distinfo b/mail/policyd/distinfo new file mode 100644 index 00000000000..412c4481733 --- /dev/null +++ b/mail/policyd/distinfo @@ -0,0 +1,7 @@ +$NetBSD: distinfo,v 1.1.1.1 2007/08/07 12:34:56 ghen Exp $ + +SHA1 (policyd-1.81.tar.gz) = acb6a34826995be04d66d50a93e379823c929ec6 +RMD160 (policyd-1.81.tar.gz) = e25798338d7ff082e32ec5288e721ed7c75235c3 +Size (policyd-1.81.tar.gz) = 68309 bytes +SHA1 (patch-aa) = f1be4bf5f101e15d8f73b05a73fdd1ca324b72eb +SHA1 (patch-ab) = 9ef169a450d316c5f9f6b863fa5d618c77636738 diff --git a/mail/policyd/files/policyd.sh b/mail/policyd/files/policyd.sh new file mode 100644 index 00000000000..4158ebabb1c --- /dev/null +++ b/mail/policyd/files/policyd.sh @@ -0,0 +1,21 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: policyd.sh,v 1.1.1.1 2007/08/07 12:34:56 ghen Exp $ + +# PROVIDE: policyd +# BEFORE: mail +# AFTER: mysqld +# REQUIRE: DAEMON + +. /etc/rc.subr + +name="policyd" +rcvar=$name +command="@BINDIR@/${name}" +conf_file="@PKG_SYSCONFDIR@/$name.conf" +required_files="${conf_file}" +pidfile="@VARBASE@/run/${name}.pid" +command_args="-c ${conf_file}" + +load_rc_config $name +run_rc_command "$1" diff --git a/mail/policyd/patches/patch-aa b/mail/policyd/patches/patch-aa new file mode 100644 index 00000000000..7ded715f7fb --- /dev/null +++ b/mail/policyd/patches/patch-aa @@ -0,0 +1,31 @@ +$NetBSD: patch-aa,v 1.1.1.1 2007/08/07 12:34:56 ghen Exp $ + +--- policyd.conf.orig 2007-07-11 09:06:23.000000000 +0200 ++++ policyd.conf +@@ -81,7 +81,7 @@ DATABASE_KEEPALIVE=0 + # 2 -> 1+mysql queries+results + # 3 -> 1+2+network debugging + # 0=off +-DEBUG=3 ++DEBUG=0 + + # + # daemon/background mode: default: off +@@ -90,7 +90,7 @@ DEBUG=3 + # that things are working as they should. + # + # 1=on 0=off +-DAEMON=0 ++DAEMON=1 + + # + # bind to ip address: +@@ -111,7 +111,7 @@ BINDPORT=10031 + # + # where policyd will write its current pid to + # +-PIDFILE=/var/run/policyd.pid ++PIDFILE=%%VARBASE%%/run/policyd.pid + + # + # syslog facility diff --git a/mail/policyd/patches/patch-ab b/mail/policyd/patches/patch-ab new file mode 100644 index 00000000000..66886e1f400 --- /dev/null +++ b/mail/policyd/patches/patch-ab @@ -0,0 +1,13 @@ +$NetBSD: patch-ab,v 1.1.1.1 2007/08/07 12:34:56 ghen Exp $ + +--- Makefile.orig 2007-07-11 09:06:23.000000000 +0200 ++++ Makefile +@@ -14,6 +14,8 @@ lib += -L/usr/pkg/lib/mysql + # os x + lib += -L/usr/local/mysql + ++inc = -I${MYSQL_PREFIX}/include/mysql ++lib = -L${MYSQL_PREFIX}/lib/mysql -Wl,-R${MYSQL_PREFIX}/lib/mysql + + CC := gcc + CPPFLAGS := -O $(inc) |