diff options
author | mbr <mbr@FreeBSD.org> | 2004-01-17 15:56:49 +0000 |
---|---|---|
committer | mbr <mbr@FreeBSD.org> | 2004-01-17 15:56:49 +0000 |
commit | 215c38977af722c436f4ba8b028a7b0e8f51f426 (patch) | |
tree | 13336f9cda51150cb006be9a70b357799ca34674 /mail | |
parent | 08b68fb8a5b9cb13d8f2731456d7ac1b0fec6685 (diff) | |
download | FreeBSD-ports-215c38977af722c436f4ba8b028a7b0e8f51f426.zip FreeBSD-ports-215c38977af722c436f4ba8b028a7b0e8f51f426.tar.gz |
Add smtp-vilter, a milter backend for scanning viruses.
Submitted by: dan@imp.ch
Diffstat (limited to 'mail')
-rw-r--r-- | mail/smtp-vilter/Makefile | 26 | ||||
-rw-r--r-- | mail/smtp-vilter/distinfo | 1 | ||||
-rw-r--r-- | mail/smtp-vilter/files/patch-Makefile.freebsd | 30 | ||||
-rw-r--r-- | mail/smtp-vilter/files/patch-backend+vilter-clamd+Makefile.freebsd | 23 | ||||
-rw-r--r-- | mail/smtp-vilter/files/patch-bin+smtp-vilter+smtp-vilter.c | 52 | ||||
-rw-r--r-- | mail/smtp-vilter/files/patch-include+smtp-vilter.h | 12 | ||||
-rw-r--r-- | mail/smtp-vilter/pkg-descr | 5 | ||||
-rw-r--r-- | mail/smtp-vilter/pkg-plist | 9 |
8 files changed, 158 insertions, 0 deletions
diff --git a/mail/smtp-vilter/Makefile b/mail/smtp-vilter/Makefile new file mode 100644 index 0000000..0a9c879 --- /dev/null +++ b/mail/smtp-vilter/Makefile @@ -0,0 +1,26 @@ +# ex:ts=8 +# Ports collection makefile for: smtp-vilter +# Date created: 17.1.2004 +# Whom: Danuel Mueller + Martin Blapp, ImproWare AG +# +# $FreeBSD$ +# + +PORTNAME= smtp-vilter +PORTVERSION= 1.1.4 +CATEGORIES= mail +MASTER_SITES= http://www.etc.msys.ch/software/smtp-vilter/ +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} + +MAINTAINER?= dan@imp.ch +COMMENT?= spam/virus filter infrastructure + +MAKEFILE= Makefile.freebsd + +WRKSRC= ${WRKDIR}/${PORTNAME} +CONFIGURE_TARGET=${ARCH}-portbld-freebsd${OSREL} +LDFLAGS+= -L${LOCALBASE}/lib +CONFIGURE_ENV= CC="${CC} -I${LOCALBASE}/include" LDFLAGS="${LDFLAGS}" +CONFIGURE_ARGS= + +.include <bsd.port.mk> diff --git a/mail/smtp-vilter/distinfo b/mail/smtp-vilter/distinfo new file mode 100644 index 0000000..f92e8ea --- /dev/null +++ b/mail/smtp-vilter/distinfo @@ -0,0 +1 @@ +MD5 (smtp-vilter-1.1.4.tar.gz) = a1d5c9ec13cb038c9e08d965854f3eab diff --git a/mail/smtp-vilter/files/patch-Makefile.freebsd b/mail/smtp-vilter/files/patch-Makefile.freebsd new file mode 100644 index 0000000..9fe5c91 --- /dev/null +++ b/mail/smtp-vilter/files/patch-Makefile.freebsd @@ -0,0 +1,30 @@ +--- Makefile.freebsd.orig Sun Dec 14 19:10:24 2003 ++++ Makefile.freebsd Sat Jan 17 16:33:52 2004 +@@ -10,12 +10,14 @@ + ####### Files + + LIB_NAME = clamd savse spamd +-LIB_VER = 2.1 ++LIB_VER = 2 + BIN_NAME = conf socket smtp-vilter + + TARGET = smtp-vilter +-MAN = smtp-vilter.8 +-MANDIR = /usr/local/man/man8 ++MAN5 = smtp-vilter.conf.5 ++MANDIR5 = /usr/local/man/man5 ++MAN8 = smtp-vilter.8 ++MANDIR8 = /usr/local/man/man8 + + BINOWN = root + BINMOD = 0555 +@@ -44,7 +46,8 @@ + ln -s /usr/local/lib/libvilter-$$libname.so.$(LIB_VER) /usr/local/lib/libvilter-$$libname.so ; \ + done ; + install -s -o $(BINOWN) -m $(BINMOD) $(BASEDIR)/bin/$(TARGET)/$(TARGET) $(BINDIR) +- install $(BASEDIR)/bin/$(TARGET)/$(MAN) $(MANDIR) ++ install $(BASEDIR)/bin/$(TARGET)/$(MAN5) $(MANDIR5) ++ install $(BASEDIR)/bin/$(TARGET)/$(MAN8) $(MANDIR8) + + clean: + -find $(BASEDIR) -name "*.o" -print -delete diff --git a/mail/smtp-vilter/files/patch-backend+vilter-clamd+Makefile.freebsd b/mail/smtp-vilter/files/patch-backend+vilter-clamd+Makefile.freebsd new file mode 100644 index 0000000..cdd0d1b --- /dev/null +++ b/mail/smtp-vilter/files/patch-backend+vilter-clamd+Makefile.freebsd @@ -0,0 +1,23 @@ +--- /dev/null Sat Jan 17 04:16:32 2004 ++++ backend/vilter-clamd/Makefile.freebsd Sat Jan 17 16:12:21 2004 +@@ -0,0 +1,20 @@ ++LIB= vilter-clamd ++SRCS= vilter-clamd.c ++OBJS= vilter-clamd.o ++ ++MAJOR= 2 ++ ++CFLAGS+= -O2 -Wall -DLINUX -pipe -I../../include ++ ++all: libvilter-clamd.so.${MAJOR} ++ ++libvilter-clamd.so.${MAJOR}: ${OBJS} ++ ${CC} -shared -o libvilter-clamd.so.${MAJOR} ${OBJS} ${LFLAGS} ++ ++install: libvilter-clamd.so.${MAJOR} ++ install -o root -m 0755 libvilter-clamd.so.${MAJOR} /usr/local/lib/libvilter-clamd.so.${MAJOR} ++ rm -f /usr/local/lib/libvilter-clamd.so ++ ln -s /usr/local/lib/libvilter-clamd.so.${MAJOR} /usr/local/lib/libvilter-clamd.so ++ ++clean: ++ rm -f *.o *.a core libvilter-clamd.* diff --git a/mail/smtp-vilter/files/patch-bin+smtp-vilter+smtp-vilter.c b/mail/smtp-vilter/files/patch-bin+smtp-vilter+smtp-vilter.c new file mode 100644 index 0000000..3d649fb --- /dev/null +++ b/mail/smtp-vilter/files/patch-bin+smtp-vilter+smtp-vilter.c @@ -0,0 +1,52 @@ +--- bin/smtp-vilter/smtp-vilter.c.orig Wed Dec 24 16:14:20 2003 ++++ bin/smtp-vilter/smtp-vilter.c Sat Jan 17 16:28:34 2004 +@@ -1008,7 +1008,7 @@ + /* Load the backends */ + + for (n = 0; n < nbe; n++) { +- snprintf(libname, sizeof(libname), "lib%s.so.%d.%d", be[n].name, MAJOR, MINOR); ++ snprintf(libname, sizeof(libname), "lib%s.so.%d", be[n].name, MAJOR); + + if ((be[n].dlhandle = dlopen(libname, RTLD_LAZY)) == NULL) + errx(1, "error loading backend %s (%s), %s", be[n].name, libname, dlerror()); +@@ -1114,14 +1114,6 @@ + err(1, "can't chdir to / after chroot to %s", chrootdir); + } + +- /* Change the user and group id */ +- +- setgid(gid); +- setuid(uid); +- +- if (!getuid() || !getgid()) +- errx(1, "must not be run as root"); +- + syslog(LOG_INFO, "dropped privileges, running as %d:%d", uid, gid); + + /* Initialize sendmail milter */ +@@ -1150,8 +1142,6 @@ + if (smfi_register(desc) == MI_FAILURE) + errx(1, "failed to register with sendmail"); + +- smfi_setconn(port); +- + if (!stat(pidfile, &statbuf)) + errx(1, "pid file %s exists, another copy running?", pidfile); + +@@ -1167,6 +1157,16 @@ + err(1, "can't write pid to pidfile %s", pidfile); + if (fclose(fp)) + err(1, "error closing pidfile %s", pidfile); ++ ++ /* Change the user and group id */ ++ ++ setgid(gid); ++ setuid(uid); ++ ++ smfi_setconn(port); ++ ++ if (!getuid() || !getgid()) ++ errx(1, "must not be run as root"); + + if (smfi_main() == MI_FAILURE) + syslog(LOG_ERR, "failed to establish a connection on port %s", port); diff --git a/mail/smtp-vilter/files/patch-include+smtp-vilter.h b/mail/smtp-vilter/files/patch-include+smtp-vilter.h new file mode 100644 index 0000000..95c3638 --- /dev/null +++ b/mail/smtp-vilter/files/patch-include+smtp-vilter.h @@ -0,0 +1,12 @@ +--- include/smtp-vilter.h.orig Sat Jan 17 16:20:47 2004 ++++ include/smtp-vilter.h Sat Jan 17 16:21:10 2004 +@@ -41,8 +41,7 @@ + + #define VERSION "1.1.4" + +-#define MAJOR 3 /* Major and minor version number */ +-#define MINOR 0 /* of shared libs (backends) */ ++#define MAJOR 2 /* Major and minor version number */ + + #define SCAN_OK 0 + #define SCAN_VIRUS 1 /* These two values are also used */ diff --git a/mail/smtp-vilter/pkg-descr b/mail/smtp-vilter/pkg-descr new file mode 100644 index 0000000..3fb3c59 --- /dev/null +++ b/mail/smtp-vilter/pkg-descr @@ -0,0 +1,5 @@ +Smtp-vilter is a high performance content filter for sendmail +with backends to various virus scanning engines. Author of this +excellent milter filter is Marc Balmer from Msys Software. + +WWW: http://www.etc.msys.ch/software/smtp-vilter diff --git a/mail/smtp-vilter/pkg-plist b/mail/smtp-vilter/pkg-plist new file mode 100644 index 0000000..21289b5 --- /dev/null +++ b/mail/smtp-vilter/pkg-plist @@ -0,0 +1,9 @@ +lib/libvilter-clamd.so.2 +lib/libvilter-clamd.so +lib/libvilter-savse.so.2 +lib/libvilter-savse.so +lib/libvilter-spamd.so.2 +lib/libvilter-spamd.so +man/man5/smtp-vilter.conf.5 +man/man8/smtp-vilter.8 +sbin/smtp-vilter |