aboutsummaryrefslogtreecommitdiffstats
path: root/security/antivir-milter
diff options
context:
space:
mode:
authornetchild <netchild@FreeBSD.org>2004-03-05 23:08:29 +0800
committernetchild <netchild@FreeBSD.org>2004-03-05 23:08:29 +0800
commit86bd4930cc53c2f4bfdee5f518eebb32497be396 (patch)
tree260c934363563a7d3b0b4d11485de53b47555fd3 /security/antivir-milter
parentbd011afeda4e464c4101d6067e98bf354115dd94 (diff)
downloadfreebsd-ports-gnome-86bd4930cc53c2f4bfdee5f518eebb32497be396.tar.gz
freebsd-ports-gnome-86bd4930cc53c2f4bfdee5f518eebb32497be396.tar.zst
freebsd-ports-gnome-86bd4930cc53c2f4bfdee5f518eebb32497be396.zip
HEADS-UP: When updating from a previous version you have to do the following
after deinstalling the old port: # rm PREFIX/AntiVir/antivir # rm PREFIX/AntiVir/antivir.vdf # chown root:wheel PREFIX/AntiVir # chown root:smmsp PREFIX/AntiVir/hbedv.key In your SENDMAIL_MC change `S=unix:PREFIX/AntiVir/avmilter.sock, F=T, T=S:10m;R:10m;E:5m' to: `S=unix:/var/spool/avmilter/avmilter.sock, F=T, T=S:10m;R:10m;E:10m' and rebuild sendmail.cf. If /var/spool/avmilter exist you have to: # chown -R smmsp:smmsp /var/spool/avmilter If you are using a customized PREFIX/etc/avmilter.conf the port won't remove it on deinstall and you have to manually change User and Group to smmsp there. Afterwards you can install the new version of this port. You then should run antivirupdater to get a current VDF. - Change ownership of the socket to user and group smmsp as expected by sendmail. This involves running the milter as smmsp:smmsp, changing the ownership of rest of the files and moving the socket to /var/spool/avmilter but fixes the "local socket unsafe" problem. [1] - Move the milter into the background when launching, this solves the problem with disappearing socket on boot. [2] - Update to 1.1-beta which fixes the "Bad file descriptor" problem. For a full list of chances see ChangeLog in the DOCSDIR. [3] Suggested by: ache@ [1], [3] Suggested by: Martin P. Hellwig <mhellwig@xs4all.nl> [2] Submitted by: maintainer
Diffstat (limited to 'security/antivir-milter')
-rw-r--r--security/antivir-milter/Makefile35
-rw-r--r--security/antivir-milter/distinfo4
-rw-r--r--security/antivir-milter/files/patch-doc::MANUAL112
-rw-r--r--security/antivir-milter/files/patch-etc::antivir.conf14
-rw-r--r--security/antivir-milter/files/patch-etc::avmilter.conf23
-rw-r--r--security/antivir-milter/files/patch-init::rc.avmilter6
-rw-r--r--security/antivir-milter/pkg-message4
-rw-r--r--security/antivir-milter/pkg-plist13
8 files changed, 162 insertions, 49 deletions
diff --git a/security/antivir-milter/Makefile b/security/antivir-milter/Makefile
index 2e52025ff670..c24b9932444f 100644
--- a/security/antivir-milter/Makefile
+++ b/security/antivir-milter/Makefile
@@ -5,12 +5,13 @@
# $FreeBSD$
PORTNAME= antivir-milter
-PORTVERSION= 1.0.6
-PORTREVISION= 4
+PORTVERSION= 1.1.b
CATEGORIES= security mail
-MASTER_SITES= ftp://ftp.antivir.de/freebsd/ \
- http://www.antivir.de/dateien/antivir/release/
-DISTNAME= avfbmlt
+#MASTER_SITES= ftp://ftp.antivir.de/freebsd/ \
+# http://www.antivir.de/dateien/antivir/release/
+MASTER_SITES= http://www.antivir.de/dateien/antivir/beta/freebsd/
+#DISTNAME= avfbmlt
+DISTNAME= avfbmlt_beta
EXTRACT_SUFX= .tgz
MAINTAINER= marius@alchemy.franken.de
@@ -25,7 +26,7 @@ NO_BUILD= yes
USE_REINPLACE= yes
# Auto re-fetch sucks!
FETCH_CMD= /usr/bin/fetch -A
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:S/.b/-beta/}
PKGMESSAGE= ${WRKDIR}/pkg-message
.include <bsd.port.pre.mk>
@@ -39,7 +40,8 @@ LIB_DEPENDS= c.4:${PORTSDIR}/misc/compat4x
.endif
post-patch:
-.for i in etc/antivir.conf etc/avmilter.conf init/rc.avmilter script/avq
+.for i in doc/MANUAL etc/antivir.conf etc/avmilter.conf init/rc.avmilter \
+ script/avq
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/${i}
.endfor
@${SED} 's|%%PREFIX%%|${PREFIX}|g' ${PKGDIR}/pkg-message > \
@@ -48,17 +50,17 @@ post-patch:
${WRKDIR}/antivirupdater.sh
do-install:
- @${INSTALL} -d -o daemon -g daemon -m 755 ${PREFIX}/AntiVir
- @${INSTALL} -o daemon -g daemon -m 755 ${WRKSRC}/bin/antivir \
+ @${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 ${PREFIX}/AntiVir
+ @${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 ${WRKSRC}/bin/antivir \
${PREFIX}/AntiVir/antivir-dist_avfbmlt
.if !exists(${PREFIX}/AntiVir/antivir)
- @${INSTALL} -o daemon -g daemon -m 755 ${WRKSRC}/bin/antivir \
+ @${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 ${WRKSRC}/bin/antivir \
${PREFIX}/AntiVir
.endif
- @${INSTALL} -o daemon -g daemon -m 644 ${WRKSRC}/vdf/antivir.vdf \
+ @${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${WRKSRC}/vdf/antivir.vdf \
${PREFIX}/AntiVir/antivir.vdf-dist_avfbmlt
.if !exists(${PREFIX}/AntiVir/antivir.vdf)
- @${INSTALL} -o daemon -g daemon -m 644 ${WRKSRC}/vdf/antivir.vdf \
+ @${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${WRKSRC}/vdf/antivir.vdf \
${PREFIX}/AntiVir
.endif
@${INSTALL_SCRIPT} ${WRKSRC}/script/avq ${PREFIX}/bin
@@ -73,9 +75,13 @@ do-install:
${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
+ @${INSTALL} -d -o smmsp -g smmsp -m 700 /var/spool/avmilter
.for i in incoming outgoing rejected
- @${INSTALL} -d -o daemon -g daemon -m 700 /var/spool/avmilter/${i}
+ @${INSTALL} -d -o smmsp -g smmsp -m 700 /var/spool/avmilter/${i}
+.endfor
+ @${INSTALL} -d ${EXAMPLESDIR}
+.for i in avmilter.ignore avmilter.scan avmilter.warn
+ @${INSTALL_DATA} ${WRKSRC}/etc/${i} ${EXAMPLESDIR}
.endfor
.for i in de en es hu it nl
@${INSTALL} -d ${EXAMPLESDIR}/templates/${i}
@@ -90,6 +96,7 @@ do-install:
.for i in ChangeLog LICENSE LICENSE.DE
@${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
+ @${INSTALL_DATA} ${WRKSRC}/doc/MANUAL ${DOCSDIR}
.for i in avmilter_de.pdf avmilter_en.pdf
@${INSTALL_DATA} ${WRKSRC}/doc/${i} ${DOCSDIR}
.endfor
diff --git a/security/antivir-milter/distinfo b/security/antivir-milter/distinfo
index f1611954c401..79d737f6438a 100644
--- a/security/antivir-milter/distinfo
+++ b/security/antivir-milter/distinfo
@@ -1,2 +1,2 @@
-MD5 (avfbmlt.tgz) = eeb9a41331de500494663112261f4886
-SIZE (avfbmlt.tgz) = 2524474
+MD5 (avfbmlt_beta.tgz) = 9838d32c0e5621346e9201f696912dfa
+SIZE (avfbmlt_beta.tgz) = 2530356
diff --git a/security/antivir-milter/files/patch-doc::MANUAL b/security/antivir-milter/files/patch-doc::MANUAL
new file mode 100644
index 000000000000..b1493cebb363
--- /dev/null
+++ b/security/antivir-milter/files/patch-doc::MANUAL
@@ -0,0 +1,112 @@
+--- doc/MANUAL.orig Wed Jan 28 11:48:04 2004
++++ doc/MANUAL Mon Mar 1 01:08:06 2004
+@@ -3,39 +3,39 @@
+
+ To start, stop, restart AntiVir Milter:
+
+- # /usr/sbin/rcavmilter [start|stop|status|restart]
++ # %%PREFIX%%/etc/rc.d/antivir-milter.sh [start|stop|status|restart]
+
+ When executed successfully, a message from AntiVir Milter with
+ the scan engine version and VDF version is present in the log file
+-/var/log/mail, /var/log/maillog or /var/log/mail.log
++/var/log/maillog
+
+
+ 2. Copying the license file
+ ---------------------------
+
+ If you have a license file for commercial or privat user,
+-copy the license file *.key to the folder /usr/lib/AntiVir and
+-set the access rights of user and group to default uucp:
+-
+- # cp hbedv.key /usr/lib/AntiVir/
+- # chown uucp:uucp /usr/lib/AntiVir/avmgate.key
++copy the license file *.key to the folder %%PREFIX%%/AntiVir and
++set the access rights of user root and group smmsp:
+
++ # cp hbedv.key %%PREFIX%%/AntiVir/
++ # chown root:smmsp %%PREFIX%%/AntiVir/hbedv.key
++ # chmod 440 %%PREFIX%%/AntiVir/hbedv.key
+
+ 3. Configuring AntiVir Milter
+ -----------------------------
+
+-AntiVir Milter provides the configuration file /etc/avmilter.conf:
++AntiVir Milter provides the configuration file %%PREFIX%%/etc/avmilter.conf:
+ The following directives are available:
+
+-# User uucp
+-# Group uucp
++# User smmsp
++# Group smmsp
+ # Postmaster postmaster
+ # MyHostName localhost
+ # SpoolDir /var/spool/avmilter
+-# AntiVirDir /usr/lib/AntiVir
++# AntiVirDir %%PREFIX%%/AntiVir
+ # TemporaryDir /var/tmp
+ # MinFreeBlocks 100
+-# ForwardTo /usr/lib/sendmail -oem -oi
++# ForwardTo /usr/sbin/sendmail -oem -oi
+ # MaxNestingLevel 20
+ # MaxAttachments 100
+ # BlockSuspiciousMime NO
+@@ -43,7 +43,7 @@
+ # VirusAlertToRcpt NO
+ # VirusAlertToSender NO
+ # VirusAlertToPostmaster YES
+-# VirusAlertsUser AntiVir
++# VirusAlertsUser MAILER-DAEMON
+ # RejectVirusMail NO
+ # ScanInArchive YES
+ # ArchiveMaxSize 0
+@@ -64,21 +64,21 @@
+ # LogFile NO
+ # MaxRecipientsPerMessage 100
+
+-For a detailed description see /etc/avmilter.conf.
++For a detailed description see %%PREFIX%%/etc/avmilter.conf.
+
+
+ 4. Configuring automatic update
+ -------------------------------
+
+ Add the following line for a daily update at e.g. 0:25 a.m.:
+-25 0 * * * root /usr/lib/AntiVir/antivir --update -q
++25 0 * * * root %%PREFIX%%/sbin/antivirupdater -q
+
+ When using a proxy server, enter name server name and connection
+ in the file antivir.conf.
+
+-The file /etc/antivir.conf contains settable parameters effecting
+-the automatic virus protection updates. The following directives
+-are provided:
++The file %%PREFIX%%/etc/antivir.conf contains settable parameters
++effecting the automatic virus protection updates. The following
++directives are provided:
+
+ # EmailTo root@localhost
+ # LogTo /var/log/antivir.log
+@@ -88,10 +88,10 @@
+ # HTTPProxyPassword password
+ # SyslogFacility user
+ # SyslogPriority notice
+-# GnuPGBinary
++# GnuPGBinary %%PREFIX%%/bin/gpg
+ # GnuPGOptions
+
+-For a detailled description see /etc/avmilter.conf.
++For a detailled description see %%PREFIX%%/etc/avmilter.conf.
+
+
+ 5. Notification Templates
+@@ -101,7 +101,7 @@
+ have the possibility to define your own text in virus and
+ pathological notification mails.
+
+-The directory /usr/lib/AntiVir/templates contains the
++The directory %%PREFIX%%/AntiVir/templates contains the
+ following files:
+
+ patho-administrator
diff --git a/security/antivir-milter/files/patch-etc::antivir.conf b/security/antivir-milter/files/patch-etc::antivir.conf
index 2da8e0068381..aad22f6ca7b7 100644
--- a/security/antivir-milter/files/patch-etc::antivir.conf
+++ b/security/antivir-milter/files/patch-etc::antivir.conf
@@ -1,19 +1,11 @@
--- etc/antivir.conf.orig Mon Dec 8 17:09:11 2003
+++ etc/antivir.conf Mon Dec 8 17:11:16 2003
-@@ -52,7 +52,7 @@
+@@ -36,7 +36,7 @@
# advantage of GnuPG, be aware that all updates will fail
# until the AntiVir public key (antivir.gpg) has been
# added to your keyring and signed.
--#GnuPGBinary /usr/local/bin/gpg
+-#GnuPGBinary
+#GnuPGBinary %%PREFIX%%/bin/gpg
+
# If you are utilizing GnuPG, you may also specify
- # options that your particular setup might need.
-@@ -63,6 +63,7 @@
- # of software which are not viruses but might not be wanted.
- # By default all these tests are turned off. They can be enabled
- # by uncommenting the following keywords.
-+# These options are only available in commercial mode.
- #DetectDialer
- #DetectJoke
- #DetectGame
diff --git a/security/antivir-milter/files/patch-etc::avmilter.conf b/security/antivir-milter/files/patch-etc::avmilter.conf
index 34a6ed35cd2e..341c81fab563 100644
--- a/security/antivir-milter/files/patch-etc::avmilter.conf
+++ b/security/antivir-milter/files/patch-etc::avmilter.conf
@@ -6,8 +6,8 @@
-# User uucp
-# Group uucp
-+User daemon
-+Group daemon
++User smmsp
++Group smmsp
# ------------------------------------------------------------------------
@@ -38,25 +38,24 @@
# ------------------------------------------------------------------------
-@@ -118,7 +118,7 @@
- # ------------------------------------------------------------------------
- # User name of sender of virus alerts, if virus was found in a mail.
-
--# VirusAlertsUser AntiVir
+@@ -121,6 +121,7 @@
+ # VirusAlertsUser AvMilter
+ # or
+ # VirusAlertsUser someone@anywhere.tld
+VirusAlertsUser MAILER-DAEMON
# ------------------------------------------------------------------------
-@@ -169,7 +169,7 @@
+@@ -171,7 +172,7 @@
# If BlockSuspiciousArchive is YES, stop delivery of mails
- # containing archives if MaxRecursionDepthInArchive has been reached.
+ # containing archives if ArchiveMaxRecursion has been reached.
-# BlockSuspiciousArchive NO
+# BlockSuspiciousArchive NO
# ------------------------------------------------------------------------
-@@ -179,7 +179,7 @@
+@@ -181,7 +182,7 @@
# If BlockEncryptedArchive is YES, stop delivery of mails
# containing encrypted files in an archive.
@@ -65,7 +64,7 @@
# ------------------------------------------------------------------------
-@@ -188,7 +188,7 @@
+@@ -189,7 +190,7 @@
# to the header of checked mail. E.g.: "X-AntiVirus: Checked by ..."
# This option is only available in commercial mode.
@@ -74,7 +73,7 @@
# ------------------------------------------------------------------------
-@@ -203,7 +203,7 @@
+@@ -204,7 +205,7 @@
# ScanTimeout specifies the scan time of mail, in seconds, when to stop
# scanning of mails.
diff --git a/security/antivir-milter/files/patch-init::rc.avmilter b/security/antivir-milter/files/patch-init::rc.avmilter
index 92d27def794f..80d874eafe36 100644
--- a/security/antivir-milter/files/patch-init::rc.avmilter
+++ b/security/antivir-milter/files/patch-init::rc.avmilter
@@ -8,10 +8,10 @@
- /usr/sbin/avmilter -p inet:3333@localhost
+ if [ -x %%PREFIX%%/sbin/avmilter ]; then
+ umask 0077
-+ rm -f %%PREFIX%%/AntiVir/avmilter.sock
++ rm -f /var/spool/avmilter/avmilter.sock
+ %%PREFIX%%/sbin/avmilter \
+ -C %%PREFIX%%/etc/avmilter.conf \
-+ -p local:%%PREFIX%%/AntiVir/avmilter.sock
++ -p local:/var/spool/avmilter/avmilter.sock &
+ umask 0022
+ echo -n " antivir-milter"
+ fi
@@ -21,7 +21,7 @@
- killall -TERM /usr/sbin/avmilter
- echo
+ killall -TERM avmilter
-+ rm -f %%PREFIX%%/AntiVir/avmilter.sock
++ rm -f /var/spool/avmilter/avmilter.sock
+ echo -n " antivir-milter"
;;
restart)
diff --git a/security/antivir-milter/pkg-message b/security/antivir-milter/pkg-message
index 00ae9ba7391c..a26af98efd24 100644
--- a/security/antivir-milter/pkg-message
+++ b/security/antivir-milter/pkg-message
@@ -5,7 +5,7 @@ your SENDMAIL_MC:
INPUT_MAIL_FILTER(
`antivir-milter',
- `S=unix:%%PREFIX%%/AntiVir/avmilter.sock, F=T, T=S:10m;R:10m;E:5m'
+ `S=unix:/var/spool/avmilter/avmilter.sock, F=T, T=S:10m;R:10m;E:10m'
)dnl
Don't forget to rebuild sendmail.cf and to restart Sendmail afterwards.
@@ -18,7 +18,7 @@ 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
+chown root:smmsp %%PREFIX%%/AntiVir/hbedv.key
chmod 440 %%PREFIX%%/AntiVir/hbedv.key
A license key for private (individual, non-commercial) use can be applied
diff --git a/security/antivir-milter/pkg-plist b/security/antivir-milter/pkg-plist
index 6602f264f464..8827936f47f0 100644
--- a/security/antivir-milter/pkg-plist
+++ b/security/antivir-milter/pkg-plist
@@ -1,4 +1,3 @@
-@exec install -d -o daemon -g daemon -m 755 %D/AntiVir
@unexec if cmp -s %D/AntiVir/antivir-dist_avfbmlt %D/AntiVir/antivir; then rm -f %D/AntiVir/antivir; fi
AntiVir/antivir-dist_avfbmlt
@exec [ -f %B/antivir ] || cp -p %B/%f %B/antivir
@@ -15,14 +14,17 @@ 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
+@exec install -d -o smmsp -g smmsp -m 700 /var/spool/avmilter
+@exec install -d -o smmsp -g smmsp -m 700 /var/spool/avmilter/incoming
+@exec install -d -o smmsp -g smmsp -m 700 /var/spool/avmilter/outgoing
+@exec install -d -o smmsp -g smmsp -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%%/avmilter.ignore
+%%EXAMPLESDIR%%/avmilter.scan
+%%EXAMPLESDIR%%/avmilter.warn
%%EXAMPLESDIR%%/templates/de/patho-administrator
%%EXAMPLESDIR%%/templates/de/patho-recipient
%%EXAMPLESDIR%%/templates/de/patho-sender
@@ -70,6 +72,7 @@ sbin/avmilter
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
%%PORTDOCS%%%%DOCSDIR%%/LICENSE
%%PORTDOCS%%%%DOCSDIR%%/LICENSE.DE
+%%PORTDOCS%%%%DOCSDIR%%/MANUAL
%%PORTDOCS%%%%DOCSDIR%%/avmilter_de.pdf
%%PORTDOCS%%%%DOCSDIR%%/avmilter_en.pdf
%%PORTDOCS%%%%DOCSDIR%%/antivir.gpg