aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authortobez <tobez@FreeBSD.org>2002-06-13 22:46:25 +0800
committertobez <tobez@FreeBSD.org>2002-06-13 22:46:25 +0800
commite7a22ab1f0b96e253bd83cc25fe8fafb40fe7ce1 (patch)
treee3e849ffa5c1a17963c6c4ee7831fa6c5aa84c1b /security
parent2d1bc8c96d2814d8681856f1db2465b430da3d86 (diff)
downloadfreebsd-ports-gnome-e7a22ab1f0b96e253bd83cc25fe8fafb40fe7ce1.tar.gz
freebsd-ports-gnome-e7a22ab1f0b96e253bd83cc25fe8fafb40fe7ce1.tar.zst
freebsd-ports-gnome-e7a22ab1f0b96e253bd83cc25fe8fafb40fe7ce1.zip
Add amavisd-new, performance-enhanced daemonized version of amavis-perl.
PR: 38934 Submitted by: Christopher K Davis (ckd-freebsd@ckdhr.com)
Diffstat (limited to 'security')
-rw-r--r--security/Makefile1
-rw-r--r--security/amavisd-new/Makefile100
-rw-r--r--security/amavisd-new/distinfo1
-rw-r--r--security/amavisd-new/files/amavisd-milter.sh31
-rw-r--r--security/amavisd-new/files/amavisd.sh28
-rw-r--r--security/amavisd-new/pkg-comment1
-rw-r--r--security/amavisd-new/pkg-descr9
-rw-r--r--security/amavisd-new/pkg-install39
-rw-r--r--security/amavisd-new/pkg-plist18
-rw-r--r--security/amavisd-new/pkg-plist.milter18
10 files changed, 246 insertions, 0 deletions
diff --git a/security/Makefile b/security/Makefile
index 989dfdc32b16..de15c1d380aa 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -8,6 +8,7 @@
SUBDIR += altivore
SUBDIR += amavis-perl
SUBDIR += amavisd
+ SUBDIR += amavisd-new
SUBDIR += apg
SUBDIR += arirang
SUBDIR += audit
diff --git a/security/amavisd-new/Makefile b/security/amavisd-new/Makefile
new file mode 100644
index 000000000000..9c45699ddae7
--- /dev/null
+++ b/security/amavisd-new/Makefile
@@ -0,0 +1,100 @@
+# New ports collection makefile for: amavisd-new
+# Date created: 05 Jun 2002
+# Whom: Christopher K Davis (ckd-freebsd@ckdhr.com)
+#
+# $FreeBSD$
+#
+# Based on amavisd ports makefile.
+
+PORTNAME= amavisd-new
+PORTVERSION= 20020517
+CATEGORIES= security
+MASTER_SITES= http://www.ijs.si/software/amavisd/
+DISTNAME= ${PORTNAME}-${PORTVERSION}
+
+MAINTAINER= ckd-freebsd@ckdhr.com
+
+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 \
+ ${SITE_PERL}/${PERL_ARCH}/Unix/Syslog.pm:${PORTSDIR}/sysutils/p5-Unix-Syslog \
+ ${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
+
+RUN_DEPENDS= ${BUILD_DEPENDS}
+
+GNU_CONFIGURE= yes
+
+SITE_PERL= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}
+AMAVISUSER?= vscan
+AMAVISGROUP?= vscan
+
+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}
+
+pre-install:
+ @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${AMAVISUSER} ${AMAVISGROUP}
+
+post-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/${STARTSCRIPT} ${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
+ ${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
+.endfor
+ @${ECHO} "==============================================================================="
+ @${ECHO} "Please read ${DOCSDIR}/README.${MTA}"
+ @${ECHO} "==============================================================================="
+.endif
+
+.include <bsd.port.mk>
diff --git a/security/amavisd-new/distinfo b/security/amavisd-new/distinfo
new file mode 100644
index 000000000000..f861c60cc0bc
--- /dev/null
+++ b/security/amavisd-new/distinfo
@@ -0,0 +1 @@
+MD5 (amavisd-new-20020517.tar.gz) = b13a90e401884ac125b098d36b8d170a
diff --git a/security/amavisd-new/files/amavisd-milter.sh b/security/amavisd-new/files/amavisd-milter.sh
new file mode 100644
index 000000000000..eaefe61b9988
--- /dev/null
+++ b/security/amavisd-new/files/amavisd-milter.sh
@@ -0,0 +1,31 @@
+#!/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
new file mode 100644
index 000000000000..1a9bbe947d38
--- /dev/null
+++ b/security/amavisd-new/files/amavisd.sh
@@ -0,0 +1,28 @@
+#!/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/pkg-comment b/security/amavisd-new/pkg-comment
new file mode 100644
index 000000000000..4f261aac2b67
--- /dev/null
+++ b/security/amavisd-new/pkg-comment
@@ -0,0 +1 @@
+Performance-enhanced daemonized version of amavis-perl
diff --git a/security/amavisd-new/pkg-descr b/security/amavisd-new/pkg-descr
new file mode 100644
index 000000000000..cc331ca83ab6
--- /dev/null
+++ b/security/amavisd-new/pkg-descr
@@ -0,0 +1,9 @@
+amavisd-new is a performance-enhanced daemonized version of amavis-perl
+
+Note that the installation is different than the original package, and the
+integration into your MTA can be different, so please read the README and
+INSTALL files very carefully.
+
+amavisd-new also supports SpamAssassin integration.
+
+WWW: http://www.ijs.si/software/amavisd/
diff --git a/security/amavisd-new/pkg-install b/security/amavisd-new/pkg-install
new file mode 100644
index 000000000000..c35d566ffad0
--- /dev/null
+++ b/security/amavisd-new/pkg-install
@@ -0,0 +1,39 @@
+#!/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
new file mode 100644
index 000000000000..11d6ae3d9479
--- /dev/null
+++ b/security/amavisd-new/pkg-plist
@@ -0,0 +1,18 @@
+%%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.sh
+sbin/amavis
+sbin/amavisd
diff --git a/security/amavisd-new/pkg-plist.milter b/security/amavisd-new/pkg-plist.milter
new file mode 100644
index 000000000000..660bd46b095d
--- /dev/null
+++ b/security/amavisd-new/pkg-plist.milter
@@ -0,0 +1,18 @@
+%%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