summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter <peter@pkgsrc.org>2005-06-28 12:43:57 +0000
committerpeter <peter@pkgsrc.org>2005-06-28 12:43:57 +0000
commit868975711d1305886c1178d0b1d72aea7e951507 (patch)
tree490bbd771a0c9cc3e27cb0ee7f3344bad641ba9a
parent762c5a45c78c525bef97dc03bbc9933b6eefd682 (diff)
downloadpkgsrc-868975711d1305886c1178d0b1d72aea7e951507.tar.gz
Initial import of spamd-20050624 (from OpenBSD 3.7 sources).
spamd is a fake sendmail(8)-like daemon which rejects false mail. If the pf packet filter (security/pflkm) is configured to redirect port 25 (SMTP) to this daemon, it will attempt to waste the time and resources of the spam sender. Approved by Thomas Klausner.
-rw-r--r--mail/spamd/DESCR4
-rw-r--r--mail/spamd/MESSAGE9
-rw-r--r--mail/spamd/Makefile52
-rw-r--r--mail/spamd/PLIST18
-rw-r--r--mail/spamd/distinfo5
-rw-r--r--mail/spamd/files/pfspamd.sh23
6 files changed, 111 insertions, 0 deletions
diff --git a/mail/spamd/DESCR b/mail/spamd/DESCR
new file mode 100644
index 00000000000..6364d984a81
--- /dev/null
+++ b/mail/spamd/DESCR
@@ -0,0 +1,4 @@
+spamd is a fake sendmail(8)-like daemon which rejects false mail. If the
+pf packet filter (security/pflkm) is configured to redirect port 25 (SMTP)
+to this daemon, it will attempt to waste the time and resources of
+the spam sender. Imported from the OpenBSD 3.7 sources.
diff --git a/mail/spamd/MESSAGE b/mail/spamd/MESSAGE
new file mode 100644
index 00000000000..260eaedd0b3
--- /dev/null
+++ b/mail/spamd/MESSAGE
@@ -0,0 +1,9 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 2005/06/28 12:43:57 peter Exp $
+
+Don't forget to add the spamd ports to /etc/services:
+
+spamd 8025/tcp # spamd(8)
+spamd-cfg 8026/tcp # spamd(8) configuration
+
+===========================================================================
diff --git a/mail/spamd/Makefile b/mail/spamd/Makefile
new file mode 100644
index 00000000000..624401cbe7b
--- /dev/null
+++ b/mail/spamd/Makefile
@@ -0,0 +1,52 @@
+# $NetBSD: Makefile,v 1.1.1.1 2005/06/28 12:43:57 peter Exp $
+
+DISTNAME= spamd-20050624
+CATEGORIES= mail
+MASTER_SITES= http://nedbsd.nl/~ppostma/pf/
+
+MAINTAINER= peter@pointless.nl
+HOMEPAGE= http://www.benzedrine.cx/relaydb.html
+COMMENT= OpenBSD spam deferral daemon
+
+ONLY_FOR_PLATFORM= NetBSD-[2-9]*-*
+
+USE_PKGINSTALL= yes
+NO_CONFIGURE= yes
+
+PKG_USERS= _spamd:_spamd::Spam\\ Daemon:${VARBASE}/chroot/spamd:/sbin/nologin
+PKG_GROUPS= _spamd
+
+OWN_DIRS= ${VARBASE}/chroot/spamd
+RCD_SCRIPTS= pfspamd
+
+CONF_FILES= ${PREFIX}/share/examples/spamd/spamd.conf \
+ ${PKG_SYSCONFDIR}/spamd.conf
+
+SUBST_CLASSES= fix
+SUBST_STAGE.fix= post-patch
+SUBST_FILES.fix= spamd/spamd.8
+SUBST_FILES.fix+= spamd-setup/spamd-setup.c spamd-setup/spamd-setup.8
+SUBST_SED.fix= -e 's,/etc/spamd.conf,${PKG_SYSCONFDIR}/spamd.conf,g'
+SUBST_MESSAGE.fix= "Fixing configuration paths."
+
+do-install:
+ ${INSTALL_MAN} ${WRKSRC}/man/spamd.conf.5 ${PREFIX}/man/man5
+ ${INSTALL_MAN} ${WRKSRC}/man/spamd.conf.cat5 ${PREFIX}/man/cat5/spamd.conf.0
+ ${INSTALL_MAN} ${WRKSRC}/spamd/spamd.8 ${PREFIX}/man/man8
+ ${INSTALL_MAN} ${WRKSRC}/spamd/spamd.cat8 ${PREFIX}/man/cat8/spamd.0
+ ${INSTALL_MAN} ${WRKSRC}/spamd-setup/spamd-setup.8 ${PREFIX}/man/man8
+ ${INSTALL_MAN} ${WRKSRC}/spamd-setup/spamd-setup.cat8 ${PREFIX}/man/cat8/spamd-setup.0
+ ${INSTALL_MAN} ${WRKSRC}/spamdb/spamdb.8 ${PREFIX}/man/man8
+ ${INSTALL_MAN} ${WRKSRC}/spamdb/spamdb.cat8 ${PREFIX}/man/cat8/spamdb.0
+ ${INSTALL_MAN} ${WRKSRC}/spamlogd/spamlogd.8 ${PREFIX}/man/man8
+ ${INSTALL_MAN} ${WRKSRC}/spamlogd/spamlogd.cat8 ${PREFIX}/man/cat8/spamlogd.0
+
+ ${INSTALL_PROGRAM} ${WRKSRC}/spamd-setup/spamd-setup ${PREFIX}/libexec
+ ${INSTALL_PROGRAM} ${WRKSRC}/spamd/spamd ${PREFIX}/libexec
+ ${INSTALL_PROGRAM} ${WRKSRC}/spamdb/spamdb ${PREFIX}/sbin
+ ${INSTALL_PROGRAM} ${WRKSRC}/spamlogd/spamlogd ${PREFIX}/libexec
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/spamd
+ ${INSTALL_DATA} ${WRKSRC}/etc/spamd.conf ${PREFIX}/share/examples/spamd
+
+.include "../../security/pflkm/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/mail/spamd/PLIST b/mail/spamd/PLIST
new file mode 100644
index 00000000000..82c81048851
--- /dev/null
+++ b/mail/spamd/PLIST
@@ -0,0 +1,18 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2005/06/28 12:43:57 peter Exp $
+libexec/spamd
+libexec/spamd-setup
+libexec/spamlogd
+man/cat5/spamd.conf.0
+man/cat8/spamd-setup.0
+man/cat8/spamd.0
+man/cat8/spamdb.0
+man/cat8/spamlogd.0
+man/man5/spamd.conf.5
+man/man8/spamd-setup.8
+man/man8/spamd.8
+man/man8/spamdb.8
+man/man8/spamlogd.8
+sbin/spamdb
+share/examples/rc.d/spamd
+share/examples/spamd/spamd.conf
+@dirrm share/examples/spamd
diff --git a/mail/spamd/distinfo b/mail/spamd/distinfo
new file mode 100644
index 00000000000..c109b3a4014
--- /dev/null
+++ b/mail/spamd/distinfo
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1.1.1 2005/06/28 12:43:57 peter Exp $
+
+SHA1 (spamd-20050624.tar.gz) = 744a62d2fc3e4049debafad5e4069c987d80fcd7
+RMD160 (spamd-20050624.tar.gz) = cfbdafbc344f07b5f106ffdddd2a9702b8312c75
+Size (spamd-20050624.tar.gz) = 33152 bytes
diff --git a/mail/spamd/files/pfspamd.sh b/mail/spamd/files/pfspamd.sh
new file mode 100644
index 00000000000..6aa0c314373
--- /dev/null
+++ b/mail/spamd/files/pfspamd.sh
@@ -0,0 +1,23 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: pfspamd.sh,v 1.1.1.1 2005/06/28 12:43:57 peter Exp $
+#
+# PROVIDE: pfspamd
+# REQUIRE: DAEMON
+#
+
+. /etc/rc.subr
+
+name="pfspamd"
+rcvar=$name
+command="@PREFIX@/libexec/spamd"
+
+pfspamd_postcmd()
+{
+ if [ -x @PREFIX@/libexec/spamd-setup ]; then
+ @PREFIX@/libexec/spamd-setup
+ fi
+}
+
+load_rc_config $name
+run_rc_command "$1"