Sendmail milter wich uses Mcafee Virus Scan
The milter recives messages from sendmail, and saves them as a file in
a directory. The directory name and the file name are the "$i" (queue
identifier) from Sendmail, making it easier to identify them. Once the
entire message has been received, the milter runs "ripmime" on the file
to extract any attachments. If rupmime returns without an error then it
will run "uvscan" on the diretory to scan all the files in it. If uvscan
returns an error, then the milter will look for viruses output from
uvscan, and reject the message reporting which viruses were found. If
viruses were found then the entire directory is moved to quarantine,
otherwise it is deleted.
The milter also does extention checks. Certain extentions are blocked
completely. In specific, extenions of .scr, .vbs, .pif, and .com are
blocked.
Author gave permission to distribute it with BSD-License.
WWW: http://www.nmt.edu/~wcolburn/antivirus/
2004-01-05 17:51:18 +00:00
|
|
|
# New ports collection makefile for: antivirus
|
|
|
|
# Date created: 02.Jan 2004
|
|
|
|
# Whom: dirk.meyer@dinoex.sub.org
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= antivirus
|
|
|
|
PORTVERSION= 3.30
|
2005-07-07 03:58:51 +00:00
|
|
|
PORTREVISION= 4
|
Sendmail milter wich uses Mcafee Virus Scan
The milter recives messages from sendmail, and saves them as a file in
a directory. The directory name and the file name are the "$i" (queue
identifier) from Sendmail, making it easier to identify them. Once the
entire message has been received, the milter runs "ripmime" on the file
to extract any attachments. If rupmime returns without an error then it
will run "uvscan" on the diretory to scan all the files in it. If uvscan
returns an error, then the milter will look for viruses output from
uvscan, and reject the message reporting which viruses were found. If
viruses were found then the entire directory is moved to quarantine,
otherwise it is deleted.
The milter also does extention checks. Certain extentions are blocked
completely. In specific, extenions of .scr, .vbs, .pif, and .com are
blocked.
Author gave permission to distribute it with BSD-License.
WWW: http://www.nmt.edu/~wcolburn/antivirus/
2004-01-05 17:51:18 +00:00
|
|
|
CATEGORIES= mail
|
2005-05-28 03:38:08 +00:00
|
|
|
MASTER_SITES= ${MASTER_SITE_LOCAL}
|
|
|
|
MASTER_SITE_SUBDIR= dinoex
|
Sendmail milter wich uses Mcafee Virus Scan
The milter recives messages from sendmail, and saves them as a file in
a directory. The directory name and the file name are the "$i" (queue
identifier) from Sendmail, making it easier to identify them. Once the
entire message has been received, the milter runs "ripmime" on the file
to extract any attachments. If rupmime returns without an error then it
will run "uvscan" on the diretory to scan all the files in it. If uvscan
returns an error, then the milter will look for viruses output from
uvscan, and reject the message reporting which viruses were found. If
viruses were found then the entire directory is moved to quarantine,
otherwise it is deleted.
The milter also does extention checks. Certain extentions are blocked
completely. In specific, extenions of .scr, .vbs, .pif, and .com are
blocked.
Author gave permission to distribute it with BSD-License.
WWW: http://www.nmt.edu/~wcolburn/antivirus/
2004-01-05 17:51:18 +00:00
|
|
|
|
|
|
|
MAINTAINER= dinoex@FreeBSD.org
|
|
|
|
COMMENT= Sendmail milter wich uses Mcafee Virus Scan
|
|
|
|
|
|
|
|
RUN_DEPENDS= ${LOCALBASE}/bin/ripmime:${PORTSDIR}/mail/ripmime
|
|
|
|
.if !defined(SENDMAIL_MILTER_IN_BASE)
|
2004-12-16 21:07:39 +00:00
|
|
|
.if defined(SENDMAIL_WITH_SHARED_MILTER)
|
2004-12-17 04:38:34 +00:00
|
|
|
LIB_DEPENDS+= milter.3:${PORTSDIR}/mail/${SENDMAIL_MILTER_PORT}
|
2004-12-16 21:07:39 +00:00
|
|
|
.else
|
2004-12-17 04:38:34 +00:00
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/${SENDMAIL_MILTER_PORT}
|
Sendmail milter wich uses Mcafee Virus Scan
The milter recives messages from sendmail, and saves them as a file in
a directory. The directory name and the file name are the "$i" (queue
identifier) from Sendmail, making it easier to identify them. Once the
entire message has been received, the milter runs "ripmime" on the file
to extract any attachments. If rupmime returns without an error then it
will run "uvscan" on the diretory to scan all the files in it. If uvscan
returns an error, then the milter will look for viruses output from
uvscan, and reject the message reporting which viruses were found. If
viruses were found then the entire directory is moved to quarantine,
otherwise it is deleted.
The milter also does extention checks. Certain extentions are blocked
completely. In specific, extenions of .scr, .vbs, .pif, and .com are
blocked.
Author gave permission to distribute it with BSD-License.
WWW: http://www.nmt.edu/~wcolburn/antivirus/
2004-01-05 17:51:18 +00:00
|
|
|
.endif
|
2004-12-16 21:07:39 +00:00
|
|
|
.endif
|
Sendmail milter wich uses Mcafee Virus Scan
The milter recives messages from sendmail, and saves them as a file in
a directory. The directory name and the file name are the "$i" (queue
identifier) from Sendmail, making it easier to identify them. Once the
entire message has been received, the milter runs "ripmime" on the file
to extract any attachments. If rupmime returns without an error then it
will run "uvscan" on the diretory to scan all the files in it. If uvscan
returns an error, then the milter will look for viruses output from
uvscan, and reject the message reporting which viruses were found. If
viruses were found then the entire directory is moved to quarantine,
otherwise it is deleted.
The milter also does extention checks. Certain extentions are blocked
completely. In specific, extenions of .scr, .vbs, .pif, and .com are
blocked.
Author gave permission to distribute it with BSD-License.
WWW: http://www.nmt.edu/~wcolburn/antivirus/
2004-01-05 17:51:18 +00:00
|
|
|
|
2004-12-17 04:38:34 +00:00
|
|
|
SENDMAIL_MILTER_PORT?= sendmail
|
Sendmail milter wich uses Mcafee Virus Scan
The milter recives messages from sendmail, and saves them as a file in
a directory. The directory name and the file name are the "$i" (queue
identifier) from Sendmail, making it easier to identify them. Once the
entire message has been received, the milter runs "ripmime" on the file
to extract any attachments. If rupmime returns without an error then it
will run "uvscan" on the diretory to scan all the files in it. If uvscan
returns an error, then the milter will look for viruses output from
uvscan, and reject the message reporting which viruses were found. If
viruses were found then the entire directory is moved to quarantine,
otherwise it is deleted.
The milter also does extention checks. Certain extentions are blocked
completely. In specific, extenions of .scr, .vbs, .pif, and .com are
blocked.
Author gave permission to distribute it with BSD-License.
WWW: http://www.nmt.edu/~wcolburn/antivirus/
2004-01-05 17:51:18 +00:00
|
|
|
CFLAGS+= -Wall ${PTHREAD_CFLAGS:S=""==}
|
|
|
|
LIBS+= -lmilter ${PTHREAD_LIBS}
|
|
|
|
ANTIVIRUS_DIR?= /var/spool/antivirus
|
|
|
|
PLIST_SUB+= ANTIVIRUS=${ANTIVIRUS_DIR}
|
|
|
|
SED_SCRIPT= -e 's|%%ANTIVIRUS%%|${ANTIVIRUS_DIR}|g' \
|
|
|
|
-e 's|%%PREFIX%%|${PREFIX}|g'
|
|
|
|
MAKE_ENV+= SENDMAILBASE="${SENDMAILBASE}" \
|
|
|
|
SENDMAILOBJ="${SENDMAILOBJ}" \
|
|
|
|
LIBS="${LIBS}"
|
|
|
|
|
|
|
|
.if !defined(SENDMAIL_MILTER_IN_BASE)
|
|
|
|
CFLAGS+= -I${LOCALBASE}/include
|
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib
|
2004-12-20 13:01:12 +00:00
|
|
|
LIBS+= ${LDFLAGS}
|
Sendmail milter wich uses Mcafee Virus Scan
The milter recives messages from sendmail, and saves them as a file in
a directory. The directory name and the file name are the "$i" (queue
identifier) from Sendmail, making it easier to identify them. Once the
entire message has been received, the milter runs "ripmime" on the file
to extract any attachments. If rupmime returns without an error then it
will run "uvscan" on the diretory to scan all the files in it. If uvscan
returns an error, then the milter will look for viruses output from
uvscan, and reject the message reporting which viruses were found. If
viruses were found then the entire directory is moved to quarantine,
otherwise it is deleted.
The milter also does extention checks. Certain extentions are blocked
completely. In specific, extenions of .scr, .vbs, .pif, and .com are
blocked.
Author gave permission to distribute it with BSD-License.
WWW: http://www.nmt.edu/~wcolburn/antivirus/
2004-01-05 17:51:18 +00:00
|
|
|
SENDMAILBASE= ${LOCALBASE}
|
|
|
|
SENDMAILOBJ= ${LOCALBASE}
|
|
|
|
.else
|
|
|
|
SENDMAILBASE= /usr
|
|
|
|
SENDMAILOBJ= /usr
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if defined(SENDMAIL_WITHOUT_MILTER)
|
|
|
|
pre-fetch:
|
|
|
|
@${ECHO_MSG}
|
|
|
|
@${ECHO_MSG} You must unset variable SENDMAIL_WITHOUT_MILTER,
|
|
|
|
@${ECHO_MSG} and rebuild sendmail in the ports
|
|
|
|
@${FALSE}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
do-configure:
|
|
|
|
@${REINPLACE_CMD} -e 's|/etc/mail/antivirus.conf|${LOCALBASE}/etc/antivirus.conf|' \
|
|
|
|
${CONFIGURE_WRKSRC}/antivirus.c
|
|
|
|
@${SED} ${SED_SCRIPT} ${FILESDIR}/antivirus-milter.sh \
|
|
|
|
> ${WRKSRC}/antivirus-milter.sh
|
|
|
|
@${SED} ${SED_SCRIPT} ${FILESDIR}/antivirus.conf \
|
|
|
|
> ${WRKSRC}/antivirus.conf
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/antivirus \
|
|
|
|
${PREFIX}/libexec/antivirus
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/antivirus-milter.sh \
|
|
|
|
${PREFIX}/etc/rc.d/antivirus-milter.sh.sample
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/antivirus.conf ${PREFIX}/etc/antivirus.conf-dist
|
2004-03-05 21:36:12 +00:00
|
|
|
${MKDIR} ${ANTIVIRUS_DIR}/spool ${ANTIVIRUS_DIR}/run ${ANTIVIRUS_DIR}/quarantine
|
|
|
|
${CHOWN} -R nobody:nobody ${ANTIVIRUS_DIR}/
|
Sendmail milter wich uses Mcafee Virus Scan
The milter recives messages from sendmail, and saves them as a file in
a directory. The directory name and the file name are the "$i" (queue
identifier) from Sendmail, making it easier to identify them. Once the
entire message has been received, the milter runs "ripmime" on the file
to extract any attachments. If rupmime returns without an error then it
will run "uvscan" on the diretory to scan all the files in it. If uvscan
returns an error, then the milter will look for viruses output from
uvscan, and reject the message reporting which viruses were found. If
viruses were found then the entire directory is moved to quarantine,
otherwise it is deleted.
The milter also does extention checks. Certain extentions are blocked
completely. In specific, extenions of .scr, .vbs, .pif, and .com are
blocked.
Author gave permission to distribute it with BSD-License.
WWW: http://www.nmt.edu/~wcolburn/antivirus/
2004-01-05 17:51:18 +00:00
|
|
|
@${ECHO_MSG} "Add to your *.mc configfile:"
|
|
|
|
@${ECHO_MSG} "INPUT_MAIL_FILTER(\`antivirus', \`S=local:${ANTIVIRUS_DIR}/antivirus.sock, F=')"
|
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|