DrWeb antivirus sendmail integration
This commit is contained in:
parent
f8933946ee
commit
7fb43943bb
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=46800
@ -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
|
||||||
|
74
security/drweb-sendmail/Makefile
Normal file
74
security/drweb-sendmail/Makefile
Normal 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>
|
1
security/drweb-sendmail/distinfo
Normal file
1
security/drweb-sendmail/distinfo
Normal file
@ -0,0 +1 @@
|
|||||||
|
MD5 (drwebd-4.25-freebsd4.tgz) = 6bbd1b39fb39cfd63bff42c2491d2272
|
20
security/drweb-sendmail/files/Makefile
Normal file
20
security/drweb-sendmail/files/Makefile
Normal 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>
|
25
security/drweb-sendmail/files/drweb-smf.sh
Normal file
25
security/drweb-sendmail/files/drweb-smf.sh
Normal 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
|
1
security/drweb-sendmail/pkg-comment
Normal file
1
security/drweb-sendmail/pkg-comment
Normal file
@ -0,0 +1 @@
|
|||||||
|
Sendmail message filter for virus processing through DrWeb daemon
|
1
security/drweb-sendmail/pkg-descr
Normal file
1
security/drweb-sendmail/pkg-descr
Normal file
@ -0,0 +1 @@
|
|||||||
|
Sendmail message filter for virus processing through DrWeb daemon
|
13
security/drweb-sendmail/pkg-message
Normal file
13
security/drweb-sendmail/pkg-message
Normal 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
|
5
security/drweb-sendmail/pkg-plist
Normal file
5
security/drweb-sendmail/pkg-plist
Normal 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
|
Loading…
Reference in New Issue
Block a user