mirror of
https://git.freebsd.org/ports.git
synced 2025-06-04 04:16:27 -04:00
maintainer update
- update spamd to match OpenBSD 4.8 + OpenBSD pr/6467 - remove support for FreeBSD_version < 601000 (strtonum.c no longer provided in the spamd sources) - change my mail address Approved by: glarkin (mentor, implicit)
This commit is contained in:
parent
269e873055
commit
1b62061be2
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=263859
6 changed files with 30 additions and 148 deletions
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)");
|
|
@ -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);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
@ -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 -- !!!!!!!!!!!!!!!!!
|
||||
|
||||
**********************************************************************
|
||||
|
|
Loading…
Add table
Reference in a new issue