DrWeb antivirus sendmail integration

This commit is contained in:
Andrey A. Chernov 2001-08-24 15:57:23 +00:00
parent f8933946ee
commit 7fb43943bb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=46800
9 changed files with 141 additions and 0 deletions

View File

@ -33,6 +33,7 @@
SUBDIR += digest SUBDIR += digest
SUBDIR += donkey SUBDIR += donkey
SUBDIR += drweb SUBDIR += drweb
SUBDIR += drweb-sendmail
SUBDIR += dsniff SUBDIR += dsniff
SUBDIR += fakebo SUBDIR += fakebo
SUBDIR += find_ddos SUBDIR += find_ddos

View File

@ -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>

View File

@ -0,0 +1 @@
MD5 (drwebd-4.25-freebsd4.tgz) = 6bbd1b39fb39cfd63bff42c2491d2272

View File

@ -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>

View File

@ -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

View File

@ -0,0 +1 @@
Sendmail message filter for virus processing through DrWeb daemon

View File

@ -0,0 +1 @@
Sendmail message filter for virus processing through DrWeb daemon

View File

@ -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

View File

@ -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