summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2004-06-11 05:54:37 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2004-06-11 05:54:37 +0000
commit1d6794a9716e17e7df059adb175c21182ba6eab4 (patch)
tree221bf90e6da493337efb95b2df9d3542ba1b79ef
parentRegister new conflicts on xorg-fontserver. (diff)
Spamilter is a Sendmail milter written entierly in C, and therefore
is faster and less cpu intensive than other interperative based solutions. It blocks spam using the following methods; * Configurable Realtime DNS Blacklists * Sender Address verification * Configurable Black and White lists * Invalid MTA hostname verfication * Basic Virus/Worm file attachment rejection for files ending in .pif, .scr, etc.. via MsExtChk filter * SPF via libspf Also; * Realtime firewall blocking of MTA hosts with invalid host names via MtaHostIpfw filter * Realtime rate limited connection blocking via firewall rule injection All actions are logged via syslog with both the sender and the recipient. From this, report generation and notification to recipients showing activity becomes extremely simple. WWW: http://www.wanlink.com/spamilter/index.php
Notes
Notes: svn path=/head/; revision=111253
-rw-r--r--mail/Makefile1
-rw-r--r--mail/spamilter/Makefile100
-rw-r--r--mail/spamilter/distinfo2
-rw-r--r--mail/spamilter/files/patch-Makefile.tmpl37
-rw-r--r--mail/spamilter/files/spamilter.sh36
-rw-r--r--mail/spamilter/pkg-descr24
6 files changed, 200 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile
index 804921520aa1..e84d7a21c65e 100644
--- a/mail/Makefile
+++ b/mail/Makefile
@@ -384,6 +384,7 @@
SUBDIR += spambnc
SUBDIR += spamd
SUBDIR += spamguard
+ SUBDIR += spamilter
SUBDIR += spamoracle
SUBDIR += spampd
SUBDIR += spamprobe
diff --git a/mail/spamilter/Makefile b/mail/spamilter/Makefile
new file mode 100644
index 000000000000..3df7e1ec1cb6
--- /dev/null
+++ b/mail/spamilter/Makefile
@@ -0,0 +1,100 @@
+# New ports collection makefile for: spamilter
+# Date created: 21. Apr 2004
+# Whom: dirk.meyer@dinoex.sub.org
+#
+# $FreeBSD$
+#
+
+PORTNAME= spamilter
+PORTVERSION= 0.59
+CATEGORIES= mail
+MASTER_SITES= http://www.wanlink.com/spamilter/download/
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= dinoex@FreeBSD.org
+COMMENT= A Sendmail LibMilter filter to block spam
+
+.if !defined(SENDMAIL_MILTER_IN_BASE)
+BUILD_DEPENDS= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail
+.endif
+
+WRKSRC= ${WRKDIR}/${PORTNAME}
+USE_REINPLACE= yes
+HAS_CONFIGURE= yes
+CFLAGS+= ${PTHREAD_CFLAGS:S=""==}
+LDFLAGS+= ${PTHREAD_LIBS}
+MAKE_ENV+= LDFLAGS="${LDFLAGS}"
+
+BINFILES= spamilter-system-report spamilter-user-report
+DOCSFILES= Changelog INSTALL LICENSE docs/docs.html docs/docs.txt
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} > 500000
+ALL_TARGET= spamilter dnsblchk mxlookup iflookup
+.else
+PLIST_FILES+= bin/ipfwmtad
+.endif
+.if ${OSVERSION} > 501000
+BROKEN= resource starvation in threads
+.endif
+
+.if !defined(SENDMAIL_MILTER_IN_BASE)
+LDFLAGS+= -L${LOCALBASE}/lib
+CONFIGURE_ARGS+= --sendmail_dir ${LOCALBASE}
+.endif
+#CFLAGS+= -DDEBUG_TIMESTAMP
+
+PLIST_FILES+= bin/dnsblchk bin/mxlookup bin/spamilter \
+ bin/spamilter-system-report bin/spamilter-user-report \
+ etc/rc.d/milter-spamilter.sh.sample
+.if !defined(NOPORTDOCS)
+PLIST_FILES+= %%DOCSDIR%%/Changelog %%DOCSDIR%%/INSTALL %%DOCSDIR%%/LICENSE
+PLIST_FILES+= %%DOCSDIR%%/docs.html %%DOCSDIR%%/docs.txt
+PLIST_DIRS+= %%DOCSDIR%%
+.endif
+
+.if defined(SENDMAIL_WITHOUT_MILTER)
+pre-fetch:
+ @${ECHO_MSG}
+ @${ECHO_MSG} You must unset variable SENDMAIL_WITHOUT_MILTER,
+ @${ECHO_MSG} and rebuild sendmail in the ports
+ @${FALSE}
+.endif
+
+pre-configure:
+ @${SED} -e "s=%%PREFIX%%=${PREFIX}=" ${FILESDIR}/spamilter.sh \
+ > ${WRKSRC}/spamilter.sh
+ ${REINPLACE_CMD} \
+ -e "s=/etc/spamilter.rc=${PREFIX}/etc/spamilter.rc=" \
+ ${WRKSRC}/spamilter.c \
+ ${WRKSRC}/docs/docs.html ${WRKSRC}/docs/docs.txt
+
+post-configure:
+ ${REINPLACE_CMD} \
+ -e "s|^CFLAGS=|#CFLAGS=|" \
+ -e "s|^LDFLAGS=|#LDFLAGS=|" \
+ -e "s|^LIBDIRS=|#LIBDIRS=|" \
+ -e "s|/usr/local/bind|${LOCALBASE}/bind|" \
+ -e "s|/usr/local/|${PREFIX}/|" \
+ ${WRKSRC}/Makefile
+.if ${OSVERSION} > 500000
+ ${REINPLACE_CMD} \
+ -e "s| install-ipfwmtad | |" \
+ ${WRKSRC}/Makefile
+.endif
+
+post-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/spamilter.sh \
+ ${PREFIX}/etc/rc.d/milter-spamilter.sh.sample
+.for i in ${BINFILES}
+ ${INSTALL_SCRIPT} ${WRKSRC}/${i} ${PREFIX}/bin/
+.endfor
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+.for i in ${DOCSFILES}
+ ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}/
+.endfor
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/mail/spamilter/distinfo b/mail/spamilter/distinfo
new file mode 100644
index 000000000000..15a5f6ae903d
--- /dev/null
+++ b/mail/spamilter/distinfo
@@ -0,0 +1,2 @@
+MD5 (spamilter-0.59.tgz) = 4d3d619100874ca44f7afb934ad79061
+SIZE (spamilter-0.59.tgz) = 108498
diff --git a/mail/spamilter/files/patch-Makefile.tmpl b/mail/spamilter/files/patch-Makefile.tmpl
new file mode 100644
index 000000000000..151bc2a12dd6
--- /dev/null
+++ b/mail/spamilter/files/patch-Makefile.tmpl
@@ -0,0 +1,37 @@
+--- Makefile.tmpl.orig Sun Apr 11 01:53:56 2004
++++ Makefile.tmpl Wed Apr 21 17:48:38 2004
+@@ -68,7 +68,7 @@
+ <Linux> rm -f *.o *core spamilter dnsblchk dnsblupd mxlookup iflookup
+ <ALL> cd libspf; ${MAKE} $@
+ <ALL>
+-<BSD>install: spamilter install-dnsblchk install-ipfwmtad install-mxlookup install-startup
++<BSD>install: spamilter install-dnsblchk install-ipfwmtad install-mxlookup
+ <SunOS>install: spamilter install-dnsblchk install-mxlookup
+ <Linux>install: spamilter install-dnsblchk install-mxlookup
+ <ALL> install -c -m ${BINMODE} -g ${BINGRP} -o ${BINOWN} spamilter ${BINDIR}
+@@ -92,14 +92,14 @@
+ <ALL> cd ..; tar --exclude CVS -cfvz spamilter.tgz spamilter/*
+ <ALL>
+ <BSD>spamilter: Makefile ${SRCS} spamilter.o ${OBJS} libspf.a ${INCLUDES}
+-<BSD> ${CC} ${CFLAGS} -o spamilter spamilter.o ${OBJS} libspf.a ${LIBDIRS} ${LIBS}
++<BSD> ${CC} ${CFLAGS} -o spamilter spamilter.o ${OBJS} libspf.a ${LDFLAGS} ${LIBDIRS} ${LIBS}
+ <SunOS>spamilter: Makefile ${SRCS} ${NRSRCS} ${SVSRCS} spamilter.o libspf.a ${OBJS} ${NROBJS} ${SVOBJS} ${INCLUDES}
+ <SunOS> ${CC} ${CFLAGS} -o spamilter spamilter.o ${OBJS} libspf.a ${NROBJS} ${SVOBJS} ${LIBDIRS} ${LIBS}
+ <Linux>spamilter: Makefile ${SRCS} ${NRSRCS} spamilter.o ${OBJS} libspf.a ${NROBJS} ${INCLUDES}
+ <Linux> ${CC} ${CFLAGS} -o spamilter spamilter.o ${OBJS} libspf.a ${NROBJS} ${LIBDIRS} ${LIBS}
+ <ALL>
+ <BSD>dnsblchk: Makefile ${SRCS} dnsblchk.o ${OBJS} ${INCLUDES} dnsblchk.c
+-<BSD> ${CC} ${CFLAGS} -o dnsblchk dnsblchk.o dnsbl.o dns.o smisc.o misc.o mx.o smtp.o inet.o ifi.o ${LIBDIRS} ${LIBS}
++<BSD> ${CC} ${CFLAGS} -o dnsblchk dnsblchk.o dnsbl.o dns.o smisc.o misc.o mx.o smtp.o inet.o ifi.o ${LDFLAGS} ${LIBDIRS} ${LIBS}
+ <SunOS>dnsblchk: Makefile ${SRCS} ${NRSRCS} ${SVSRCS} dnsblchk.o ${OBJS} ${NROBJS} ${SVOBJS} ${INCLUDES} dnsblchk.c
+ <SunOS> ${CC} ${CFLAGS} -o dnsblchk dnsblchk.o dnsbl.o dns.o smisc.o misc.o mx.o smtp.o inet.o ifi.o ${NROBJS} ${SVOBJS} ${LIBDIRS} ${LIBS}
+ <Linux>dnsblchk: Makefile ${SRCS} ${NRSRCS} dnsblchk.o ${OBJS} ${NROBJS} ${INCLUDES} dnsblchk.c
+@@ -123,7 +123,7 @@
+ <SunOS> ${CC} ${CFLAGS} -o mxlookup mxlookup.o mx.o ${NROBJS} -lresolv
+ <ALL>
+ <ALL>iflookup: Makefile iflookup.c ifi.c iflookup.o ifi.o ifi.h
+-<ALL> ${CC} ${CFLAGS} -o iflookup iflookup.o ifi.o ${LIBDIRS} ${LIBS}
++<ALL> ${CC} ${CFLAGS} -o iflookup iflookup.o ifi.o ${LDFLAGS} ${LIBDIRS} ${LIBS}
+ <ALL>
+ <ALL>libspf.a:
+ <ALL> cd libspf; ${MAKE}
diff --git a/mail/spamilter/files/spamilter.sh b/mail/spamilter/files/spamilter.sh
new file mode 100644
index 000000000000..db0c3f1df62e
--- /dev/null
+++ b/mail/spamilter/files/spamilter.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+if ! test -x %%PREFIX%%/bin/spamilter
+then
+ exit 0
+fi
+case "$1" in
+start)
+ rm -f /tmp/Spamilter.pid
+ %%PREFIX%%/bin/spamilter &&
+ echo -n ' spamilter'
+ ;;
+stop)
+ if test -r /tmp/Spamilter.pid
+ then
+ kill `head -1 /tmp/Spamilter.pid`
+ else
+ echo " spamilter: not running" 2>&1
+ fi
+ rm -f /tmp/Spamilter.pid
+ ;;
+reload)
+ if test -r /tmp/Spamilter.pid
+ then
+ kill -USR1 `head -1 /tmp/Spamilter.pid`
+ else
+ echo " spamilter: not running" 2>&1
+ fi
+ ;;
+*)
+ echo "Usage: ${0##*/}: { start | stop | reload }" >&2
+ exit 64
+ ;;
+esac
diff --git a/mail/spamilter/pkg-descr b/mail/spamilter/pkg-descr
new file mode 100644
index 000000000000..225f9162b963
--- /dev/null
+++ b/mail/spamilter/pkg-descr
@@ -0,0 +1,24 @@
+Spamilter is a Sendmail milter written entierly in C, and therefore
+is faster and less cpu intensive than other interperative based solutions.
+
+It blocks spam using the following methods;
+
+ * Configurable Realtime DNS Blacklists
+ * Sender Address verification
+ * Configurable Black and White lists
+ * Invalid MTA hostname verfication
+ * Basic Virus/Worm file attachment rejection for files ending
+ in .pif, .scr, etc.. via MsExtChk filter
+ * SPF via libspf
+
+Also;
+
+ * Realtime firewall blocking of MTA hosts with invalid host names via
+ MtaHostIpfw filter
+ * Realtime rate limited connection blocking via firewall rule injection
+
+All actions are logged via syslog with both the sender and the recipient.
+From this, report generation and notification to recipients showing
+ activity becomes extremely simple.
+
+WWW: http://www.wanlink.com/spamilter/index.php