aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2001-03-12 15:18:13 +0800
committerdinoex <dinoex@FreeBSD.org>2001-03-12 15:18:13 +0800
commit7b6434457ce53fce0229af55c5cc60c5e94b808f (patch)
tree3720adced5fe5e899367bf603780c89e5866c217 /mail
parent374597945cd336568e13aa5defab0c03fe69236f (diff)
downloadfreebsd-ports-gnome-7b6434457ce53fce0229af55c5cc60c5e94b808f.tar.gz
freebsd-ports-gnome-7b6434457ce53fce0229af55c5cc60c5e94b808f.tar.zst
freebsd-ports-gnome-7b6434457ce53fce0229af55c5cc60c5e94b808f.zip
vbsfilter will rename VBS and SHS attachments to .txt,
thus rendering them harmless. Sendmail 8.10 introduced a new feature called the milter library, which provides filtering callbacks to a user-level program, which in turn can provide a "Yes"/"No"/"I haven't seen enough yet" answer to the question: Can sendmail allow this mail to be delivered? Sendmail is a trademark of Sendmail, Inc. WWW: http://aeschi.ch.eu.org/milter/ Submitted by: maintainer
Diffstat (limited to 'mail')
-rw-r--r--mail/Makefile1
-rw-r--r--mail/vbsfilter-1.3/Makefile59
-rw-r--r--mail/vbsfilter-1.3/distinfo1
-rw-r--r--mail/vbsfilter-1.3/files/patch-vbsfilter.c30
-rw-r--r--mail/vbsfilter-1.3/files/vbsfilter.sh23
-rw-r--r--mail/vbsfilter-1.3/pkg-comment1
-rw-r--r--mail/vbsfilter-1.3/pkg-descr11
-rw-r--r--mail/vbsfilter-1.3/pkg-plist3
8 files changed, 129 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile
index b529febc50a5..b83e375c0678 100644
--- a/mail/Makefile
+++ b/mail/Makefile
@@ -155,6 +155,7 @@
SUBDIR += teapop
SUBDIR += tkrat
SUBDIR += tkrat2
+ SUBDIR += vbsfilter-1.3
SUBDIR += vpopmail
SUBDIR += vrfy
SUBDIR += wanderlust-emacs
diff --git a/mail/vbsfilter-1.3/Makefile b/mail/vbsfilter-1.3/Makefile
new file mode 100644
index 000000000000..ed6186417165
--- /dev/null
+++ b/mail/vbsfilter-1.3/Makefile
@@ -0,0 +1,59 @@
+# New ports collection makefile for: vbsfilter
+# Date created: 10.Mar 2001
+# Whom: dirk.meyer@dinoex.sub.org
+#
+# $FreeBSD: /tmp/pcvs/ports/mail/vbsfilter-1.3/Attic/Makefile,v 1.1 2001-03-12 07:18:09 dinoex Exp $
+#
+
+PORTNAME= vbsfilter
+PORTVERSION= 1.3
+CATEGORIES= mail
+MASTER_SITES= http://aeschi.ch.eu.org/milter/
+DISTNAME= ${PORTNAME}-${PORTVERSION}
+EXTRACT_SUFX= .c
+EXTRACT_ONLY= # empty
+
+MAINTAINER= dirk.meyer@dinoex.sub.org
+
+BUILD_DEPENDS= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail
+
+NO_PACKAGE= "only with sendmail from the ports"
+
+CTARGETS+= vbsfilter-1.3
+CFLAGS+= -Wall -I$(LOCALBASE)/include -D_THREAD_SAFE
+FLAGS+= -pthread
+LDFLAGS+= -L$(LOCALBASE)/lib
+LIBS+= -lmilter -lsmutil
+.if defined(SENDMAIL_WITH_SFIO)
+LIBS+= -lsfio
+.endif
+
+.if ! defined(SENDMAIL_WITH_MILTER)
+pre-fetch:
+ @${ECHO_MSG}
+ @${ECHO_MSG} You must set variable SENDMAIL_WITH_MILTER to YES,
+ @${ECHO_MSG} and rebuild sendmail in the ports
+ @${FALSE}
+.endif
+
+do-extract:
+ @${MKDIR} ${WRKSRC}
+ @${CP} ${_DISTDIR}vbsfilter-1.3.c ${WRKSRC}
+ @${SED} -e "s=%%PREFIX%%=${PREFIX}=" ${FILESDIR}/vbsfilter.sh \
+ > ${WRKSRC}/vbsfilter.sh
+
+.for i in ${CTARGETS}
+${i}:
+ cd ${WRKSRC} && \
+ $(CC) $(CFLAGS) $(LDFLAGS) -o ${i} ${i}.c $(LIBS) $(FLAGS)
+
+.endfor
+
+do-build: ${CTARGETS}
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/vbsfilter-1.3 ${PREFIX}/libexec/vbsfilter
+ ${INSTALL_DATA} ${WRKSRC}/vbsfilter.sh \
+ ${PREFIX}/etc/rc.d/vbsfilter.sh.sample
+
+.include <bsd.port.mk>
diff --git a/mail/vbsfilter-1.3/distinfo b/mail/vbsfilter-1.3/distinfo
new file mode 100644
index 000000000000..8a7f1b542659
--- /dev/null
+++ b/mail/vbsfilter-1.3/distinfo
@@ -0,0 +1 @@
+MD5 (vbsfilter-1.3.c) = da70a84416927d0ba0a0c4e69cc4532e
diff --git a/mail/vbsfilter-1.3/files/patch-vbsfilter.c b/mail/vbsfilter-1.3/files/patch-vbsfilter.c
new file mode 100644
index 000000000000..01f54df27d6e
--- /dev/null
+++ b/mail/vbsfilter-1.3/files/patch-vbsfilter.c
@@ -0,0 +1,30 @@
+--- vbsfilter-1.3.c.neu.orig Wed Feb 14 10:45:06 2001
++++ vbsfilter-1.3.c Wed Feb 14 12:40:38 2001
+@@ -2,6 +2,10 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <sysexits.h>
++#include <ctype.h>
++#include <stdlib.h>
++#include <netdb.h>
++#include <unistd.h>
+ #include "libmilter/mfapi.h"
+
+ /*
+@@ -172,7 +176,7 @@
+ sfsistat mlfi_body(SMFICTX *ctx, u_char *bodyp, size_t bodylen) {
+ struct mlfiPriv *priv = MLFIPRIV;
+
+- priv->body = (char *) realloc(priv->body, priv->len + bodylen);
++ priv->body = (char *) realloc(priv->body, priv->len + bodylen + 1);
+
+ if (!priv->body) {
+ /* can't accept this message right now */
+@@ -181,6 +185,7 @@
+
+ memcpy((u_char*)(priv->body+priv->len), bodyp, bodylen);
+ priv->len += bodylen;
++ priv->body[priv->len] = 0;
+
+ /* continue processing */
+ return SMFIS_CONTINUE;
diff --git a/mail/vbsfilter-1.3/files/vbsfilter.sh b/mail/vbsfilter-1.3/files/vbsfilter.sh
new file mode 100644
index 000000000000..a42dcc553e23
--- /dev/null
+++ b/mail/vbsfilter-1.3/files/vbsfilter.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+#
+# $FreeBSD: /tmp/pcvs/ports/mail/vbsfilter-1.3/files/Attic/vbsfilter.sh,v 1.1 2001-03-12 07:18:13 dinoex Exp $
+#
+if ! test -x %%PREFIX%%/libexec/vbsfilter
+then
+# exit 0
+fi
+case $1 in
+start)
+ rm -f /var/run/vbsfilter
+ %%PREFIX%%/libexec/vbsfilter -p local:/var/run/vbsfilter &&
+ echo -n ' vbsfilter'
+ ;;
+stop)
+ killall vbsfilter
+ rm -f /var/run/vbsfilter
+ ;;
+*)
+ echo "Usage: $0: [ start | stop ]" 2>&1
+ exit 65
+ ;;
+esac
diff --git a/mail/vbsfilter-1.3/pkg-comment b/mail/vbsfilter-1.3/pkg-comment
new file mode 100644
index 000000000000..5a424fd634cd
--- /dev/null
+++ b/mail/vbsfilter-1.3/pkg-comment
@@ -0,0 +1 @@
+A vbs-attachment filter for Sendmail
diff --git a/mail/vbsfilter-1.3/pkg-descr b/mail/vbsfilter-1.3/pkg-descr
new file mode 100644
index 000000000000..46d9d5d13422
--- /dev/null
+++ b/mail/vbsfilter-1.3/pkg-descr
@@ -0,0 +1,11 @@
+vbsfilter will rename VBS and SHS attachments to .txt,
+thus rendering them harmless.
+
+Sendmail 8.10 introduced a new feature called the milter library,
+which provides filtering callbacks to a user-level program, which in
+turn can provide a "Yes"/"No"/"I haven't seen enough yet" answer to
+the question: Can sendmail allow this mail to be delivered?
+
+Sendmail is a trademark of Sendmail, Inc.
+
+WWW: http://aeschi.ch.eu.org/milter/
diff --git a/mail/vbsfilter-1.3/pkg-plist b/mail/vbsfilter-1.3/pkg-plist
new file mode 100644
index 000000000000..28c981a2ec7c
--- /dev/null
+++ b/mail/vbsfilter-1.3/pkg-plist
@@ -0,0 +1,3 @@
+@comment $FreeBSD: /tmp/pcvs/ports/mail/vbsfilter-1.3/Attic/pkg-plist,v 1.1 2001-03-12 07:18:09 dinoex Exp $
+libexec/vbsfilter
+etc/rc.d/vbsfilter.sh.sample