aboutsummaryrefslogtreecommitdiff
path: root/mail/spamd
diff options
context:
space:
mode:
authorOlli Hauer <ohauer@FreeBSD.org>2010-10-31 22:10:52 +0000
committerOlli Hauer <ohauer@FreeBSD.org>2010-10-31 22:10:52 +0000
commit1b62061be2af4e8d85f065f5b6888456a2d1f5fd (patch)
tree84d8b8b08d82292817e78317352ca3b966a2b727 /mail/spamd
parent269e873055cf7b4b678ec7c5d46f63fe9f1adc71 (diff)
downloadports-1b62061be2af4e8d85f065f5b6888456a2d1f5fd.tar.gz
ports-1b62061be2af4e8d85f065f5b6888456a2d1f5fd.zip
Notes
Diffstat (limited to 'mail/spamd')
-rw-r--r--mail/spamd/Makefile52
-rw-r--r--mail/spamd/distinfo5
-rw-r--r--mail/spamd/files/patch-spamd-setup__spamd-setup.c50
-rw-r--r--mail/spamd/files/patch-spamd__grey.c29
-rw-r--r--mail/spamd/files/pkg-install.in20
-rw-r--r--mail/spamd/files/pkg-message.in22
6 files changed, 30 insertions, 148 deletions
diff --git a/mail/spamd/Makefile b/mail/spamd/Makefile
index 008a3091fedb..d48b2716c67b 100644
--- a/mail/spamd/Makefile
+++ b/mail/spamd/Makefile
@@ -6,16 +6,17 @@
#
PORTNAME= spamd
-PORTVERSION= 4.5.0
-PORTREVISION= 4
+PORTVERSION= 4.8.0
CATEGORIES= mail
MASTER_SITES= BERLIOS
MASTER_SITE_SUBDIR=freebsdspamd
DISTNAME= ${PORTNAME}-${PORTVERSION}
-MAINTAINER= ohauer@gmx.de
+MAINTAINER= ohauer@FreeBSD.org
COMMENT= Traps spammers with a very slow smtp-login and return 4xx error
+LICENSE= BSD
+
USE_RC_SUBR?= obspamd obspamlogd
SPAMDUSER?= _spamd
@@ -64,44 +65,30 @@ SUB_FILES= pkg-install \
SUB_LIST= PREFIX=${PREFIX} \
${PLIST_SUB}
-pre-fetch:
- @${ECHO} ""
- @${ECHO} " **** UPGRADE WARNING: SYNC PROTOCOL CHANGED ****"
- @${ECHO} " If you have spamd in distributed environment stop"
- @${ECHO} " sync between old (4.1.x) and new version"
- @${ECHO} " until every node is updated"
- @${ECHO} ""
- @read -p "Hit ^c now to stop, any key to continue: " -t 5 a || true
- @${ECHO} ""
-
pre-install:
@${SH} ${PKGINSTALL} ${DISTNAME} PRE-INSTALL
-post-install:
- @${CAT} ${PKGMESSAGE}
-
do-install:
.if !defined(CPANEL)
- ${INSTALL_PROGRAM} ${WRKSRC}/spamd/spamd ${PREFIX}/libexec
+ @${INSTALL_PROGRAM} ${WRKSRC}/spamd/spamd ${PREFIX}/libexec
.else
- ${INSTALL_PROGRAM} ${WRKSRC}/spamd/spamd ${PREFIX}/libexec/obspamd
+ @${INSTALL_PROGRAM} ${WRKSRC}/spamd/spamd ${PREFIX}/libexec/obspamd
.endif
- ${INSTALL_PROGRAM} ${WRKSRC}/spamlogd/spamlogd ${PREFIX}/libexec
- ${INSTALL_PROGRAM} ${WRKSRC}/spamd-setup/spamd-setup ${PREFIX}/sbin
- ${INSTALL_PROGRAM} ${WRKSRC}/spamdb/spamdb ${PREFIX}/sbin
- ${INSTALL_MAN} ${WRKSRC}/etc/spamd.conf.5 ${PREFIX}/man/man5
- ${INSTALL_MAN} ${WRKSRC}/spamd/spamd.8 ${PREFIX}/man/man8
- ${INSTALL_MAN} ${WRKSRC}/spamd-setup/spamd-setup.8 ${PREFIX}/man/man8
- ${INSTALL_MAN} ${WRKSRC}/spamdb/spamdb.8 ${PREFIX}/man/man8
- ${INSTALL_MAN} ${WRKSRC}/spamlogd/spamlogd.8 ${PREFIX}/man/man8
- @if [ ! -d ${CONFIG_DIR} ]; then \
+ @${INSTALL_PROGRAM} ${WRKSRC}/spamlogd/spamlogd ${PREFIX}/libexec
+ @${INSTALL_PROGRAM} ${WRKSRC}/spamd-setup/spamd-setup ${PREFIX}/sbin
+ @${INSTALL_PROGRAM} ${WRKSRC}/spamdb/spamdb ${PREFIX}/sbin
+ @${INSTALL_MAN} ${WRKSRC}/etc/spamd.conf.5 ${PREFIX}/man/man5
+ @${INSTALL_MAN} ${WRKSRC}/spamd/spamd.8 ${PREFIX}/man/man8
+ @${INSTALL_MAN} ${WRKSRC}/spamd-setup/spamd-setup.8 ${PREFIX}/man/man8
+ @${INSTALL_MAN} ${WRKSRC}/spamdb/spamdb.8 ${PREFIX}/man/man8
+ @${INSTALL_MAN} ${WRKSRC}/spamlogd/spamlogd.8 ${PREFIX}/man/man8
+ @if [ ! -d ${CONFIG_DIR} ]; then \
${MKDIR} ${CONFIG_DIR}; \
fi
- @if [ ! -f ${SAMPLE_SPAMD_CONF} ]; then \
+ @if [ ! -f ${SAMPLE_SPAMD_CONF} ]; then \
${ECHO_MSG} "Installing ${SAMPLE_SPAMD_CONF} file."; \
- ${ECHO_MSG} "${INSTALL_DATA} -v -p ${WRKSRC}/etc/spamd.conf ${SAMPLE_SPAMD_CONF}"; \
- ${INSTALL_DATA} -v -p ${WRKSRC}/etc/spamd.conf \
- ${SAMPLE_SPAMD_CONF}; \
+ ${INSTALL_DATA} -p ${WRKSRC}/etc/spamd.conf \
+ ${SAMPLE_SPAMD_CONF}; \
fi
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@@ -109,4 +96,7 @@ do-install:
@${INSTALL_DATA} ${WRKSRC}/doc/spamdb.txt ${DOCSDIR}/
.endif
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
.include <bsd.port.mk>
diff --git a/mail/spamd/distinfo b/mail/spamd/distinfo
index 0e232eac673b..48204521a9b4 100644
--- a/mail/spamd/distinfo
+++ b/mail/spamd/distinfo
@@ -1,3 +1,2 @@
-MD5 (spamd-4.5.0.tar.gz) = ef501b144a8eadefc6971e53aef08f42
-SHA256 (spamd-4.5.0.tar.gz) = 52a8ae130b838b1b83a1025c5586ab78c6c4e364cd3089892858b83d4d62820f
-SIZE (spamd-4.5.0.tar.gz) = 52127
+SHA256 (spamd-4.8.0.tar.gz) = 47b76b88d954b447b1eeee51ac4b62bec392bead70aa1f01c025773d8486726f
+SIZE (spamd-4.8.0.tar.gz) = 52748
diff --git a/mail/spamd/files/patch-spamd-setup__spamd-setup.c b/mail/spamd/files/patch-spamd-setup__spamd-setup.c
deleted file mode 100644
index 68f542b4a638..000000000000
--- a/mail/spamd/files/patch-spamd-setup__spamd-setup.c
+++ /dev/null
@@ -1,50 +0,0 @@
---- ./spamd-setup/spamd-setup.c.orig 2009-07-19 19:11:35.000000000 +0200
-+++ ./spamd-setup/spamd-setup.c 2009-10-31 10:58:24.000000000 +0100
-@@ -83,7 +83,7 @@
- u_int8_t maxdiff(u_int32_t, u_int32_t);
- struct cidr *range2cidrlist(u_int32_t, u_int32_t);
- void cidr2range(struct cidr, u_int32_t *, u_int32_t *);
--char *atop(u_int32_t);
-+char *a_to_p(u_int32_t);
- int parse_netblock(char *, struct bl *, struct bl *, int);
- int open_child(char *, char **);
- int fileget(char *);
-@@ -187,8 +187,10 @@
- *end = cidr.addr + (1 << (32 - cidr.bits)) - 1;
- }
-
-+/* rename atop to a_to_p, since
-+ * it collides at FreeBSD9 with atop in machine/param.h */
- char *
--atop(u_int32_t addr)
-+a_to_p(u_int32_t addr)
- {
- struct in_addr in;
-
-@@ -621,7 +623,7 @@
- while (*blacklists != NULL) {
- struct cidr *b = *blacklists;
- while (b->addr != 0) {
-- fprintf(sdc, ";%s/%u", atop(b->addr), (b->bits));
-+ fprintf(sdc, ";%s/%u", a_to_p(b->addr), (b->bits));
- b++;
- }
- blacklists++;
-@@ -672,7 +674,7 @@
- struct cidr *b = *blacklists;
-
- while (b->addr != 0) {
-- fprintf(pf, "%s/%u\n", atop(b->addr), (b->bits));
-+ fprintf(pf, "%s/%u\n", a_to_p(b->addr), (b->bits));
- b++;
- }
- blacklists++;
-@@ -711,7 +713,7 @@
- ent.tbl = ipfw_tabno;
- ent.masklen = b->bits;
- ent.value = 0;
-- inet_aton(atop(b->addr), (struct in_addr *)&ent.addr);
-+ inet_aton(a_to_p(b->addr), (struct in_addr *)&ent.addr);
- if (setsockopt(s, IPPROTO_IP, IP_FW_TABLE_ADD, &ent, sizeof(ent)) < 0)
- {
- err(1, "IPFW setsockopt(IP_FW_TABLE_ADD)");
diff --git a/mail/spamd/files/patch-spamd__grey.c b/mail/spamd/files/patch-spamd__grey.c
deleted file mode 100644
index a98d2f5254ed..000000000000
--- a/mail/spamd/files/patch-spamd__grey.c
+++ /dev/null
@@ -1,29 +0,0 @@
---- ./spamd/grey.c.orig
-+++ ./spamd/grey.c
-@@ -329,9 +329,10 @@
- {
- ipfw_table_entry ent;
- int i;
-- static int ipfw_socket;
-+ static int ipfw_socket = 0;
-
-- ipfw_socket = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
-+ if (ipfw_socket == 0)
-+ ipfw_socket = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
-
- if (debug)
- fprintf(stderr, "configure ipfw tabno: %d\n", ipfw_tabno);
-@@ -363,8 +364,11 @@
- inet_aton(addrs[i], (struct in_addr *)&ent.addr);
- if (setsockopt(ipfw_socket, IPPROTO_IP, IP_FW_TABLE_ADD, &ent, sizeof(ent)) < 0)
- {
-- syslog_r(LOG_INFO, &sdata, "IPFW setsockopt(IP_FW_TABLE_ADD) (%m)");
-- return(-1);
-+ /* work around dups */
-+ if (errno != EEXIST) {
-+ syslog_r(LOG_INFO, &sdata, "IPFW setsockopt(IP_FW_TABLE_ADD) (%m)");
-+ return(-1);
-+ }
- }
- }
-
diff --git a/mail/spamd/files/pkg-install.in b/mail/spamd/files/pkg-install.in
index bd0984271db5..59b99e328370 100644
--- a/mail/spamd/files/pkg-install.in
+++ b/mail/spamd/files/pkg-install.in
@@ -98,26 +98,6 @@ check_service() {
}
-# this msg is for users installing not from source,
-# - show msg about changed sync protocol
-if [ "$2" = "PRE-INSTALL" ]; then
- echo "
-
- **** UPGRADE WARNING: SYNC PROTOCOL CHANGED ****
-
- If you have spamd in distributed environment stop
- sync between old (4.1.x) and this new version
- until every node is updated
-
- read UPDATING in your PORTSDIR
-
- **** UPGRADE WARNING: SYNC PROTOCOL CHANGED ****
-"
- read -p "Hit ^c now to stop, any key to continue: " -t 5 a || true
- echo ""
- echo ""
-fi
-
if [ "$2" = "PRE-INSTALL" ]; then
check_dbown=0
if /usr/sbin/pw group show "${SPAMDGROUP}" 2>&1 >/dev/null; then
diff --git a/mail/spamd/files/pkg-message.in b/mail/spamd/files/pkg-message.in
index f033d212be8b..f88beb606857 100644
--- a/mail/spamd/files/pkg-message.in
+++ b/mail/spamd/files/pkg-message.in
@@ -5,6 +5,10 @@ To enable spamd you need:
obspamd_enable="YES"
obspamlogd_enable="YES"
+ For PF you can specify a dedicated pflog interface with parameter
+ obspamlogd_pflog_if. This interface will be created and removed
+ by the rc script of spamlogd.
+
2) Configuration template is available in %%PREFIX%%/etc/spamd as
spamd.conf.sample file. Copy then to spamd.conf file and
edit to suit your needs.
@@ -20,22 +24,10 @@ To enable spamd you need:
rdr pass inet proto tcp from any to any \
port smtp -> 127.0.0.1 port spamd
-New features:
- - sync for spamdb is now implemented (parameter -Y)
+FreeBSD only features (not in OpenBSD):
+ - sync for spamdb (parameter -Y)
See %%PREFIX%%/%%DOCSDIR%%/ for usage manual.
- - spamdb and spamlogd whiteexp times can now adjusted
+ - spamdb and spamlogd whiteexp times can be adjusted
with parameter -W
-
- !!!!!!!!!!!! -- I M P O T A N T - N O T E S -- !!!!!!!!!!!!!!!!!
-
- **** UPGRADE WARNING: SYNC PROTOCOL CHANGED ****
-
- The sync protocol has changed for versions > 4.1.x
-
- If spamd is installed in distributed environment and sync is
- enabled, stop sync at every node until they are updated.
-
- !!!!!!!!!!!! -- I M P O T A N T - N O T E S -- !!!!!!!!!!!!!!!!!
-
**********************************************************************