diff options
author | Dmitry Sivachenko <demon@FreeBSD.org> | 2003-01-04 07:20:30 +0000 |
---|---|---|
committer | Dmitry Sivachenko <demon@FreeBSD.org> | 2003-01-04 07:20:30 +0000 |
commit | 193ec559290f7a0488bb286f64c525aa72bdceb3 (patch) | |
tree | a485c46e882afa1348cccc0b400c41062317a2a2 /security/amavisd-new | |
parent | Update to version 1.12. (diff) |
Update to version 20021227.p1.
Pass maintainership to submitter (approved by former maintainer).
Submitted by: Blaz Zupan <blaz@si.FreeBSD.org>
Notes
Notes:
svn path=/head/; revision=72489
Diffstat (limited to 'security/amavisd-new')
-rw-r--r-- | security/amavisd-new/Makefile | 132 | ||||
-rw-r--r-- | security/amavisd-new/distinfo | 2 | ||||
-rw-r--r-- | security/amavisd-new/files/DEINSTALL.tmpl | 62 | ||||
-rw-r--r-- | security/amavisd-new/files/INSTALL.tmpl | 92 | ||||
-rw-r--r-- | security/amavisd-new/files/MESSAGE.tmpl | 30 | ||||
-rw-r--r-- | security/amavisd-new/files/amavisd-milter.sh | 31 | ||||
-rw-r--r-- | security/amavisd-new/files/amavisd.sh | 28 | ||||
-rw-r--r-- | security/amavisd-new/files/amavisd.sh.tmpl | 74 | ||||
-rw-r--r-- | security/amavisd-new/files/patch-amavisd.conf | 70 | ||||
-rw-r--r-- | security/amavisd-new/pkg-install | 39 | ||||
-rw-r--r-- | security/amavisd-new/pkg-plist | 23 | ||||
-rw-r--r-- | security/amavisd-new/pkg-plist.milter | 18 |
12 files changed, 405 insertions, 196 deletions
diff --git a/security/amavisd-new/Makefile b/security/amavisd-new/Makefile index 9c45699ddae7..d6ec8f15b92a 100644 --- a/security/amavisd-new/Makefile +++ b/security/amavisd-new/Makefile @@ -7,94 +7,88 @@ # Based on amavisd ports makefile. PORTNAME= amavisd-new -PORTVERSION= 20020517 +PORTVERSION= 20021227.p1 CATEGORIES= security MASTER_SITES= http://www.ijs.si/software/amavisd/ -DISTNAME= ${PORTNAME}-${PORTVERSION} +DISTNAME= ${PORTNAME}-${PORTVERSION:S/.p/-p/} -MAINTAINER= ckd-freebsd@ckdhr.com +MAINTAINER= blaz@si.FreeBSD.org -BUILD_DEPENDS= ${LOCALBASE}/bin/arc:${PORTSDIR}/archivers/arc \ - ${LOCALBASE}/bin/lha:${PORTSDIR}/archivers/lha \ - ${LOCALBASE}/bin/unarj:${PORTSDIR}/archivers/unarj \ - ${LOCALBASE}/bin/unrar:${PORTSDIR}/archivers/unrar \ - ${LOCALBASE}/bin/zoo:${PORTSDIR}/archivers/zoo \ - ${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \ - ${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \ - ${SITE_PERL}/${PERL_ARCH}/Compress/Zlib.pm:${PORTSDIR}/archivers/p5-Compress-Zlib \ - ${SITE_PERL}/${PERL_ARCH}/Convert/UUlib.pm:${PORTSDIR}/converters/p5-Convert-UUlib \ - ${SITE_PERL}/${PERL_ARCH}/IO/Socket/UNIX.pm:${PORTSDIR}/devel/p5-IO \ - ${SITE_PERL}/${PERL_ARCH}/MIME/Base64.pm:${PORTSDIR}/converters/p5-MIME-Base64 \ +RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \ ${SITE_PERL}/${PERL_ARCH}/Unix/Syslog.pm:${PORTSDIR}/sysutils/p5-Unix-Syslog \ + ${SITE_PERL}/MIME/Words.pm:${PORTSDIR}/mail/p5-MIME-Tools \ + ${SITE_PERL}/Convert/TNEF.pm:${PORTSDIR}/converters/p5-Convert-TNEF \ + ${SITE_PERL}/${PERL_ARCH}/Convert/UUlib.pm:${PORTSDIR}/converters/p5-Convert-UUlib \ + ${SITE_PERL}/${PERL_ARCH}/Compress/Zlib.pm:${PORTSDIR}/archivers/p5-Compress-Zlib \ ${SITE_PERL}/Archive/Tar.pm:${PORTSDIR}/archivers/p5-Archive-Tar \ ${SITE_PERL}/Archive/Zip.pm:${PORTSDIR}/archivers/p5-Archive-Zip \ - ${SITE_PERL}/Convert/TNEF.pm:${PORTSDIR}/converters/p5-Convert-TNEF \ - ${SITE_PERL}/IO/AtomicFile.pm:${PORTSDIR}/devel/p5-IO-stringy \ - ${SITE_PERL}/MIME/Body.pm:${PORTSDIR}/mail/p5-MIME-Tools \ - ${SITE_PERL}/Mail/Address.pm:${PORTSDIR}/mail/p5-Mail-Tools \ - ${SITE_PERL}/Net/SMTP.pm:${PORTSDIR}/net/p5-Net \ - ${SITE_PERL}/Net/Server.pm:${PORTSDIR}/net/p5-Net-Server + ${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \ + ${SITE_PERL}/Net/Server.pm:${PORTSDIR}/net/p5-Net-Server \ + ${SITE_PERL}/Mail/SpamAssassin.pm:${PORTSDIR}/mail/p5-Mail-SpamAssassin \ + ${LOCALBASE}/bin/arc:${PORTSDIR}/archivers/arc \ + ${LOCALBASE}/bin/lha:${PORTSDIR}/archivers/lha \ + ${LOCALBASE}/bin/unarj:${PORTSDIR}/archivers/unarj \ + ${LOCALBASE}/bin/unrar:${PORTSDIR}/archivers/unrar \ + ${LOCALBASE}/bin/zoo:${PORTSDIR}/archivers/zoo -RUN_DEPENDS= ${BUILD_DEPENDS} +SITE_PERL= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER} -GNU_CONFIGURE= yes +USE_PERL5_RUN= yes + +PKGINSTALL= ${WRKDIR}/INSTALL +PKGDEINSTALL= ${WRKDIR}/DEINSTALL +PKGMESSAGE= ${WRKDIR}/MESSAGE -SITE_PERL= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER} AMAVISUSER?= vscan AMAVISGROUP?= vscan +AMAVISDIR?= /var/amavis +AMAVISQUARANTINE?= /var/virusmails -CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc --with-amavisuser=${AMAVISUSER}:${AMAVISGROUP} - -STARTSCRIPT= amavisd.sh - -.if defined(WITH_POSTFIX) -CONFIGURE_ARGS+= --enable-postfix -MTA?= postfix -RUN_DEPENDS+= ${LOCALBASE}/libexec/postfix/smtpd:${PORTSDIR}/mail/postfix -.elif defined(WITH_POSTFIX_CURRENT) -CONFIGURE_ARGS+= --enable-postfix -MTA?= postfix -RUN_DEPENDS+= ${LOCALBASE}/libexec/postfix/smtpd:${PORTSDIR}/mail/postfix-current -.elif defined(WITH_MILTER) -CONFIGURE_ARGS+= --enable-milter -MTA?= milter -PLIST= ${PKGDIR}/pkg-plist.milter -STARTSCRIPT= amavisd-milter.sh -.else -CONFIGURE_ARGS+= --enable-sendmail -MTA?= sendmail -.endif - -.if defined(WITH_SPAMASSASSIN) -BUILD_DEPENDS+= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Mail/SpamAssassin.pm:${PORTSDIR}/mail/p5-Mail-SpamAssassin \ - ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Net/DNS.pm:${PORTSDIR}/net/p5-Net-DNS \ - ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Razor/Client.pm:${PORTSDIR}/mail/razor-agents - -pre-configure: - ${CP} ${WRKSRC}/amavis/amavisd.in.all ${WRKSRC}/amavis/amavisd.in -.endif - -# you must define this if you have no scanners (example: to use amavisd-new only as a SpamAssassin/Razor filter) -.if defined(WITH_ALL_SCANNERS) -CONFIGURE_ARGS+= --enable-all -.endif - -post-patch: - @${SED} 's,%%AMAVISUSER%%,${AMAVISUSER},g' ${FILESDIR}/${STARTSCRIPT} > ${WRKSRC}/${STARTSCRIPT} +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:C/\.p.+//} +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --with-user=${AMAVISUSER} --with-runtime-dir=${AMAVISDIR} +CONFIGURE_WRKSRC= ${WRKSRC}/helper-progs +BUILD_WRKSRC= ${WRKSRC}/helper-progs + +pre-build: + for file in amavisd.sh INSTALL DEINSTALL MESSAGE; do \ + ${SED} -e 's,%%AMAVISUSER%%,${AMAVISUSER},g' \ + -e 's,%%AMAVISGROUP%%,${AMAVISGROUP},g' \ + -e 's,%%AMAVISDIR%%,${AMAVISDIR},g' \ + -e 's,%%AMAVISQUARANTINE%%,${AMAVISQUARANTINE},g' \ + -e 's,%%DOCSDIR%%,${DOCSDIR},g' \ + -e 's,%%PREFIX%%,${PREFIX},g' \ + < ${FILESDIR}/$${file}.tmpl > ${WRKDIR}/$${file}; \ + done + ${SED} -e 's,%%AMAVISUSER%%,${AMAVISUSER},g' \ + -e 's,%%AMAVISGROUP%%,${AMAVISGROUP},g' \ + -e 's,%%AMAVISDIR%%,${AMAVISDIR},g' \ + -e 's,%%AMAVISQUARANTINE%%,${AMAVISQUARANTINE},g' \ + < ${WRKSRC}/amavisd.conf > ${WRKDIR}/amavisd.conf pre-install: - @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${AMAVISUSER} ${AMAVISGROUP} - -post-install: - ${INSTALL_SCRIPT} ${WRKSRC}/${STARTSCRIPT} ${PREFIX}/etc/rc.d + @${SH} ${PKGINSTALL} ${DISTNAME} PRE-INSTALL + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/helper-progs/amavis ${PREFIX}/sbin + ${INSTALL_PROGRAM} ${WRKSRC}/helper-progs/amavis-milter ${PREFIX}/sbin + ${INSTALL_SCRIPT} ${WRKSRC}/amavisd ${PREFIX}/sbin + ${INSTALL_SCRIPT} ${WRKDIR}/amavisd.conf ${PREFIX}/etc/amavisd.conf-dist + ${INSTALL_SCRIPT} ${WRKDIR}/amavisd.sh ${PREFIX}/etc/rc.d .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} -.for FILE in FAQ INSTALL README README.exim README.milter README.postfix README.qmail README.scanners README.sendmail doc/amavis.html doc/amavis.m4 doc/amavis.png doc/amavis.txt +.for FILE in AAAREADME.first INSTALL LICENSE \ + README_FILES/README.customize README_FILES/README.exim_v3 \ + README_FILES/README.exim_v4 README_FILES/README.exim_v4_app \ + README_FILES/README.lookups README_FILES/README.milter \ + README_FILES/README.old README_FILES/README.old.scanners \ + README_FILES/README.performance README_FILES/README.postfix \ + README_FILES/README.sendmail RELEASE_NOTES ${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR} .endfor - @${ECHO} "===============================================================================" - @${ECHO} "Please read ${DOCSDIR}/README.${MTA}" - @${ECHO} "===============================================================================" + +post-install: + @${CAT} ${PKGMESSAGE} .endif .include <bsd.port.mk> diff --git a/security/amavisd-new/distinfo b/security/amavisd-new/distinfo index f861c60cc0bc..68ec0474898b 100644 --- a/security/amavisd-new/distinfo +++ b/security/amavisd-new/distinfo @@ -1 +1 @@ -MD5 (amavisd-new-20020517.tar.gz) = b13a90e401884ac125b098d36b8d170a +MD5 (amavisd-new-20021227-p1.tar.gz) = abc443e113911a154d0f7e8c8e62e355 diff --git a/security/amavisd-new/files/DEINSTALL.tmpl b/security/amavisd-new/files/DEINSTALL.tmpl new file mode 100644 index 000000000000..ab47a8059013 --- /dev/null +++ b/security/amavisd-new/files/DEINSTALL.tmpl @@ -0,0 +1,62 @@ +#!/bin/sh +# +# $FreeBSD: /tmp/pcvs/ports/security/amavisd-new/files/Attic/DEINSTALL.tmpl,v 1.1 2003-01-04 07:20:30 demon Exp $ +# + +USER=%%AMAVISUSER%% +GROUP=%%AMAVISGROUP%% +DIR=%%AMAVISDIR%% +QUARANTINE=%%AMAVISQUARANTINE%% + +if [ "$2" = "POST-DEINSTALL" ]; then + + if /usr/sbin/pw group show "${GROUP}" 2>&1 >/dev/null; then + /usr/sbin/pw groupdel ${GROUP} + echo "Deleted group \"${GROUP}\"." + fi + + if /usr/sbin/pw user show "${USER}" 2>&1 >/dev/null; then + /usr/sbin/pw userdel ${USER} + echo "Deleted user \"${USER}\"." + fi + + if [ -e ${DIR} ]; then + /bin/rm -rf ${DIR} + echo "Deleted \"${DIR}\" directory." + fi + + if [ -e ${QUARANTINE} ]; then + echo "You should manually remove the \"${QUARANTINE}\" directory." + fi +fi +#!/bin/sh +# +# $FreeBSD: /tmp/pcvs/ports/security/amavisd-new/files/Attic/DEINSTALL.tmpl,v 1.1 2003-01-04 07:20:30 demon Exp $ +# + +USER=%%AMAVISUSER%% +GROUP=%%AMAVISGROUP%% +DIR=%%AMAVISDIR%% +QUARANTINE=%%AMAVISQUARANTINE%% + +if [ "$2" = "POST-DEINSTALL" ]; then + + if /usr/sbin/pw group show "${GROUP}" 2>&1 >/dev/null; then + /usr/sbin/pw groupdel ${GROUP} + echo "Deleted group \"${GROUP}\"." + fi + + if /usr/sbin/pw user show "${USER}" 2>&1 >/dev/null; then + /usr/sbin/pw userdel ${USER} + echo "Deleted user \"${USER}\"." + fi + + if [ -e ${DIR} ]; then + /bin/rm -rf ${DIR} + echo "Deleted \"${DIR}\" directory." + fi + + if [ -e ${QUARANTINE} ]; then + echo "You should manually remove the \"${QUARANTINE}\" directory." + fi +fi diff --git a/security/amavisd-new/files/INSTALL.tmpl b/security/amavisd-new/files/INSTALL.tmpl new file mode 100644 index 000000000000..7f8bf5b8edbc --- /dev/null +++ b/security/amavisd-new/files/INSTALL.tmpl @@ -0,0 +1,92 @@ +#!/bin/sh +# +# $FreeBSD: /tmp/pcvs/ports/security/amavisd-new/files/Attic/INSTALL.tmpl,v 1.1 2003-01-04 07:20:30 demon Exp $ +# + +USER=%%AMAVISUSER%% +GROUP=%%AMAVISGROUP%% +DIR=%%AMAVISDIR%% +QUARANTINE=%%AMAVISQUARANTINE%% + +if [ "$2" = "PRE-INSTALL" ]; then + + if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then + echo "You already have a group \"${GROUP}\", so I will use it." + else + if /usr/sbin/pw groupadd ${GROUP} -h - + then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + echo "Please create it, and try again." + exit 1 + fi + fi + + if /usr/sbin/pw user show "${USER}" 2>/dev/null; then + echo "You already have a user \"${USER}\", so I will use it." + else + if /usr/sbin/pw useradd ${USER} -g ${GROUP} -h - \ + -d ${DIR} \ + -s /bin/sh \ + -c "Scanning Virus Account" + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + echo "Please create it, and try again." + exit 1 + fi + fi + + /usr/bin/install -o ${USER} -g ${GROUP} -m 750 -d ${DIR} + echo "Created \"${DIR}\" directory." + /usr/bin/install -o ${USER} -g ${GROUP} -m 750 -d ${QUARANTINE} + echo "Created \"${QUARANTINE}\" directory." +fi +#!/bin/sh +# +# $FreeBSD: /tmp/pcvs/ports/security/amavisd-new/files/Attic/INSTALL.tmpl,v 1.1 2003-01-04 07:20:30 demon Exp $ +# + +USER=%%AMAVISUSER%% +GROUP=%%AMAVISGROUP%% +DIR=%%AMAVISDIR%% +QUARANTINE=%%AMAVISQUARANTINE%% + +if [ "$2" = "PRE-INSTALL" ]; then + + if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then + echo "You already have a group \"${GROUP}\", so I will use it." + else + if /usr/sbin/pw groupadd ${GROUP} -h - + then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + echo "Please create it, and try again." + exit 1 + fi + fi + + if /usr/sbin/pw user show "${USER}" 2>/dev/null; then + echo "You already have a user \"${USER}\", so I will use it." + else + if /usr/sbin/pw useradd ${USER} -g ${GROUP} -h - \ + -d ${DIR} \ + -s /bin/sh \ + -c "Scanning Virus Account" + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + echo "Please create it, and try again." + exit 1 + fi + fi + + /usr/bin/install -o ${USER} -g ${GROUP} -m 750 -d ${DIR} + echo "Created \"${DIR}\" 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 new file mode 100644 index 000000000000..0082cf726f01 --- /dev/null +++ b/security/amavisd-new/files/MESSAGE.tmpl @@ -0,0 +1,30 @@ + +******************************************************************* + To use amavisd-new, you need to install at least one virus scanner. + For example McAfee VirusScan is available as a FreeBSD port + in /usr/ports/security/vscan. If you want to use the amavis sendmail + milter interface, you need to type the following command: + + touch %%AMAVISDIR%%/use.milter + + A configuration template is available in %%PREFIX%%/etc + as amavisd.conf-dist. Copy it to amavisd.conf and edit it to + suit your needs. Documentation is available in + %%DOCSDIR%%. +******************************************************************* + + +******************************************************************* + To use amavisd-new, you need to install at least one virus scanner. + For example McAfee VirusScan is available as a FreeBSD port + in /usr/ports/security/vscan. If you want to use the amavis sendmail + milter interface, you need to type the following command: + + touch %%AMAVISDIR%%/use.milter + + A configuration template is available in %%PREFIX%%/etc + as amavisd.conf-dist. Copy it to amavisd.conf and edit it to + suit your needs. Documentation is available in + %%DOCSDIR%%. +******************************************************************* + diff --git a/security/amavisd-new/files/amavisd-milter.sh b/security/amavisd-new/files/amavisd-milter.sh deleted file mode 100644 index eaefe61b9988..000000000000 --- a/security/amavisd-new/files/amavisd-milter.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then - echo "$0: Cannot determine the PREFIX" >&2 - exit 1 -fi - -case "$1" in -start) - ( [ -x ${PREFIX}/sbin/amavisd ] || [ -x ${PREFIX}/sbin/amavis-milter ] ) || exit 1 - AMAVISD=$(/bin/ps -xU %%AMAVISUSER%% | grep amavisd | awk '{ print $1 }') - AMAVIS_MILTER=$(/bin/ps -xU %%AMAVISUSER%% | grep amavis-milter | awk '{ print $1 }') - ( /bin/test "$AMAVISD" || /bin/test "$AMAVIS_MILTER" ) && \ - su - %%AMAVISUSER%% -c "/bin/kill $AMAVISD $AMAVIS_MILTER" > /dev/null - rm -rf /var/amavis/amavis*.sock - su - %%AMAVISUSER%% -c "${PREFIX}/sbin/amavis-milter -D -p /var/amavis/amavis-milter.sock" > /dev/null - su - %%AMAVISUSER%% -c ${PREFIX}/sbin/amavisd > /dev/null 2>&1 && echo -n ' amavisd-milter' - ;; -stop) - ( [ -x ${PREFIX}/sbin/amavisd ] || [ -x ${PREFIX}/sbin/amavis-milter ] ) || exit 1 - AMAVISD=$(/bin/ps -xU %%AMAVISUSER%% | grep amavisd | awk '{ print $1 }') - AMAVIS_MILTER=$(/bin/ps -xU %%AMAVISUSER%% | grep amavis-milter | awk '{ print $1 }') - ( /bin/test "$AMAVISD" || /bin/test "$AMAVIS_MILTER" ) && \ - su - %%AMAVISUSER%% -c "/bin/kill $AMAVISD $AMAVIS_MILTER" > /dev/null && echo -n ' amavisd-milter' - ;; -*) - echo "Usage: `basename $0` {start|stop}" >&2 - ;; -esac - -exit 0 diff --git a/security/amavisd-new/files/amavisd.sh b/security/amavisd-new/files/amavisd.sh deleted file mode 100644 index 1a9bbe947d38..000000000000 --- a/security/amavisd-new/files/amavisd.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then - echo "$0: Cannot determine the PREFIX" >&2 - exit 1 -fi - -case "$1" in -start) - ( [ -x ${PREFIX}/sbin/amavisd ] || [ -x ${PREFIX}/sbin/amavis-milter ] ) || exit 1 - AMAVISD=$(/bin/ps -xU %%AMAVISUSER%% | grep amavisd | awk '{ print $1 }') - ( /bin/test "$AMAVISD" ) && \ - su - %%AMAVISUSER%% -c "/bin/kill $AMAVISD" > /dev/null - rm -rf /var/amavis/amavis*.sock - su - %%AMAVISUSER%% -c ${PREFIX}/sbin/amavisd > /dev/null 2>&1 && echo -n ' amavisd' - ;; -stop) - ( [ -x ${PREFIX}/sbin/amavisd ] || [ -x ${PREFIX}/sbin/amavis-milter ] ) || exit 1 - AMAVISD=$(/bin/ps -xU %%AMAVISUSER%% | grep amavisd | awk '{ print $1 }') - ( /bin/test "$AMAVISD") && \ - su - %%AMAVISUSER%% -c "/bin/kill $AMAVISD" > /dev/null && echo -n ' amavisd' - ;; -*) - echo "Usage: `basename $0` {start|stop}" >&2 - ;; -esac - -exit 0 diff --git a/security/amavisd-new/files/amavisd.sh.tmpl b/security/amavisd-new/files/amavisd.sh.tmpl new file mode 100644 index 000000000000..21d13f537961 --- /dev/null +++ b/security/amavisd-new/files/amavisd.sh.tmpl @@ -0,0 +1,74 @@ +#!/bin/sh + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 +fi + +DIR=%%AMAVISDIR%% +PIDFILE=$DIR/amavisd.pid +CONFIGFILE=${PREFIX}/etc/amavisd.conf +SOCKFILES=$DIR/amavis*.sock +MILTERFLAG=$DIR/use.milter + +case "$1" in +start) + if [ -e ${PREFIX}/etc/amavisd.conf ]; then + rm -rf ${SOCKFILES} + if [ -e $MILTERFLAG ]; then + su %%AMAVISUSER%% -c "${PREFIX}/sbin/amavis-milter -D -p $DIR/amavis-milter.sock" + fi + su %%AMAVISUSER%% -c "${PREFIX}/sbin/amavisd -c ${CONFIGFILE} > /dev/null 2>&1" && echo -n ' amavisd' + fi + ;; +stop) + if [ -e $MILTERFLAG ]; then + killall -u %%AMAVISUSER%% amavis-milter >/dev/null 2>&1 + fi + if [ -e $PIDFILE ]; then + su %%AMAVISUSER%% -c "kill `cat $PIDFILE`" && echo -n ' amavisd' + fi + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + ;; +esac + +exit 0 +#!/bin/sh + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 +fi + +DIR=%%AMAVISDIR%% +PIDFILE=$DIR/amavisd.pid +CONFIGFILE=${PREFIX}/etc/amavisd.conf +SOCKFILES=$DIR/amavis*.sock +MILTERFLAG=$DIR/use.milter + +case "$1" in +start) + if [ -e ${PREFIX}/etc/amavisd.conf ]; then + rm -rf ${SOCKFILES} + if [ -e $MILTERFLAG ]; then + su %%AMAVISUSER%% -c "${PREFIX}/sbin/amavis-milter -D -p $DIR/amavis-milter.sock" + fi + su %%AMAVISUSER%% -c "${PREFIX}/sbin/amavisd -c ${CONFIGFILE} > /dev/null 2>&1" && echo -n ' amavisd' + fi + ;; +stop) + if [ -e $MILTERFLAG ]; then + killall -u %%AMAVISUSER%% amavis-milter >/dev/null 2>&1 + fi + if [ -e $PIDFILE ]; then + su %%AMAVISUSER%% -c "kill `cat $PIDFILE`" && echo -n ' amavisd' + fi + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + ;; +esac + +exit 0 diff --git a/security/amavisd-new/files/patch-amavisd.conf b/security/amavisd-new/files/patch-amavisd.conf new file mode 100644 index 000000000000..dfe969ab8dea --- /dev/null +++ b/security/amavisd-new/files/patch-amavisd.conf @@ -0,0 +1,70 @@ +--- amavisd.conf.orig Fri Dec 27 16:04:17 2002 ++++ amavisd.conf Fri Jan 3 22:29:45 2003 +@@ -36,11 +36,11 @@ + # + + # Set the user and group to which the daemon will change when started as root: +-$daemon_user = 'amavis'; # (no default; customary: vscan or amavis) +-$daemon_group = 'amavis'; # (no default) ++$daemon_user = '%%AMAVISUSER%%'; # (no default; customary: vscan or amavis) ++$daemon_group = '%%AMAVISGROUP%%'; # (no default) + + # Runtime directory (no trailing slash, defaults to '/var/amavis') +-$TEMPBASE = '/var/amavis'; ++$TEMPBASE = '%%AMAVISDIR%%'; + + + # MTA SETTINGS, UNCOMMENT AS APPROPRIATE, defaults to 'smtp:127.0.0.1:10025' +@@ -309,7 +309,7 @@ + # or a directory (no trailing slash) + # (the default value is undef, meaning no quarantine) + # +-$QUARANTINEDIR = '/var/virusmails'; ++$QUARANTINEDIR = '%%AMAVISQUARANTINE%%'; + + + # A finer control of quarantining is available through variable +@@ -638,7 +638,7 @@ + # a hash lookup table can be read from a file, + # one address per line, comments and empty lines are permitted: + # +-read_hash(\%whitelist_sender, '/var/amavis/whitelist_sender'); ++#read_hash(\%whitelist_sender, '/var/amavis/whitelist_sender'); + + # ... or set directly: + map { $whitelist_sender{lc($_)}=1 } (qw( +--- amavisd.conf.orig Fri Dec 27 16:04:17 2002 ++++ amavisd.conf Fri Jan 3 22:29:45 2003 +@@ -36,11 +36,11 @@ + # + + # Set the user and group to which the daemon will change when started as root: +-$daemon_user = 'amavis'; # (no default; customary: vscan or amavis) +-$daemon_group = 'amavis'; # (no default) ++$daemon_user = '%%AMAVISUSER%%'; # (no default; customary: vscan or amavis) ++$daemon_group = '%%AMAVISGROUP%%'; # (no default) + + # Runtime directory (no trailing slash, defaults to '/var/amavis') +-$TEMPBASE = '/var/amavis'; ++$TEMPBASE = '%%AMAVISDIR%%'; + + + # MTA SETTINGS, UNCOMMENT AS APPROPRIATE, defaults to 'smtp:127.0.0.1:10025' +@@ -309,7 +309,7 @@ + # or a directory (no trailing slash) + # (the default value is undef, meaning no quarantine) + # +-$QUARANTINEDIR = '/var/virusmails'; ++$QUARANTINEDIR = '%%AMAVISQUARANTINE%%'; + + + # A finer control of quarantining is available through variable +@@ -638,7 +638,7 @@ + # a hash lookup table can be read from a file, + # one address per line, comments and empty lines are permitted: + # +-read_hash(\%whitelist_sender, '/var/amavis/whitelist_sender'); ++#read_hash(\%whitelist_sender, '/var/amavis/whitelist_sender'); + + # ... or set directly: + map { $whitelist_sender{lc($_)}=1 } (qw( diff --git a/security/amavisd-new/pkg-install b/security/amavisd-new/pkg-install deleted file mode 100644 index c35d566ffad0..000000000000 --- a/security/amavisd-new/pkg-install +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -PKG_PREFIX=${PKG_PREFIX:=/usr/local} -BATCH=${BATCH:=no} - -USER=$1 -GROUP=$2 - -if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then - echo "You already have a group \"${GROUP}\", so I will use it." -else - if /usr/sbin/pw groupadd ${GROUP} -h - - then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - echo "Please create it, and try again." - exit 1 - fi -fi - -if /usr/sbin/pw user show "${USER}" 2>/dev/null; then - echo "You already have a user \"${USER}\", so I will use it." -else - if /usr/sbin/pw useradd ${USER} -g ${GROUP} -h - \ - -d /var/amavis \ - -s /bin/sh \ - -c "Scanning Virus Account" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - echo "Please create it, and try again." - exit 1 - fi -fi diff --git a/security/amavisd-new/pkg-plist b/security/amavisd-new/pkg-plist index 11d6ae3d9479..01408742d285 100644 --- a/security/amavisd-new/pkg-plist +++ b/security/amavisd-new/pkg-plist @@ -1,18 +1,21 @@ -%%PORTDOCS%%share/doc/amavisd-new/FAQ +%%PORTDOCS%%share/doc/amavisd-new/AAAREADME.first %%PORTDOCS%%share/doc/amavisd-new/INSTALL -%%PORTDOCS%%share/doc/amavisd-new/README -%%PORTDOCS%%share/doc/amavisd-new/README.exim +%%PORTDOCS%%share/doc/amavisd-new/LICENSE +%%PORTDOCS%%share/doc/amavisd-new/README.customize +%%PORTDOCS%%share/doc/amavisd-new/README.exim_v3 +%%PORTDOCS%%share/doc/amavisd-new/README.exim_v4 +%%PORTDOCS%%share/doc/amavisd-new/README.exim_v4_app +%%PORTDOCS%%share/doc/amavisd-new/README.lookups %%PORTDOCS%%share/doc/amavisd-new/README.milter +%%PORTDOCS%%share/doc/amavisd-new/README.old +%%PORTDOCS%%share/doc/amavisd-new/README.old.scanners +%%PORTDOCS%%share/doc/amavisd-new/README.performance %%PORTDOCS%%share/doc/amavisd-new/README.postfix -%%PORTDOCS%%share/doc/amavisd-new/README.qmail -%%PORTDOCS%%share/doc/amavisd-new/README.scanners %%PORTDOCS%%share/doc/amavisd-new/README.sendmail -%%PORTDOCS%%share/doc/amavisd-new/amavis.html -%%PORTDOCS%%share/doc/amavisd-new/amavis.m4 -%%PORTDOCS%%share/doc/amavisd-new/amavis.png -%%PORTDOCS%%share/doc/amavisd-new/amavis.txt +%%PORTDOCS%%share/doc/amavisd-new/RELEASE_NOTES %%PORTDOCS%%@dirrm share/doc/amavisd-new -etc/amavisd.conf +etc/amavisd.conf-dist etc/rc.d/amavisd.sh sbin/amavis +sbin/amavis-milter sbin/amavisd diff --git a/security/amavisd-new/pkg-plist.milter b/security/amavisd-new/pkg-plist.milter deleted file mode 100644 index 660bd46b095d..000000000000 --- a/security/amavisd-new/pkg-plist.milter +++ /dev/null @@ -1,18 +0,0 @@ -%%PORTDOCS%%share/doc/amavisd-new/FAQ -%%PORTDOCS%%share/doc/amavisd-new/INSTALL -%%PORTDOCS%%share/doc/amavisd-new/README -%%PORTDOCS%%share/doc/amavisd-new/README.exim -%%PORTDOCS%%share/doc/amavisd-new/README.milter -%%PORTDOCS%%share/doc/amavisd-new/README.postfix -%%PORTDOCS%%share/doc/amavisd-new/README.qmail -%%PORTDOCS%%share/doc/amavisd-new/README.scanners -%%PORTDOCS%%share/doc/amavisd-new/README.sendmail -%%PORTDOCS%%share/doc/amavisd-new/amavis.html -%%PORTDOCS%%share/doc/amavisd-new/amavis.m4 -%%PORTDOCS%%share/doc/amavisd-new/amavis.png -%%PORTDOCS%%share/doc/amavisd-new/amavis.txt -%%PORTDOCS%%@dirrm share/doc/amavisd-new -etc/amavisd.conf -etc/rc.d/amavisd-milter.sh -sbin/amavis-milter -sbin/amavisd |