aboutsummaryrefslogtreecommitdiffstats
path: root/security/amavisd-new
diff options
context:
space:
mode:
authorjeh <jeh@FreeBSD.org>2003-11-20 19:00:19 +0800
committerjeh <jeh@FreeBSD.org>2003-11-20 19:00:19 +0800
commit680742a49485f26e17ac04d18ac48ebf99a718b0 (patch)
tree385620331a22ec70c874c65e6260e4f5da648397 /security/amavisd-new
parent9bee83d21518898bfd09e07ccbeb98c0320c4c34 (diff)
downloadfreebsd-ports-gnome-680742a49485f26e17ac04d18ac48ebf99a718b0.tar.gz
freebsd-ports-gnome-680742a49485f26e17ac04d18ac48ebf99a718b0.tar.zst
freebsd-ports-gnome-680742a49485f26e17ac04d18ac48ebf99a718b0.zip
1) Update security/amavisd-new to amavisd-new-20030616-p6.
2) Incorporate changes from PR 57382: - add rc.subr support - cleanup sed variable replacement scripts - add pointer to Clam Antivirus to installation message PR 57382 was closed by mistake, I thought the contents have already been commited, while they were not. PR: 59323 Submitted by: milter@free.fr (1) Submitted by: Martin Matuska <martin@tradex.sk> (2) Approved by: MAINTAINER
Diffstat (limited to 'security/amavisd-new')
-rw-r--r--security/amavisd-new/Makefile29
-rw-r--r--security/amavisd-new/distinfo2
-rw-r--r--security/amavisd-new/files/MESSAGE.tmpl13
-rw-r--r--security/amavisd-new/files/amavis-milter.sh.tmpl34
-rw-r--r--security/amavisd-new/files/amavisd.sh.tmpl74
-rw-r--r--security/amavisd-new/files/patch-amavisd15
-rw-r--r--security/amavisd-new/files/patch-amavisd.conf12
-rw-r--r--security/amavisd-new/files/patch-config.h.in8
-rw-r--r--security/amavisd-new/files/patch-configure14
-rw-r--r--security/amavisd-new/pkg-plist2
10 files changed, 117 insertions, 86 deletions
diff --git a/security/amavisd-new/Makefile b/security/amavisd-new/Makefile
index 6f393441795e..c69775f5fda0 100644
--- a/security/amavisd-new/Makefile
+++ b/security/amavisd-new/Makefile
@@ -7,7 +7,7 @@
# Based on amavisd ports makefile.
PORTNAME= amavisd-new
-PORTVERSION= 20030616.p5
+PORTVERSION= 20030616.p6
CATEGORIES= security
MASTER_SITES= http://www.ijs.si/software/amavisd/
DISTNAME= ${PORTNAME}-${PORTVERSION:S/.p/-p/}
@@ -35,6 +35,7 @@ RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-H
${LOCALBASE}/bin/zoo:${PORTSDIR}/archivers/zoo
USE_PERL5_RUN= yes
+USE_RC_SUBR= yes
PKGINSTALL= ${WRKDIR}/INSTALL
PKGDEINSTALL= ${WRKDIR}/DEINSTALL
@@ -63,23 +64,20 @@ CONFIGURE_WRKSRC= ${WRKSRC}/helper-progs
BUILD_WRKSRC= ${WRKSRC}/helper-progs
.endif
+SED_SCRIPT= -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' \
+ -e 's,%%RC_SUBR%%,${RC_SUBR},g'
+
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}; \
+ for file in amavisd.sh amavis-milter.sh INSTALL DEINSTALL MESSAGE; do \
+ ${SED} ${SED_SCRIPT} < ${FILESDIR}/$${file}.tmpl > ${WRKDIR}/$${file}; \
done
for file in amavisd.conf amavisd; do \
- ${SED} -e 's,%%AMAVISUSER%%,${AMAVISUSER},g' \
- -e 's,%%AMAVISGROUP%%,${AMAVISGROUP},g' \
- -e 's,%%AMAVISDIR%%,${AMAVISDIR},g' \
- -e 's,%%AMAVISQUARANTINE%%,${AMAVISQUARANTINE},g' \
- -e 's,%%PREFIX%%,${PREFIX},g' \
- < ${WRKSRC}/$${file} > ${WRKDIR}/$${file}; \
+ ${SED} ${SED_SCRIPT} < ${WRKSRC}/$${file} > ${WRKDIR}/$${file}; \
done
pre-install:
@@ -89,6 +87,7 @@ do-install:
.if !defined(AMAVIS_NOMILTER)
${INSTALL_PROGRAM} ${WRKSRC}/helper-progs/amavis ${PREFIX}/sbin
${INSTALL_PROGRAM} ${WRKSRC}/helper-progs/amavis-milter ${PREFIX}/sbin
+ ${INSTALL_SCRIPT} ${WRKDIR}/amavis-milter.sh ${PREFIX}/etc/rc.d
.endif
${INSTALL_SCRIPT} ${WRKDIR}/amavisd ${PREFIX}/sbin
${INSTALL_SCRIPT} ${WRKDIR}/amavisd.conf ${PREFIX}/etc/amavisd.conf-dist
diff --git a/security/amavisd-new/distinfo b/security/amavisd-new/distinfo
index fd2a4b7d715a..ae6a07ac2974 100644
--- a/security/amavisd-new/distinfo
+++ b/security/amavisd-new/distinfo
@@ -1 +1 @@
-MD5 (amavisd-new-20030616-p5.tar.gz) = 13c76432e957ccd302856f64526483a2
+MD5 (amavisd-new-20030616-p6.tar.gz) = a611af8b952707977b9851dc8fc81640
diff --git a/security/amavisd-new/files/MESSAGE.tmpl b/security/amavisd-new/files/MESSAGE.tmpl
index 88e297c716e6..f98068cd5773 100644
--- a/security/amavisd-new/files/MESSAGE.tmpl
+++ b/security/amavisd-new/files/MESSAGE.tmpl
@@ -2,10 +2,17 @@
*******************************************************************
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:
+ in /usr/ports/security/vscan and Clam Antivirus is available
+ in /usr/ports/security/clamav.
- touch %%AMAVISDIR%%/use.milter
+ Enable amavisd-new in /etc/rc.conf with the following line:
+
+ amavisd_enable="YES"
+
+ If you want to use the amavis sendmail milter interface,
+ you need the following additional line in /etc/rc.conf
+
+ amavis_milter_enable="YES"
A configuration template is available in %%PREFIX%%/etc
as amavisd.conf-dist. Copy it to amavisd.conf and edit it to
diff --git a/security/amavisd-new/files/amavis-milter.sh.tmpl b/security/amavisd-new/files/amavis-milter.sh.tmpl
new file mode 100644
index 000000000000..73bd248ce0ea
--- /dev/null
+++ b/security/amavisd-new/files/amavis-milter.sh.tmpl
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: amavis_milter
+# REQUIRE: amavisd
+# BEFORE: amavisd
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable amavis-milter:
+#
+#amavis_milter_enable="YES"
+#
+
+. %%RC_SUBR%%
+
+name=amavis_milter
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/sbin/amavis-milter
+
+amavis_milter_user=%%AMAVISUSER%%
+
+required_files=%%PREFIX%%/etc/amavisd.conf
+
+# set defaults
+
+amavis_milter_enable=${amavis_milter_enable:-"NO"}
+amavis_milter_flags=${amavis_milter_flags:-"-D -p %%AMAVISDIR%%/amavis-milter.sock"}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/security/amavisd-new/files/amavisd.sh.tmpl b/security/amavisd-new/files/amavisd.sh.tmpl
index 656954de4596..553b87da40ad 100644
--- a/security/amavisd-new/files/amavisd.sh.tmpl
+++ b/security/amavisd-new/files/amavisd.sh.tmpl
@@ -1,36 +1,42 @@
#!/bin/sh
+#
+# $FreeBSD: /tmp/pcvs/ports/security/amavisd-new/files/Attic/amavisd.sh.tmpl,v 1.6 2003-11-20 11:00:19 jeh Exp $
+#
-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
-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 > /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
+# PROVIDE: amavisd
+# REQUIRE: LOGIN
+# BEFORE: mail
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable amavisd:
+#
+#amavisd_enable="YES"
+#
+
+. %%RC_SUBR%%
+
+name=amavisd
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/sbin/amavisd > /dev/null 2>&1
+
+amavisd_user=%%AMAVISUSER%%
+
+pidfile=%%AMAVISDIR%%/amavisd.pid
+required_files=%%PREFIX%%/etc/amavisd.conf
+
+stop_postcmd=stop_postcmd
+
+stop_postcmd()
+{
+ rm -f $pidfile
+}
+
+# set defaults
+
+amavisd_enable=${amavisd_enable:-"NO"}
+amavisd_flags=${amavisd_flags:-""}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/security/amavisd-new/files/patch-amavisd b/security/amavisd-new/files/patch-amavisd
index 39380b6b2b1b..ed4a1d619d04 100644
--- a/security/amavisd-new/files/patch-amavisd
+++ b/security/amavisd-new/files/patch-amavisd
@@ -1,15 +1,6 @@
---- amavisd.orig Mon Aug 25 18:07:56 2003
-+++ amavisd Mon Aug 25 20:47:40 2003
-@@ -3903,7 +3903,7 @@
- /^\.lzo$/ && defined $lzop
- && return do_uncompress($part,$tempdir,"$lzop -d -c");
- /^\.cpio$/ && defined $cpio && return do_cpio($part,$tempdir);
--# /^\.tar$/ && defined $cpio && return do_cpio($part,$tempdir);
-+ /^\.tar$/ && defined $cpio && return do_cpio($part,$tempdir);
- /^\.tar$/ && return do_tar($part,$tempdir); # fallback
- /^\.zip$/ && return do_unzip($part,0,$tempdir);
- /^\.rar$/ && return do_unrar($part,0,$tempdir);
-@@ -6260,7 +6260,7 @@
+--- amavisd.orig Mon Nov 10 01:22:13 2003
++++ amavisd Tue Nov 11 22:42:47 2003
+@@ -6279,7 +6279,7 @@
my($amavisd_path) = find_program_path($0, [split(/:/, $path, -1)], 0);
$amavisd_path = $1 if $amavisd_path=~m{^([A-Za-z0-9/._=+-]+)$(?!\n)}; # untaint
diff --git a/security/amavisd-new/files/patch-amavisd.conf b/security/amavisd-new/files/patch-amavisd.conf
index d830e1b41509..22b9177eded7 100644
--- a/security/amavisd-new/files/patch-amavisd.conf
+++ b/security/amavisd-new/files/patch-amavisd.conf
@@ -1,5 +1,5 @@
---- amavisd.conf.orig Wed Jun 25 17:22:46 2003
-+++ amavisd.conf Wed Jun 25 17:26:42 2003
+--- amavisd.conf.orig Mon Nov 10 00:07:53 2003
++++ amavisd.conf Tue Nov 11 22:48:05 2003
@@ -51,7 +51,7 @@
# $MYHOME serves as a quick default for some other configuration settings.
# More refined control is available with each individual setting further down.
@@ -12,7 +12,7 @@
@@ -60,8 +60,8 @@
# Set the user and group to which the daemon will change if started as root
- # (otherwise just keep the UID unchanged, and these settings have no effect):
+ # (otherwise just keeps the UID unchanged, and these settings have no effect):
-$daemon_user = 'vscan'; # (no default; customary: vscan or amavis)
-$daemon_group = 'sweep'; # (no default; customary: vscan or amavis)
+$daemon_user = '%%AMAVISUSER%%'; # (no default; customary: vscan or amavis)
@@ -20,16 +20,16 @@
# Runtime working directory (cwd), and a place where
# temporary directories for unpacking mail are created.
-@@ -271,7 +271,7 @@
+@@ -274,7 +274,7 @@
# 3: server, client
# 4: decompose parts
# 5: more debug details
-$log_level = 2; # (defaults to 0)
+$log_level = 0; # (defaults to 0)
- # Customizeable template for the most interesting log file entry (e.g. with
+ # Customizable template for the most interesting log file entry (e.g. with
# $log_level=0) (take care to properly quote Perl special characters like '\')
-@@ -496,7 +496,7 @@
+@@ -510,7 +510,7 @@
# or a directory (no trailing slash)
# (the default value is undef, meaning no quarantine)
#
diff --git a/security/amavisd-new/files/patch-config.h.in b/security/amavisd-new/files/patch-config.h.in
index 43f81a0cc14b..2f6641d9a4b5 100644
--- a/security/amavisd-new/files/patch-config.h.in
+++ b/security/amavisd-new/files/patch-config.h.in
@@ -1,15 +1,15 @@
--- helper-progs/config.h.in.orig Fri Mar 7 22:56:50 2003
-+++ helper-progs/config.h.in Sat Mar 15 16:15:40 2003
++++ helper-progs/config.h.in Tue Nov 11 22:54:33 2003
@@ -14,10 +14,10 @@
#define X_HEADER_LINE "by-amavisd-new-via-milter"
-
+
/* Define if you have the mkdtemp function, undefine otherwise */
-#undef HAVE_MKDTEMP
+#define HAVE_MKDTEMP
-
+
/* Define if you have the mktemp function, undefine otherwise */
-#define HAVE_MKTEMP
+#undef HAVE_MKTEMP
-
+
/* Define if we have the snprintf function, undefine otherwise */
#undef HAVE_SNPRINTF
diff --git a/security/amavisd-new/files/patch-configure b/security/amavisd-new/files/patch-configure
index b3d30c3ca068..2fa281225031 100644
--- a/security/amavisd-new/files/patch-configure
+++ b/security/amavisd-new/files/patch-configure
@@ -1,17 +1,9 @@
---- helper-progs/configure.orig Thu Dec 26 12:35:33 2002
-+++ helper-progs/configure Sat Apr 19 10:54:31 2003
-@@ -2041,20 +2041,3 @@
+--- helper-progs/configure.orig Tue Nov 11 22:59:24 2003
++++ helper-progs/configure Tue Nov 11 23:01:31 2003
+@@ -2040,12 +2040,3 @@
--if test "$AMAVISUSER" != "" ; then
-- id $AMAVISUSER > /dev/null 2>&1
-- if test "$?" != 0 ; then
-- echo ""
-- echo "Note: The Amavis user '$AMAVISUSER' does not seem to"
-- echo "exist. Please create this user before continuing."
-- fi
--fi
-
-if test "$SENDMAILPROG" != "no" ; then
- sendmailversion=`$SENDMAILPROG -bv -d0.1 | $AWK '/Version/ {print $2}'`
diff --git a/security/amavisd-new/pkg-plist b/security/amavisd-new/pkg-plist
index 782cf24a57b0..50b59198d5fc 100644
--- a/security/amavisd-new/pkg-plist
+++ b/security/amavisd-new/pkg-plist
@@ -14,11 +14,13 @@
%%PORTDOCS%%%%DOCSDIR%%/README.performance
%%PORTDOCS%%%%DOCSDIR%%/README.policy-on-notifications
%%PORTDOCS%%%%DOCSDIR%%/README.postfix
+%%PORTDOCS%%%%DOCSDIR%%/README.protocol
%%PORTDOCS%%%%DOCSDIR%%/README.sendmail
%%PORTDOCS%%%%DOCSDIR%%/README.sendmail-dual
%%PORTDOCS%%%%DOCSDIR%%/RELEASE_NOTES
%%PORTDOCS%%@dirrm %%DOCSDIR%%
etc/amavisd.conf-dist
+%%AMAVIS_NOMILTER%%etc/rc.d/amavis-milter.sh
etc/rc.d/amavisd.sh
%%AMAVIS_NOMILTER%%sbin/amavis
%%AMAVIS_NOMILTER%%sbin/amavis-milter