diff options
author | sem <sem@FreeBSD.org> | 2004-08-12 06:45:57 +0800 |
---|---|---|
committer | sem <sem@FreeBSD.org> | 2004-08-12 06:45:57 +0800 |
commit | 35f7aefa97c0bb73e1417ad280dd15ceffcb71ff (patch) | |
tree | 551c9da53440696a7ea5ef32d18a412950d2640a /security/amavisd-new | |
parent | 5b82b69764a966223532192f77bfeedcf38f07ca (diff) | |
download | freebsd-ports-gnome-35f7aefa97c0bb73e1417ad280dd15ceffcb71ff.tar.gz freebsd-ports-gnome-35f7aefa97c0bb73e1417ad280dd15ceffcb71ff.tar.zst freebsd-ports-gnome-35f7aefa97c0bb73e1417ad280dd15ceffcb71ff.zip |
- Don't pretend we support anything older than perl 5.8.2. Support for
5.00503 was severly broken and amavisd-new author officially only supports
5.8.2 and up. As an added bonus, this simplifies the makefile very much.
- Install a usable amavisd.conf if none exists
- On installation, remove amavisd.conf if it is equal to default one
- On installation, create /var/amavis/tmp, because the new amavisd.conf
uses this directory to store temporary files
- Remove address extension options from the example configuration file.
Neither sendmail nor postfix support address extensions on FreeBSD
by default.
PR: ports/70306
Submitted by: maintainer
Diffstat (limited to 'security/amavisd-new')
-rw-r--r-- | security/amavisd-new/Makefile | 25 | ||||
-rw-r--r-- | security/amavisd-new/files/INSTALL.tmpl | 4 | ||||
-rw-r--r-- | security/amavisd-new/files/MESSAGE.tmpl | 3 | ||||
-rw-r--r-- | security/amavisd-new/files/patch-amavisd.conf | 17 | ||||
-rw-r--r-- | security/amavisd-new/files/perlwarning.tmpl | 10 | ||||
-rw-r--r-- | security/amavisd-new/pkg-plist | 2 |
6 files changed, 30 insertions, 31 deletions
diff --git a/security/amavisd-new/Makefile b/security/amavisd-new/Makefile index 2bb1f009bdb7..018fca239df4 100644 --- a/security/amavisd-new/Makefile +++ b/security/amavisd-new/Makefile @@ -8,6 +8,7 @@ PORTNAME= amavisd-new PORTVERSION= 20040701 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= http://www.ijs.si/software/amavisd/ \ http://mirrors.catpipe.net/amavisd-new/ \ @@ -94,19 +95,11 @@ RUN_DEPENDS+= ${SITE_PERL}/Net/LDAP.pm:${PORTSDIR}/net/p5-perl-ldap .endif pre-build: -.if ${PERL_LEVEL} < 500802 -# add warning to greeting message when running perl older than 5.8.2 - ${SED} -e 's,%%PERLVERSION%%,${PERL_VERSION},g' < ${FILESDIR}/perlwarning.tmpl > ${WRKDIR}/MESSAGE -.endif -.if ${PERL_LEVEL} < 500600 -# remove taint checks when running under perl 5.00503 - ${SED} -e 's,^\#\!/usr/bin/perl -T,\#\!/usr/bin/perl,' < ${WRKSRC}/amavisd > ${WRKDIR}/amavisd -.endif for f in amavisd.sh amavis-milter.sh INSTALL DEINSTALL MESSAGE; do \ - ${SED} ${SED_SCRIPT} < ${FILESDIR}/$${f}.tmpl >> ${WRKDIR}/$${f}; \ + ${SED} ${SED_SCRIPT} < ${FILESDIR}/$${f}.tmpl > ${WRKDIR}/$${f}; \ done for f in amavisd.conf amavisd.conf-sample amavisd; do \ - ${SED} ${SED_SCRIPT} < ${WRKSRC}/$${f} >> ${WRKDIR}/$${f}; \ + ${SED} ${SED_SCRIPT} < ${WRKSRC}/$${f} > ${WRKDIR}/$${f}; \ done pre-install: @@ -120,6 +113,9 @@ do-install: .endif ${INSTALL_SCRIPT} ${WRKDIR}/amavisd ${PREFIX}/sbin ${INSTALL_SCRIPT} ${WRKDIR}/amavisd.conf ${PREFIX}/etc/amavisd.conf-dist +.if !exists(${PREFIX}/etc/amavisd.conf) + ${INSTALL_SCRIPT} ${WRKDIR}/amavisd.conf ${PREFIX}/etc +.endif ${INSTALL_SCRIPT} ${WRKDIR}/amavisd.conf-sample ${PREFIX}/etc/amavisd.conf-sample ${INSTALL_SCRIPT} ${WRKSRC}/amavisd.conf-default ${PREFIX}/etc/amavisd.conf-default ${INSTALL_SCRIPT} ${WRKDIR}/amavisd.sh ${PREFIX}/etc/rc.d @@ -133,13 +129,8 @@ post-install: @${CAT} ${PKGMESSAGE} .endif -.if ${PERL_LEVEL} < 500800 -RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \ - ${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes -.endif - -.if ${PERL_LEVEL} < 500600 -RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/IO/Socket/UNIX.pm:${PORTSDIR}/devel/p5-IO +.if ${PERL_LEVEL} < 500802 +IGNORE= "requires perl 5.8.2 or higher" .endif .include <bsd.port.post.mk> diff --git a/security/amavisd-new/files/INSTALL.tmpl b/security/amavisd-new/files/INSTALL.tmpl index 3219efb5d653..4605bf400aa6 100644 --- a/security/amavisd-new/files/INSTALL.tmpl +++ b/security/amavisd-new/files/INSTALL.tmpl @@ -1,6 +1,6 @@ #!/bin/sh # -# $FreeBSD: /tmp/pcvs/ports/security/amavisd-new/files/Attic/INSTALL.tmpl,v 1.3 2004-07-18 10:05:50 vanilla Exp $ +# $FreeBSD: /tmp/pcvs/ports/security/amavisd-new/files/Attic/INSTALL.tmpl,v 1.4 2004-08-11 22:45:57 sem Exp $ # USER=%%AMAVISUSER%% @@ -43,6 +43,8 @@ if [ "$2" = "PRE-INSTALL" ]; then echo "Created \"${DIR}\" directory." /usr/bin/install -o ${USER} -g ${GROUP} -m 750 -d ${DIR}/db echo "Created \"${DIR}/db\" directory." + /usr/bin/install -o ${USER} -g ${GROUP} -m 750 -d ${DIR}/tmp + echo "Created \"${DIR}/tmp\" directory." /usr/bin/install -o ${USER} -g ${GROUP} -m 750 -d ${QUARANTINE} echo "Created \"${QUARANTINE}\" directory." fi diff --git a/security/amavisd-new/files/MESSAGE.tmpl b/security/amavisd-new/files/MESSAGE.tmpl index 24b1e98c50a3..8900f7083713 100644 --- a/security/amavisd-new/files/MESSAGE.tmpl +++ b/security/amavisd-new/files/MESSAGE.tmpl @@ -20,7 +20,6 @@ Configuration templates are available in %%PREFIX%%/etc as amavisd.conf-dist, amavisd.conf-sample and amavisd.conf-default. - Copy any of them to amavisd.conf and edit the file to suit your - needs. Documentation is available in %%DOCSDIR%%. + Documentation is available in %%DOCSDIR%%. ******************************************************************* diff --git a/security/amavisd-new/files/patch-amavisd.conf b/security/amavisd-new/files/patch-amavisd.conf index d904f5d2c4c2..bf2ceca41384 100644 --- a/security/amavisd-new/files/patch-amavisd.conf +++ b/security/amavisd-new/files/patch-amavisd.conf @@ -1,5 +1,5 @@ --- amavisd.conf.orig Thu Jul 1 22:04:36 2004 -+++ amavisd.conf Sun Jul 4 11:32:17 2004 ++++ amavisd.conf Wed Aug 11 16:23:13 2004 @@ -9,7 +9,7 @@ # MUST BE SET (no useful default): @@ -29,3 +29,18 @@ # $daemon_chroot_dir = $MYHOME; # (default is undef, meaning: do not chroot) $inet_socket_port = 10024; # accept SMTP on this local TCP port(s) (Postfix) +@@ -50,10 +50,10 @@ + $mailfrom_notify_admin = "virusalert\@$mydomain"; + $mailfrom_notify_recip = "virusalert\@$mydomain"; + $mailfrom_notify_spamadmin = "spam.police\@$mydomain"; +-@addr_extension_virus_maps = ('virus'); +-@addr_extension_spam_maps = ('spam'); +-@addr_extension_banned_maps = ('banned'); +-@addr_extension_bad_header_maps = ('badh'); ++#@addr_extension_virus_maps = ('virus'); ++#@addr_extension_spam_maps = ('spam'); ++#@addr_extension_banned_maps = ('banned'); ++#@addr_extension_bad_header_maps = ('badh'); + + $path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin'; + $file = 'file'; # file(1) utility; use 3.41 or later to avoid vulnerability diff --git a/security/amavisd-new/files/perlwarning.tmpl b/security/amavisd-new/files/perlwarning.tmpl deleted file mode 100644 index d33423722b75..000000000000 --- a/security/amavisd-new/files/perlwarning.tmpl +++ /dev/null @@ -1,10 +0,0 @@ - -******************************************************************* - WARNING: You appear to be running perl version %%PERLVERSION%%. - - amavisd-new has been tested and is guaranteed to run only with - perl 5.8.2 and above. There are numerous problems with amavisd-new - when running under previous perl versions, including perl crashes, - taint bugs and others. You are strongly advised to upgrade your - perl by using the /usr/ports/lang/perl5.8 port. -******************************************************************* diff --git a/security/amavisd-new/pkg-plist b/security/amavisd-new/pkg-plist index 840f22d83abe..19e9e8695b03 100644 --- a/security/amavisd-new/pkg-plist +++ b/security/amavisd-new/pkg-plist @@ -23,7 +23,9 @@ %%PORTDOCS%%%%DOCSDIR%%/RELEASE_NOTES %%PORTDOCS%%@dirrm %%DOCSDIR%% etc/amavisd.conf-default +@unexec if cmp -s %D/etc/amavisd.conf %D/etc/amavisd.conf-dist; then rm -f %D/etc/amavisd.conf; fi etc/amavisd.conf-dist +@exec [ ! -f %B/amavisd.conf ] && cp %B/%f %B/amavisd.conf etc/amavisd.conf-sample %%AMAVIS_NOMILTER%%etc/rc.d/amavis-milter.sh etc/rc.d/amavisd.sh |