summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--security/Makefile1
-rw-r--r--security/antivir-milter/Makefile100
-rw-r--r--security/antivir-milter/distinfo1
-rw-r--r--security/antivir-milter/files/antivirupdater.sh3
-rw-r--r--security/antivir-milter/files/patch-etc::avmilter.conf85
-rw-r--r--security/antivir-milter/files/patch-init::rc.avmilter45
-rw-r--r--security/antivir-milter/pkg-descr26
-rw-r--r--security/antivir-milter/pkg-message29
-rw-r--r--security/antivir-milter/pkg-plist76
9 files changed, 366 insertions, 0 deletions
diff --git a/security/Makefile b/security/Makefile
index 96a5d02..1ce4f73 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -12,6 +12,7 @@
SUBDIR += amavis-perl
SUBDIR += amavisd
SUBDIR += amavisd-new
+ SUBDIR += antivir-milter
SUBDIR += apg
SUBDIR += arirang
SUBDIR += audit
diff --git a/security/antivir-milter/Makefile b/security/antivir-milter/Makefile
new file mode 100644
index 0000000..c77e682
--- /dev/null
+++ b/security/antivir-milter/Makefile
@@ -0,0 +1,100 @@
+# New ports collection makefile for: antivir-milter
+# Date created: 21 September 2003
+# Whom: marius@alchemy.franken.de
+#
+# $FreeBSD$
+
+PORTNAME= antivir-milter
+PORTVERSION= 1.0.6
+CATEGORIES= security mail
+MASTER_SITES= ftp://ftp.antivir.de/freebsd/
+DISTNAME= avfbmlt
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= marius@alchemy.franken.de
+COMMENT= AntiVir Milter mail virusscanner for Sendmail
+
+RESTRICTED= H+BEDV Datentechnik GmbH forbids any redistribution
+NO_PACKAGE= ${RESTRICTED}
+NO_CDROM= ${RESTRICTED}
+
+ONLY_FOR_ARCHS= i386
+NO_BUILD= yes
+USE_REINPLACE= yes
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+PKGMESSAGE= ${WRKDIR}/pkg-message
+
+.include <bsd.port.pre.mk>
+
+.if (!exists(/usr/lib/libmilter.a)) && (!exists(${PREFIX}/lib/libmilter.a))
+IGNORE= requires Sendmail 8.12
+.endif
+
+.if ${OSVERSION} >= 500000
+LIB_DEPENDS= c.4:${PORTSDIR}/misc/compat4x
+.endif
+
+post-patch:
+.for i in etc/avmilter.conf init/rc.avmilter
+ @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/${i}
+.endfor
+ @${REINPLACE_CMD} -e 's|\/etc\/avmilter.conf|${PREFIX}&|g' \
+ ${WRKSRC}/script/avq
+ @${SED} 's|%%PREFIX%%|${PREFIX}|g' ${PKGDIR}/pkg-message > \
+ ${WRKDIR}/pkg-message
+ @${SED} 's|%%PREFIX%%|${PREFIX}|g' ${FILESDIR}/antivirupdater.sh > \
+ ${WRKDIR}/antivirupdater.sh
+
+do-install:
+ @${INSTALL} -d -o daemon -g daemon -m 755 ${PREFIX}/AntiVir
+ @${INSTALL} -o daemon -g daemon -m 555 ${WRKSRC}/bin/antivir \
+ ${PREFIX}/AntiVir/antivir-dist
+.if !exists(${PREFIX}/AntiVir/antivir)
+ @${INSTALL} -o daemon -g daemon -m 555 ${WRKSRC}/bin/antivir \
+ ${PREFIX}/AntiVir
+.endif
+ @${INSTALL} -o daemon -g daemon -m 444 ${WRKSRC}/vdf/antivir.vdf \
+ ${PREFIX}/AntiVir/antivir.vdf-dist
+.if !exists(${PREFIX}/AntiVir/antivir.vdf)
+ @${INSTALL} -o daemon -g daemon -m 444 ${WRKSRC}/vdf/antivir.vdf \
+ ${PREFIX}/AntiVir
+.endif
+ @${INSTALL_SCRIPT} ${WRKSRC}/script/avq ${PREFIX}/bin
+.for i in antivir.conf avmilter.conf
+ @${INSTALL_DATA} ${WRKSRC}/etc/${i} ${PREFIX}/etc/${i}.sample
+.if !exists(${PREFIX}/etc/${i})
+ @${INSTALL_DATA} ${WRKSRC}/etc/${i} ${PREFIX}/etc
+.endif
+.endfor
+ @${INSTALL_PROGRAM} ${WRKSRC}/bin/avmilter ${PREFIX}/sbin
+ @${INSTALL_SCRIPT} ${WRKDIR}/antivirupdater.sh \
+ ${PREFIX}/sbin/antivirupdater
+ @${INSTALL_SCRIPT} ${WRKSRC}/init/rc.avmilter \
+ ${PREFIX}/etc/rc.d/antivir-milter.sh
+ @${INSTALL} -d -o daemon -g daemon -m 700 /var/spool/avmilter
+.for i in incoming outgoing rejected
+ @${INSTALL} -d -o daemon -g daemon -m 700 /var/spool/avmilter/${i}
+.endfor
+.for i in de en es hu it nl
+ @${INSTALL} -d ${EXAMPLESDIR}/templates/${i}
+.for j in patho-administrator patho-recipient patho-sender virus-administrator \
+ virus-recipient virus-sender
+ @${INSTALL_DATA} ${WRKSRC}/templates/${i}/${j} \
+ ${EXAMPLESDIR}/templates/${i}
+.endfor
+.endfor
+.if !defined(NOPORTDOCS)
+ @${INSTALL} -d ${DOCSDIR}
+.for i in ChangeLog LICENSE LICENSE.DE
+ @${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
+.endfor
+.for i in avmilter_de.pdf avmilter_en.pdf
+ @${INSTALL_DATA} ${WRKSRC}/doc/${i} ${DOCSDIR}
+.endfor
+ @${INSTALL_DATA} ${WRKSRC}/pgp/antivir.gpg ${DOCSDIR}
+.endif
+
+post-install:
+ @${CAT} ${WRKDIR}/pkg-message
+
+.include <bsd.port.post.mk>
diff --git a/security/antivir-milter/distinfo b/security/antivir-milter/distinfo
new file mode 100644
index 0000000..1e3182c
--- /dev/null
+++ b/security/antivir-milter/distinfo
@@ -0,0 +1 @@
+MD5 (avfbmlt.tgz) = ba2855ce964808ce2a2046bae05dbce7
diff --git a/security/antivir-milter/files/antivirupdater.sh b/security/antivir-milter/files/antivirupdater.sh
new file mode 100644
index 0000000..79d2ed7
--- /dev/null
+++ b/security/antivir-milter/files/antivirupdater.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+%%PREFIX%%/AntiVir/antivir -C %%PREFIX%%/etc/antivir.conf --home-dir=%%PREFIX%%/AntiVir --update
diff --git a/security/antivir-milter/files/patch-etc::avmilter.conf b/security/antivir-milter/files/patch-etc::avmilter.conf
new file mode 100644
index 0000000..34a6ed3
--- /dev/null
+++ b/security/antivir-milter/files/patch-etc::avmilter.conf
@@ -0,0 +1,85 @@
+--- etc/avmilter.conf.orig Sun Sep 21 19:07:51 2003
++++ etc/avmilter.conf Sun Sep 21 19:25:13 2003
+@@ -12,8 +12,8 @@
+ # ------------------------------------------------------------------------
+ # AntiVir Milter will run as the specified user and group.
+
+-# User uucp
+-# Group uucp
++User daemon
++Group daemon
+
+
+ # ------------------------------------------------------------------------
+@@ -42,7 +42,7 @@
+ # AntiVirDir: The antivir 'library' directory, where the VDF,
+ # the key, and some other files are stored.
+
+-# AntiVirDir /usr/lib/AntiVir
++AntiVirDir %%PREFIX%%/AntiVir
+
+
+ # ------------------------------------------------------------------------
+@@ -66,7 +66,7 @@
+ # Select the directory and binary of sendmail and the arguments how to
+ # call sendmail.
+
+-# ForwardTo /usr/lib/sendmail -oem -oi
++ForwardTo /usr/sbin/sendmail -oem -oi
+
+
+ # ------------------------------------------------------------------------
+@@ -93,7 +93,7 @@
+ # Block mails which are coded as a fragmented message.
+ # "Message Fragmentation and Reassembly" (RFC2046, section 5.2.2.1).
+
+-# BlockFragmentedMessage NO
++# BlockFragmentedMessage NO
+
+
+ # ------------------------------------------------------------------------
+@@ -118,7 +118,7 @@
+ # ------------------------------------------------------------------------
+ # User name of sender of virus alerts, if virus was found in a mail.
+
+-# VirusAlertsUser AntiVir
++VirusAlertsUser MAILER-DAEMON
+
+
+ # ------------------------------------------------------------------------
+@@ -169,7 +169,7 @@
+ # If BlockSuspiciousArchive is YES, stop delivery of mails
+ # containing archives if MaxRecursionDepthInArchive has been reached.
+
+-# BlockSuspiciousArchive NO
++# BlockSuspiciousArchive NO
+
+
+ # ------------------------------------------------------------------------
+@@ -179,7 +179,7 @@
+ # If BlockEncryptedArchive is YES, stop delivery of mails
+ # containing encrypted files in an archive.
+
+-# BlockEncryptedArchive NO
++# BlockEncryptedArchive NO
+
+
+ # ------------------------------------------------------------------------
+@@ -188,7 +188,7 @@
+ # to the header of checked mail. E.g.: "X-AntiVirus: Checked by ..."
+ # This option is only available in commercial mode.
+
+-# AddXHeader YES
++# AddXHeader YES
+
+
+ # ------------------------------------------------------------------------
+@@ -203,7 +203,7 @@
+ # ScanTimeout specifies the scan time of mail, in seconds, when to stop
+ # scanning of mails.
+
+-# ScanTimeout 300
++# ScanTimeout 300
+
+
+ # ------------------------------------------------------------------------
diff --git a/security/antivir-milter/files/patch-init::rc.avmilter b/security/antivir-milter/files/patch-init::rc.avmilter
new file mode 100644
index 0000000..92d27def
--- /dev/null
+++ b/security/antivir-milter/files/patch-init::rc.avmilter
@@ -0,0 +1,45 @@
+--- init/rc.avmilter.orig Sun Sep 21 19:51:22 2003
++++ init/rc.avmilter Sun Sep 21 20:22:38 2003
+@@ -14,20 +14,27 @@
+
+ case "$1" in
+ start)
+- echo "Starting AntiVir Milter."
+- /usr/sbin/avmilter -p inet:3333@localhost
++ if [ -x %%PREFIX%%/sbin/avmilter ]; then
++ umask 0077
++ rm -f %%PREFIX%%/AntiVir/avmilter.sock
++ %%PREFIX%%/sbin/avmilter \
++ -C %%PREFIX%%/etc/avmilter.conf \
++ -p local:%%PREFIX%%/AntiVir/avmilter.sock
++ umask 0022
++ echo -n " antivir-milter"
++ fi
+ ;;
+ stop)
+- echo -n "Shutting down AntiVir Milter."
+- killall -TERM /usr/sbin/avmilter
+- echo
++ killall -TERM avmilter
++ rm -f %%PREFIX%%/AntiVir/avmilter.sock
++ echo -n " antivir-milter"
+ ;;
+ restart)
+ "$0" stop
+ "$0" start
+ ;;
+ status)
+- if [ -z "$(ps axw | grep "/usr/sbin/avmilter" | grep -v grep)" ]
++ if [ -z "$(ps axw | grep "avmilter" | grep -v grep)" ]
+ then
+ echo "FAILED avmilter is not running!"
+ else
+@@ -35,7 +42,7 @@
+ fi
+ ;;
+ *)
+- echo "Usage: $0 {start|stop|restart|status}"
++ echo "Usage: `basename $0` {start|stop|restart|status}" >&2
+ exit 1
+ esac
+
diff --git a/security/antivir-milter/pkg-descr b/security/antivir-milter/pkg-descr
new file mode 100644
index 0000000..48487d2
--- /dev/null
+++ b/security/antivir-milter/pkg-descr
@@ -0,0 +1,26 @@
+AntiVir Milter is a plug-in for sendmail versions 8.11 and up and communicates
+via the libmilter interface of sendmail.
+AntiVir Milter checks all incoming and outgoing emails. Infected emails are
+blocked, depending on the presetting. A status message is written to "syslog".
+The sender, receiver and administrator can be informed about infections.
+
+Functions:
+- All sendmail functions can still be used
+ Example: SMTP authentication, anti-relaying, anti-spam
+- Easy installation and integration into sendmail
+- Hourly or daily update of the scan engine and the virus definition files
+ via the Internet
+- Checking of incoming and outgoing mails
+- Dependable detection of viruses and unwanted programs in real time
+- Configurable response to a detected virus or unwanted program
+- Isolation of infected and suspicious files in a quarantine directory
+- LOG file can be used as a protocol via mail traffic
+- Immediate activation, if new virus definition file (.VDF) is available
+- Heuristic macro-virus detection
+- Modifiable templates to create own alert messages
+- Scanning in archives (19 formats are supported)
+
+AntiVir Milter is free of charge for private (individual, non-commercial) use.
+
+http://www.antivir.de/
+WWW: http://www.hbedv.com/
diff --git a/security/antivir-milter/pkg-message b/security/antivir-milter/pkg-message
new file mode 100644
index 0000000..972f5a8
--- /dev/null
+++ b/security/antivir-milter/pkg-message
@@ -0,0 +1,29 @@
+===========================================================================
+
+In order to configure Sendmail for this port add the following lines to
+your SENDMAIL_MC:
+
+INPUT_MAIL_FILTER(
+ `antivir-milter',
+ `S=unix:%%PREFIX%%/AntiVir/avmilter.sock, F=T, T=S:10m;R:10m;E:5m'
+)dnl
+
+Don't forget to rebuild sendmail.cf and to restart Sendmail afterwards.
+
+For automated updates of the virus definition file add the following
+line to your /etc/crontab:
+25 0 * * * root %%PREFIX%%/sbin/antivirupdater >/dev/null
+
+For full functionality of AntiVir Milter you need to obtain a license
+key from H+BEDV Datentechnik GmbH. To install it, execute the following
+commands:
+cp hbedv.key %%PREFIX%%/AntiVir/
+chown daemon:daemon %%PREFIX%%/AntiVir/hbedv.key
+chmod 440 %%PREFIX%%/AntiVir/hbedv.key
+
+A license key for private (individual, non-commercial) use can be applied
+for free of charge at:
+http://www.antivir.de/order/privreg/linux.htm (German)
+http://www.hbedv.com/private/ (English)
+
+===========================================================================
diff --git a/security/antivir-milter/pkg-plist b/security/antivir-milter/pkg-plist
new file mode 100644
index 0000000..0cfc113
--- /dev/null
+++ b/security/antivir-milter/pkg-plist
@@ -0,0 +1,76 @@
+@exec install -d -o daemon -g daemon -m 755 %D/AntiVir
+@unexec if cmp -s %D/AntiVir/antivir-dist %D/AntiVir/antivir; then rm -f %D/AntiVir/antivir; fi
+AntiVir/antivir-dist
+@exec [ -f %B/antivir ] || cp -p %B/%f %B/antivir
+@unexec if cmp -s %D/AntiVir/antivir.vdf-dist %D/AntiVir/antivir.vdf; then rm -f %D/AntiVir/antivir.vdf; fi
+AntiVir/antivir.vdf-dist
+@exec [ -f %B/antivir.vdf ] || cp -p %B/%f %B/antivir.vdf
+@unexec rmdir %D/AntiVir 2> /dev/null || echo "If permanently deleting this package, %D/AntiVir and its contents must be removed manually."
+bin/avq
+@unexec if cmp -s %D/etc/antivir.conf.sample %D/etc/antivir.conf; then rm -f %D/etc/antivir.conf; else echo "If permanently deleting this package, %D/etc/antivir.conf must be removed manually."; fi
+etc/antivir.conf.sample
+@exec [ -f %B/antivir.conf ] || cp %B/%f %B/antivir.conf
+@unexec if cmp -s %D/etc/avmilter.conf.sample %D/etc/avmilter.conf; then rm -f %D/etc/avmilter.conf; else echo "If permanently deleting this package, %D/etc/avmilter.conf must be removed manually."; fi
+etc/avmilter.conf.sample
+@exec [ -f %B/avmilter.conf ] || cp %B/%f %B/avmilter.conf
+etc/rc.d/antivir-milter.sh
+sbin/avmilter
+@exec install -d -o daemon -g daemon -m 700 /var/spool/avmilter
+@exec install -d -o daemon -g daemon -m 700 /var/spool/avmilter/incoming
+@exec install -d -o daemon -g daemon -m 700 /var/spool/avmilter/outgoing
+@exec install -d -o daemon -g daemon -m 700 /var/spool/avmilter/rejected
+@unexec rmdir /var/spool/avmilter/incoming 2> /dev/null || true
+@unexec rmdir /var/spool/avmilter/outgoing 2> /dev/null || true
+@unexec rmdir /var/spool/avmilter/rejected 2> /dev/null || true
+@unexec rmdir /var/spool/avmilter 2> /dev/null || echo "If permanently deleting this package, /var/spool/avmilter and its contents must be removed manually."
+%%EXAMPLESDIR%%/templates/de/patho-administrator
+%%EXAMPLESDIR%%/templates/de/patho-recipient
+%%EXAMPLESDIR%%/templates/de/patho-sender
+%%EXAMPLESDIR%%/templates/de/virus-administrator
+%%EXAMPLESDIR%%/templates/de/virus-recipient
+%%EXAMPLESDIR%%/templates/de/virus-sender
+@dirrm %%EXAMPLESDIR%%/templates/de
+%%EXAMPLESDIR%%/templates/en/patho-administrator
+%%EXAMPLESDIR%%/templates/en/patho-recipient
+%%EXAMPLESDIR%%/templates/en/patho-sender
+%%EXAMPLESDIR%%/templates/en/virus-administrator
+%%EXAMPLESDIR%%/templates/en/virus-recipient
+%%EXAMPLESDIR%%/templates/en/virus-sender
+@dirrm %%EXAMPLESDIR%%/templates/en
+%%EXAMPLESDIR%%/templates/es/patho-administrator
+%%EXAMPLESDIR%%/templates/es/patho-recipient
+%%EXAMPLESDIR%%/templates/es/patho-sender
+%%EXAMPLESDIR%%/templates/es/virus-administrator
+%%EXAMPLESDIR%%/templates/es/virus-recipient
+%%EXAMPLESDIR%%/templates/es/virus-sender
+@dirrm %%EXAMPLESDIR%%/templates/es
+%%EXAMPLESDIR%%/templates/hu/patho-administrator
+%%EXAMPLESDIR%%/templates/hu/patho-recipient
+%%EXAMPLESDIR%%/templates/hu/patho-sender
+%%EXAMPLESDIR%%/templates/hu/virus-administrator
+%%EXAMPLESDIR%%/templates/hu/virus-recipient
+%%EXAMPLESDIR%%/templates/hu/virus-sender
+@dirrm %%EXAMPLESDIR%%/templates/hu
+%%EXAMPLESDIR%%/templates/it/patho-administrator
+%%EXAMPLESDIR%%/templates/it/patho-recipient
+%%EXAMPLESDIR%%/templates/it/patho-sender
+%%EXAMPLESDIR%%/templates/it/virus-administrator
+%%EXAMPLESDIR%%/templates/it/virus-recipient
+%%EXAMPLESDIR%%/templates/it/virus-sender
+@dirrm %%EXAMPLESDIR%%/templates/it
+%%EXAMPLESDIR%%/templates/nl/patho-administrator
+%%EXAMPLESDIR%%/templates/nl/patho-recipient
+%%EXAMPLESDIR%%/templates/nl/patho-sender
+%%EXAMPLESDIR%%/templates/nl/virus-administrator
+%%EXAMPLESDIR%%/templates/nl/virus-recipient
+%%EXAMPLESDIR%%/templates/nl/virus-sender
+@dirrm %%EXAMPLESDIR%%/templates/nl
+@dirrm %%EXAMPLESDIR%%/templates
+@dirrm %%EXAMPLESDIR%%
+%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
+%%PORTDOCS%%%%DOCSDIR%%/LICENSE
+%%PORTDOCS%%%%DOCSDIR%%/LICENSE.DE
+%%PORTDOCS%%%%DOCSDIR%%/avmilter_de.pdf
+%%PORTDOCS%%%%DOCSDIR%%/avmilter_en.pdf
+%%PORTDOCS%%%%DOCSDIR%%/antivir.gpg
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
OpenPOWER on IntegriCloud