summaryrefslogtreecommitdiffstats
path: root/mail/smc-milter
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2005-04-19 12:42:49 +0000
committerpav <pav@FreeBSD.org>2005-04-19 12:42:49 +0000
commit263593e060cfc4a32723009dfa1ea1ea830b07cb (patch)
tree253cb6d530d0590f2ba962b062c63ba28285a256 /mail/smc-milter
parentb719af3237e56a04aeae80c7374e24f6ae859432 (diff)
downloadFreeBSD-ports-263593e060cfc4a32723009dfa1ea1ea830b07cb.zip
FreeBSD-ports-263593e060cfc4a32723009dfa1ea1ea830b07cb.tar.gz
- Update to 1.6
PR: ports/80090 Submitted by: Andrey E. Shevtsov <nyxo@dnuc.polyn.kiae.su> (maintainer)
Diffstat (limited to 'mail/smc-milter')
-rw-r--r--mail/smc-milter/Makefile14
-rw-r--r--mail/smc-milter/distinfo4
-rw-r--r--mail/smc-milter/files/patch-Makefile43
-rw-r--r--mail/smc-milter/files/patch-regex.c36
-rw-r--r--mail/smc-milter/files/patch-relay.c21
-rw-r--r--mail/smc-milter/files/patch-smc-milter.c45
-rw-r--r--mail/smc-milter/files/patch-smtp.c35
-rw-r--r--mail/smc-milter/files/patch-utils.c15
-rw-r--r--mail/smc-milter/files/smc-milter.sh20
-rw-r--r--mail/smc-milter/pkg-message5
-rw-r--r--mail/smc-milter/pkg-plist2
11 files changed, 31 insertions, 209 deletions
diff --git a/mail/smc-milter/Makefile b/mail/smc-milter/Makefile
index be5cffc..ca90f40 100644
--- a/mail/smc-milter/Makefile
+++ b/mail/smc-milter/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= smc-milter
-PORTVERSION= 1.5
+PORTVERSION= 1.6
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= milter
@@ -15,20 +15,20 @@ MAINTAINER= nyxo@dnuc.polyn.kiae.su
COMMENT= A non-context email filter
BUILD_DEPENDS= ${LOCALBASE}/lib/libbind_r.a:${PORTSDIR}/dns/bind84
-LIB_DEPENDS= db-4.2.2:${PORTSDIR}/databases/db42
USE_GMAKE= yes
USE_REINPLACE= yes
+MAKE_ENV+= PTHREAD_LIBS=${PTHREAD_LIBS}
+
NOMAN=
-post-extract:
- @${REINPLACE_CMD} -e 's|\/opt\/SMC|\/usr\/local\/etc\/smc|g ; \
- s|aliases|mail\/aliases|g' \
+post-patch:
+ @${REINPLACE_CMD} -e 's|\/opt\/SMC|${PREFIX}\/etc\/smc|g' \
${WRKSRC}/smc-milter.h
post-install:
- ${INSTALL_SCRIPT} ${FILESDIR}/smc-milter.sh \
- ${PREFIX}/etc/rc.d/smc-milter.sh
+ ${INSTALL_SCRIPT} ${WRKSRC}/smc-milter.sh \
+ ${PREFIX}/etc/rc.d/smc-milter.sh.sample
.include <bsd.port.mk>
diff --git a/mail/smc-milter/distinfo b/mail/smc-milter/distinfo
index 2e34092..e174eab 100644
--- a/mail/smc-milter/distinfo
+++ b/mail/smc-milter/distinfo
@@ -1,2 +1,2 @@
-MD5 (smc-milter-1.5.tar.gz) = ff48e7516fdaf27e30c0c2a1043fb31a
-SIZE (smc-milter-1.5.tar.gz) = 96270
+MD5 (smc-milter-1.6.tar.gz) = 668719c377a5f29fb84ea2481732954b
+SIZE (smc-milter-1.6.tar.gz) = 97610
diff --git a/mail/smc-milter/files/patch-Makefile b/mail/smc-milter/files/patch-Makefile
index b5fc3baa..c5efa8a 100644
--- a/mail/smc-milter/files/patch-Makefile
+++ b/mail/smc-milter/files/patch-Makefile
@@ -1,52 +1,45 @@
---- Makefile.orig Sun Apr 10 11:29:10 2005
-+++ Makefile Tue Apr 19 10:23:16 2005
-@@ -5,22 +5,19 @@
+--- Makefile.orig Mon Apr 18 21:07:30 2005
++++ Makefile Mon Apr 18 21:07:36 2005
+@@ -5,8 +5,9 @@
SRCS = utils.c relay.c smtp.c regex.c
MILTER_OBJS = utils.o relay.o smtp.o regex.o
MILTER = smc-milter
-INSDIR = /opt/SMC
-CC = gcc
-+PREFIX ?= /usr/local
-+CONFINSDIR = ${PREFIX}/etc/smc
-+BININSDIR = ${PREFIX}/bin
++BINDIR = ${PREFIX}/bin
++ETCDIR = ${PREFIX}/etc/smc
+CC ?= gcc
ifdef DEBUG
CFLAGS = -g -ggdb2
+@@ -18,8 +19,8 @@
+ CFLAGS += -Wall -D_GNU_SOURCE -D_REENTRANT -I/usr/lib/bind/include
+ LIBS = /usr/lib/bind/lib/libbind_r.a -lmilter -pthread -lssl
else
-- CFLAGS = -O2
-+ CFLAGS ?= -O2
- endif
-
--ifeq ($(LIBC_VERSION),2.1)
-- CFLAGS += -Wall -D_GNU_SOURCE -D_REENTRANT -I/usr/lib/bind/include
-- LIBS = /usr/lib/bind/lib/libbind_r.a -lmilter -pthread -lssl -ldb
--else
- CFLAGS += -Wall -D_GNU_SOURCE -D_REENTRANT
-- LIBS = -lmilter -pthread -lssl -ldb -lresolv
--endif
-+ CFLAGS += -Wall -D_GNU_SOURCE -D_REENTRANT -I${LOCALBASE}/include/bind -I${LOCALBASE}/include/db42
-+ LIBS = -lmilter -pthread -lssl -ldb -lbind_r -lcrypto -L${LOCALBASE}/lib -L${LOCALBASE}/lib/db42
+- LIBS = -lmilter -pthread -lssl -lresolv
++ CFLAGS += -Wall -D_GNU_SOURCE -D_REENTRANT -I${LOCALBASE}/include/bind
++ LIBS = -lmilter ${PTHREAD_LIBS} -lssl -lbind_r -lcrypto -L${LOCALBASE}/lib
+ endif
all: milter
-
-@@ -31,14 +28,14 @@
+@@ -31,14 +32,14 @@
$(CC) $(CFLAGS) -c $<
install:
- [ -d "$(INSDIR)" ] || mkdir $(INSDIR)
-+ [ -d "$(CONFINSDIR)" ] || mkdir $(CONFINSDIR)
++ [ -d "$(ETCDIR)" ] || mkdir $(ETCDIR)
if [ -n "$(MILTER)" ]; then \
strip $(MILTER) ; \
- install -m 755 $(MILTER) $(INSDIR) ; \
-+ install -m 755 $(MILTER) $(BININSDIR) ; \
++ install -m 755 $(MILTER) $(BINDIR) ; \
fi
- install -m 644 $(MILTER).conf $(INSDIR)
- install -m 644 $(MILTER).policy $(INSDIR)
- install -m 644 $(MILTER).users $(INSDIR)
-+ install -m 644 $(MILTER).conf $(CONFINSDIR)
-+ install -m 644 $(MILTER).policy $(CONFINSDIR)
-+ install -m 644 $(MILTER).users $(CONFINSDIR)
++ install -m 644 $(MILTER).conf $(ETCDIR)
++ install -m 644 $(MILTER).policy $(ETCDIR)
++ install -m 644 $(MILTER).users $(ETCDIR)
remove:
rm -f $(INSDIR)/$(MILTER)*
diff --git a/mail/smc-milter/files/patch-regex.c b/mail/smc-milter/files/patch-regex.c
deleted file mode 100644
index 94abbf2..0000000
--- a/mail/smc-milter/files/patch-regex.c
+++ /dev/null
@@ -1,36 +0,0 @@
-*** regex.c.orig Thu Mar 10 06:10:48 2005
---- regex.c Wed Mar 23 17:51:06 2005
-***************
-*** 58,64 ****
- # include <wctype.h>
- #endif
-
-! #include <malloc.h>
- #include "regex.h"
-
- /* This is for multi byte string support. */
---- 58,64 ----
- # include <wctype.h>
- #endif
-
-! #include <stdlib.h>
- #include "regex.h"
-
- /* This is for multi byte string support. */
-***************
-*** 148,159 ****
---- 148,161 ----
- even if config.h says that we can. */
- # undef REL_ALLOC
-
-+ #ifndef _STDLIB_H_
- # if defined STDC_HEADERS || defined _LIBC
- # include <stdlib.h>
- # else
- char *malloc ();
- char *realloc ();
- # endif
-+ #endif /* _STDLIB_H_ */
-
- /* When used in Emacs's lib-src, we need to get bzero and bcopy somehow.
- If nothing else has been done, use the method below. */
diff --git a/mail/smc-milter/files/patch-relay.c b/mail/smc-milter/files/patch-relay.c
deleted file mode 100644
index 02c635a..0000000
--- a/mail/smc-milter/files/patch-relay.c
+++ /dev/null
@@ -1,21 +0,0 @@
-*** relay.c.orig Thu Mar 10 06:23:13 2005
---- relay.c Thu Mar 24 11:23:49 2005
-***************
-*** 202,209 ****
- return -1;
- }
-
-! if (!(gethostbyname_r(host_name, &host_buf, buffer, sizeof(buffer),
-! &host, &ret))) {
- while (*host->h_addr_list) {
- if (host_addr == *(uint32_t *)(*host->h_addr_list)) {
- resolver_close(&res_local);
---- 202,209 ----
- return -1;
- }
-
-! host = gethostbyname_r(host_name, &host_buf, buffer, sizeof(buffer), &ret);
-! if (!ret) {
- while (*host->h_addr_list) {
- if (host_addr == *(uint32_t *)(*host->h_addr_list)) {
- resolver_close(&res_local);
diff --git a/mail/smc-milter/files/patch-smc-milter.c b/mail/smc-milter/files/patch-smc-milter.c
deleted file mode 100644
index 1b019fa..0000000
--- a/mail/smc-milter/files/patch-smc-milter.c
+++ /dev/null
@@ -1,45 +0,0 @@
-*** smc-milter.c.orig Thu Mar 10 06:10:48 2005
---- smc-milter.c Thu Mar 24 12:09:11 2005
-***************
-*** 65,70 ****
---- 65,74 ----
- #include "relay.h"
- #include "smtp.h"
-
-+ #if !defined O_SYNC && defined O_FSYNC
-+ #define O_SYNC O_FSYNC
-+ #endif
-+
- /* Static variables for config defaults, etc. */
- static int runmode = 0;
- static char *smfisock = NULL;
-***************
-*** 161,166 ****
---- 165,191 ----
- "<(i?frame|object|embed|applet)[^>]*>",
- "\\son(\\w+)=[^> ]+", NULL
- };
-+
-+ #ifndef strndup
-+ char *strndup(char const* s, size_t n)
-+ {
-+ void* voided = (void*)s;
-+ void* match;
-+ char *ret;
-+ size_t len;
-+
-+ if (!s || !n) return NULL;
-+ match = memchr(voided, 0, n);
-+ len =
-+ match
-+ ? (char*)match - s
-+ : n+1;
-+ ret = (char*)malloc(len);
-+ memcpy(ret, s, len-1);
-+ ret[len] = '\0';
-+ return ret;
-+ }
-+ #endif
-
- void
- signal_handler (int sig) {
diff --git a/mail/smc-milter/files/patch-smtp.c b/mail/smc-milter/files/patch-smtp.c
deleted file mode 100644
index c27a7da..0000000
--- a/mail/smc-milter/files/patch-smtp.c
+++ /dev/null
@@ -1,35 +0,0 @@
-*** smtp.c.orig Thu Mar 10 06:10:48 2005
---- smtp.c Thu Mar 24 11:38:42 2005
-***************
-*** 50,55 ****
---- 50,59 ----
- #define SMTP_CMD_PERM(x) (500 <= (x) && (x) < 600)
- #define SMTP_DATA_OK(x) ((x) == 354)
-
-+ #ifndef MSG_NOSIGNAL
-+ #define MSG_NOSIGNAL 0
-+ #endif
-+
- typedef union {
- HEADER hdr;
- u_char buf[MAXPACKET];
-***************
-*** 326,333 ****
- int optval = 1;
- char buffer[8192];
-
-! if ((gethostbyname_r(mxhost, &host_buf, buffer, sizeof(buffer),
-! &host, &ret))) return -1;
-
- memset(&address, 0, sizeof(struct sockaddr));
- address.sin_addr.s_addr = *(uint32_t *)host->h_addr_list[0];
---- 330,338 ----
- int optval = 1;
- char buffer[8192];
-
-! host = gethostbyname_r(mxhost, &host_buf, buffer, sizeof(buffer), &ret);
-! if(ret)
-! return -1;
-
- memset(&address, 0, sizeof(struct sockaddr));
- address.sin_addr.s_addr = *(uint32_t *)host->h_addr_list[0];
diff --git a/mail/smc-milter/files/patch-utils.c b/mail/smc-milter/files/patch-utils.c
deleted file mode 100644
index fde8597..0000000
--- a/mail/smc-milter/files/patch-utils.c
+++ /dev/null
@@ -1,15 +0,0 @@
-*** utils.c.orig Thu Mar 10 06:10:48 2005
---- utils.c Thu Mar 24 11:40:56 2005
-***************
-*** 32,37 ****
---- 32,41 ----
- #define MAXLINE 4096
- #endif
-
-+ #if !defined O_SYNC && defined O_FSYNC
-+ #define O_SYNC O_FSYNC
-+ #endif
-+
- typedef struct {
- char name[PATH_MAX+1];
- pthread_mutex_t lock;
diff --git a/mail/smc-milter/files/smc-milter.sh b/mail/smc-milter/files/smc-milter.sh
deleted file mode 100644
index 0de4eb8..0000000
--- a/mail/smc-milter/files/smc-milter.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-case "$1" in
- start)
- /usr/local/bin/smc-milter
- echo ' smc-milter'
- ;;
- stop)
- if [ -f /var/run/smc-milter.pid ]; then
- kill `cat /var/run/smc-milter.pid`
- echo ' smc-milter'
- fi
- ;;
- *)
- echo ""
- echo "Usage: `basename $0` { start | stop }"
- echo ""
- exit 64
- ;;
-esac
diff --git a/mail/smc-milter/pkg-message b/mail/smc-milter/pkg-message
index 4e21d5f..32665ca 100644
--- a/mail/smc-milter/pkg-message
+++ b/mail/smc-milter/pkg-message
@@ -1,9 +1,10 @@
-The start/stop script has been placed in $PREFIX/etc/rc.d/smc-milter.sh
+The start/stop script sample has been placed in
+$PREFIX/etc/rc.d/smc-milter.sh.sample
Configuration files has been placed in $PREFIX/etc/smc/
Add this lines to your sendmail's .mc file:
-define(`confMILTER_MACROS_CONNECT', `{client_addr}')dnl
+define(`confMILTER_MACROS_CONNECT', `{client_addr}', `{client_name}')dnl
INPUT_MAIL_FILTER(`SMC-milter', `S=local:/var/run/smc-milter.sock, F=T, T=C:30m;S:10m;R:10m;E:30m')dnl
Then generate new sendmail.cf, install it, start smc-milter and finally
diff --git a/mail/smc-milter/pkg-plist b/mail/smc-milter/pkg-plist
index 03a6c5a..f0d28a6 100644
--- a/mail/smc-milter/pkg-plist
+++ b/mail/smc-milter/pkg-plist
@@ -3,4 +3,4 @@ etc/smc/smc-milter.conf
etc/smc/smc-milter.policy
etc/smc/smc-milter.users
@dirrm etc/smc
-etc/rc.d/smc-milter.sh
+etc/rc.d/smc-milter.sh.sample
OpenPOWER on IntegriCloud