mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-30 01:15:52 +00:00
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
This commit is contained in:
parent
ff1aa7cfc6
commit
8769245118
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=39722
@ -155,6 +155,7 @@
|
||||
SUBDIR += teapop
|
||||
SUBDIR += tkrat
|
||||
SUBDIR += tkrat2
|
||||
SUBDIR += vbsfilter
|
||||
SUBDIR += vpopmail
|
||||
SUBDIR += vrfy
|
||||
SUBDIR += wanderlust-emacs
|
||||
|
59
mail/vbsfilter/Makefile
Normal file
59
mail/vbsfilter/Makefile
Normal file
@ -0,0 +1,59 @@
|
||||
# New ports collection makefile for: vbsfilter
|
||||
# Date created: 10.Mar 2001
|
||||
# Whom: dirk.meyer@dinoex.sub.org
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
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>
|
1
mail/vbsfilter/distinfo
Normal file
1
mail/vbsfilter/distinfo
Normal file
@ -0,0 +1 @@
|
||||
MD5 (vbsfilter-1.3.c) = da70a84416927d0ba0a0c4e69cc4532e
|
30
mail/vbsfilter/files/patch-vbsfilter.c
Normal file
30
mail/vbsfilter/files/patch-vbsfilter.c
Normal file
@ -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;
|
23
mail/vbsfilter/files/vbsfilter.sh
Normal file
23
mail/vbsfilter/files/vbsfilter.sh
Normal file
@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD: /tmp/pcvs/ports/mail/vbsfilter/files/Attic/vbsfilter.sh,v 1.1 2001-03-13 06:47:30 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
|
1
mail/vbsfilter/pkg-comment
Normal file
1
mail/vbsfilter/pkg-comment
Normal file
@ -0,0 +1 @@
|
||||
A vbs-attachment filter for Sendmail
|
11
mail/vbsfilter/pkg-descr
Normal file
11
mail/vbsfilter/pkg-descr
Normal file
@ -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/
|
3
mail/vbsfilter/pkg-plist
Normal file
3
mail/vbsfilter/pkg-plist
Normal file
@ -0,0 +1,3 @@
|
||||
@comment $FreeBSD: /tmp/pcvs/ports/mail/vbsfilter/Attic/pkg-plist,v 1.1 2001-03-13 06:47:25 dinoex Exp $
|
||||
libexec/vbsfilter
|
||||
etc/rc.d/vbsfilter.sh.sample
|
Loading…
Reference in New Issue
Block a user