diff options
-rw-r--r-- | security/Makefile | 1 | ||||
-rw-r--r-- | security/drweb-sendmail/Makefile | 74 | ||||
-rw-r--r-- | security/drweb-sendmail/distinfo | 1 | ||||
-rw-r--r-- | security/drweb-sendmail/files/Makefile | 20 | ||||
-rw-r--r-- | security/drweb-sendmail/files/drweb-smf.sh | 25 | ||||
-rw-r--r-- | security/drweb-sendmail/pkg-comment | 1 | ||||
-rw-r--r-- | security/drweb-sendmail/pkg-descr | 1 | ||||
-rw-r--r-- | security/drweb-sendmail/pkg-message | 13 | ||||
-rw-r--r-- | security/drweb-sendmail/pkg-plist | 5 |
9 files changed, 141 insertions, 0 deletions
diff --git a/security/Makefile b/security/Makefile index 8824dfafe062..5695fa7b18f1 100644 --- a/security/Makefile +++ b/security/Makefile @@ -33,6 +33,7 @@ SUBDIR += digest SUBDIR += donkey SUBDIR += drweb + SUBDIR += drweb-sendmail SUBDIR += dsniff SUBDIR += fakebo SUBDIR += find_ddos diff --git a/security/drweb-sendmail/Makefile b/security/drweb-sendmail/Makefile new file mode 100644 index 000000000000..312590c92f4d --- /dev/null +++ b/security/drweb-sendmail/Makefile @@ -0,0 +1,74 @@ +# New ports collection makefile for: tas +# Date created: 14 August 2001 +# Whom: Anton Voronin <anton@urc.ac.ru> +# +# $FreeBSD$ +# + +PORTNAME= drweb_sendmail +PORTVERSION= 4.25 +CATEGORIES= security mail +MASTER_SITES= http://www.drweb.ru/ftp/web_pub/ +DISTNAME= drwebd-${PORTVERSION}-freebsd4 +EXTRACT_SUFX= .tgz + +MAINTAINER= anton@urc.ac.ru + +RUN_DEPENDS= ${LOCALBASE}/drweb/drwebd:${PORTSDIR}/security/drweb + +WRKSRC= ${WRKDIR}/${DISTNAME}/clients/drwebdc +MAKEFILE= Makefile.unix + +.include <bsd.port.pre.mk> + +INST_PREFIX= ${PREFIX}/${PORTNAME} +SENDMAIL_DIR= /usr/src/contrib/sendmail +MF_INCDIR= ${SENDMAIL_DIR}/include/libmilter +DOC_DIR= ${PREFIX}/share/doc/drweb-sendmail + +.if exists( ${MF_INCDIR}/mfapi.h ) + +SENDMAIL_VERSION!= ${AWK} '/^sendmail [0-9.]+$$/{print $$2}' ${SENDMAIL_DIR}/FREEBSD-upgrade +SENDMAIL_MAJOR!= ${ECHO} ${SENDMAIL_VERSION} | ${AWK} 'BEGIN{ FS="." }{ print $$1 }' +SENDMAIL_MINOR!= ${ECHO} ${SENDMAIL_VERSION} | ${AWK} 'BEGIN{ FS="." }{ print $$2 }' +.if ${SENDMAIL_MAJOR} > 8 || ${SENDMAIL_MAJOR} == 8 && ${SENDMAIL_MINOR} >= 12 +SENDMAIL8_12= y +.elif ${SENDMAIL_MAJOR} == 8 && ${SENDMAIL_MINOR} >= 10 +SENDMAIL8_12= n +.else +IGNORE= "uses Sendmail sources that are expected to have version 8.10.0 or newer. Your system sources are too old - please upgrade them" +.endif + +.else +IGNORE= "depends on the system sources. Please place them under /usr/src first" +.endif + +post-extract: + cd ${WRKDIR}/${DISTNAME} && ${TAR} -xvzf ${WRKDIR}/${DISTNAME}/${DISTNAME}.tar.gz clients/drwebdc clients/sendmail + +pre-build: + ${MKDIR} ${WRKSRC}/libmilter + ${CP} ${FILESDIR}/Makefile ${WRKSRC}/libmilter +.if ${SENDMAIL_VERSION} == "8.11.1" + ${CP} ${SENDMAIL_DIR}/libmilter/listener.c ${WRKSRC}/libmilter + ${LN} -s ${SENDMAIL_DIR}/libmilter/libmilter.h ${WRKSRC}/libmilter + cd ${WRKSRC}/libmilter && ${PATCH} < ${WRKSRC}/../sendmail/listener.patch +.endif + cd ${WRKSRC}/libmilter && ${MAKE} clean && ${MAKE} + cd ${WRKSRC} && { \ + ${ECHO} ; \ + ${ECHO} ${MF_INCDIR} ; \ + ${ECHO} libmilter ; \ + ${ECHO} ${SENDMAIL8_12} ; \ + ${ECHO} ; \ + } | ./configure + +do-install: + ${MKDIR} ${DOC_DIR} + ${INSTALL_PROGRAM} ${WRKSRC}/drweb-smf ${PREFIX}/sbin + ${INSTALL_DATA} ${WRKSRC}/../sendmail/readme.sendmail ${DOC_DIR} + ${INSTALL_DATA} ${WRKSRC}/../sendmail/readme.sendmail.rus ${DOC_DIR} + ${SED} 's#!!PREFIX!!#${PREFIX}#' < ${FILESDIR}/drweb-smf.sh >${WRKSRC}/drweb-smf.sh + ${INSTALL_SCRIPT} ${WRKSRC}/drweb-smf.sh ${PREFIX}/etc/rc.d + +.include <bsd.port.post.mk> diff --git a/security/drweb-sendmail/distinfo b/security/drweb-sendmail/distinfo new file mode 100644 index 000000000000..adae23a9ddcc --- /dev/null +++ b/security/drweb-sendmail/distinfo @@ -0,0 +1 @@ +MD5 (drwebd-4.25-freebsd4.tgz) = 6bbd1b39fb39cfd63bff42c2491d2272 diff --git a/security/drweb-sendmail/files/Makefile b/security/drweb-sendmail/files/Makefile new file mode 100644 index 000000000000..7a596c37c349 --- /dev/null +++ b/security/drweb-sendmail/files/Makefile @@ -0,0 +1,20 @@ +# $FreeBSD$ +# +SENDMAIL_DIR=/usr/src/contrib/sendmail +.PATH: ${SENDMAIL_DIR}/libmilter + +CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include +CFLAGS+=-DNEWDB -DNIS -DMAP_REGEX -DNOT_SENDMAIL + +# User customizations to the sendmail build environment +CFLAGS+=${SENDMAIL_CFLAGS} + +LIB= milter + +SRCS+= comm.c engine.c handler.c listener.c main.c signal.c sm_gethost.c smfi.c + +INTERNALLIB= true +NOPIC= true +INTERNALSTATICLIB= true + +.include <bsd.lib.mk> diff --git a/security/drweb-sendmail/files/drweb-smf.sh b/security/drweb-sendmail/files/drweb-smf.sh new file mode 100644 index 000000000000..2014feaf3c60 --- /dev/null +++ b/security/drweb-sendmail/files/drweb-smf.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# +# $FreeBSD$ + +drwebfilter='!!PREFIX!!/sbin/drweb-smf' + +case "$1" in +start) + if [ -x $drwebd ]; then + echo -n ' drweb-smf' + $drwebfilter -u/var/run/drwebd -m/var/run/drweb-smf.sock -a/var/spool/drweb_infected -f/var/spool/drweb-smf -r -x -h -l -ba -gpostmaster -epostmaster + fi + ;; +stop) + /usr/bin/killall drweb-smf + /bin/rm -f /var/run/drweb-smf.sock + echo -n ' drweb-smf' + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + exit 64 + ;; +esac + +exit 0 diff --git a/security/drweb-sendmail/pkg-comment b/security/drweb-sendmail/pkg-comment new file mode 100644 index 000000000000..4daae70d78b8 --- /dev/null +++ b/security/drweb-sendmail/pkg-comment @@ -0,0 +1 @@ +Sendmail message filter for virus processing through DrWeb daemon diff --git a/security/drweb-sendmail/pkg-descr b/security/drweb-sendmail/pkg-descr new file mode 100644 index 000000000000..4daae70d78b8 --- /dev/null +++ b/security/drweb-sendmail/pkg-descr @@ -0,0 +1 @@ +Sendmail message filter for virus processing through DrWeb daemon diff --git a/security/drweb-sendmail/pkg-message b/security/drweb-sendmail/pkg-message new file mode 100644 index 000000000000..4ef97618798c --- /dev/null +++ b/security/drweb-sendmail/pkg-message @@ -0,0 +1,13 @@ +This software requires Sendmail tobe compiled with mail filter support. +So be sure you have the following in your /etc/make.conf: + +SENDMAIL_CFLAGS+= -D_FFR_MILTER=1 + +in order to have Sendmail always compiled with mail filtering support when you +build your system from sources. If Sendmail is not yet recompiled with this +flag, then do the following: + +cd /usr/src/usr.sbin/sendmail +make clean +make +make install diff --git a/security/drweb-sendmail/pkg-plist b/security/drweb-sendmail/pkg-plist new file mode 100644 index 000000000000..93f0bd494ea8 --- /dev/null +++ b/security/drweb-sendmail/pkg-plist @@ -0,0 +1,5 @@ +etc/rc.d/drweb-smf.sh +sbin/drweb-smf +share/doc/drweb-sendmail/readme.sendmail +share/doc/drweb-sendmail/readme.sendmail.rus +@dirrm share/doc/drweb-sendmail |