aboutsummaryrefslogtreecommitdiffstats
path: root/security/amavis-perl
diff options
context:
space:
mode:
authordwcjr <dwcjr@FreeBSD.org>2001-10-22 02:47:20 +0800
committerdwcjr <dwcjr@FreeBSD.org>2001-10-22 02:47:20 +0800
commit2021a1ba424234f98222ec8c4cd288f409b086a2 (patch)
treeb581aebfa26de2192da5e2647791e005bc115885 /security/amavis-perl
parent6d9b61cc004d1de360762b5f2b5481dd1df36712 (diff)
downloadfreebsd-ports-gnome-2021a1ba424234f98222ec8c4cd288f409b086a2.tar.gz
freebsd-ports-gnome-2021a1ba424234f98222ec8c4cd288f409b086a2.tar.zst
freebsd-ports-gnome-2021a1ba424234f98222ec8c4cd288f409b086a2.zip
Update to version 11
Give Seamus Venasse maintainership PR: 31095 Submitted by: new maintainer
Diffstat (limited to 'security/amavis-perl')
-rw-r--r--security/amavis-perl/Makefile43
-rw-r--r--security/amavis-perl/distinfo2
-rw-r--r--security/amavis-perl/files/patch-aa14
-rw-r--r--security/amavis-perl/files/patch-ab10
-rw-r--r--security/amavis-perl/pkg-deinstall.qmail25
-rw-r--r--security/amavis-perl/pkg-deinstall.sendmail (renamed from security/amavis-perl/pkg-deinstall)2
-rw-r--r--security/amavis-perl/pkg-install.qmail39
-rw-r--r--security/amavis-perl/pkg-install.sendmail (renamed from security/amavis-perl/pkg-install)8
-rw-r--r--security/amavis-perl/pkg-message.qmail20
-rw-r--r--security/amavis-perl/pkg-message.sendmail (renamed from security/amavis-perl/pkg-message)0
-rw-r--r--security/amavis-perl/pkg-plist2
11 files changed, 136 insertions, 29 deletions
diff --git a/security/amavis-perl/Makefile b/security/amavis-perl/Makefile
index a5aef9df5d88..16eb61785cec 100644
--- a/security/amavis-perl/Makefile
+++ b/security/amavis-perl/Makefile
@@ -6,17 +6,16 @@
#
PORTNAME= amavis-perl
-PORTVERSION= 10
+PORTVERSION= 11
CATEGORIES= security
MASTER_SITES= http://www.amavis.org/dist/perl/
-MAINTAINER= roman@xpert.com
+MAINTAINER= svenasse@polaris.ca
BUILD_DEPENDS= ${LOCALBASE}/bin/uvscan:${PORTSDIR}/security/vscan \
${LOCALBASE}/bin/lha:${PORTSDIR}/archivers/lha \
${LOCALBASE}/bin/unarj:${PORTSDIR}/archivers/unarj \
${LOCALBASE}/bin/unrar:${PORTSDIR}/archivers/unrar \
- ${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip \
${LOCALBASE}/bin/zoo:${PORTSDIR}/archivers/zoo \
${LOCALBASE}/bin/arc:${PORTSDIR}/archivers/arc \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/IO/AtomicFile.pm:${PORTSDIR}/devel/p5-IO-stringy \
@@ -27,26 +26,54 @@ BUILD_DEPENDS= ${LOCALBASE}/bin/uvscan:${PORTSDIR}/security/vscan \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Convert/UUlib.pm:${PORTSDIR}/converters/p5-Convert-UUlib \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Convert/TNEF.pm:${PORTSDIR}/converters/p5-Convert-TNEF \
${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Archive/Tar.pm:${PORTSDIR}/archivers/p5-Archive-Tar \
- ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Unix/Syslog.pm:${PORTSDIR}/sysutils/p5-Unix-Syslog
+ ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Unix/Syslog.pm:${PORTSDIR}/sysutils/p5-Unix-Syslog \
+ ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Archive/Zip.pm:${PORTSDIR}/archivers/p5-Archive-Zip
.if !exists(/usr/bin/bzip2)
BUILD_DEPENDS+= bunzip2:${PORTSDIR}/archivers/bzip2
.endif
RUN_DEPENDS= ${BUILD_DEPENDS}
GNU_CONFIGURE= yes
-CONFIGURE_ARGS+= --disable-qmail --disable-postfix --disable-exim --with-virusdir=/var/spool/quarantine --enable-relay
+CONFIGURE_ARGS+= --with-virusdir=/var/spool/quarantine --with-runtime-dir=/var/log/amavis \
+ --with-logdir=/var/log/amavis
+
+.if defined(WITH_QMAIL)
+MTA?= qmail
+DIROWNER?= qmailq:qmail
+CONFIGURE_ARGS+= --enable-qmail
+.if exists(${LOCALBASE}/qmail/bin/qmail-send)
+QMAIL_DIR?= ${LOCALBASE}/qmail
+.else
+QMAIL_DIR?= /var/qmail
+.endif
+BUILD_DEPENDS+= ${QMAIL_DIR}/bin/qmail-send:${PORTSDIR}/mail/qmail
+RUN_DEPENDS= ${BUILD_DEPENDS}
+.endif
+
+.if !defined(MTA)
+MTA?= sendmail
+DIROWNER?= root:daemon
+CONFIGURE_ARGS+= --enable-relay
+.endif
+
+PKGDEINSTALL= ${PKGDIR}/pkg-deinstall.${MTA}
+PKGINSTALL= ${PKGDIR}/pkg-install.${MTA}
do-install:
+ @${MKDIR} /var/log/amavis
+ @${MKDIR} /var/spool/quarantine
${INSTALL_SCRIPT} ${WRKSRC}/amavis/amavis ${PREFIX}/sbin
.if !defined(NOPORTDOCS)
- ${MKDIR} ${PREFIX}/share/doc/amavis
-.for i in README README.exim README.postfix README.sendmail README.scanners doc/amavis.txt
+ @${MKDIR} ${PREFIX}/share/doc/amavis
+.for i in README README.exim README.qmail README.milter README.postfix README.sendmail README.scanners doc/amavis.txt
${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/share/doc/amavis
.endfor
.endif
post-install:
+ @${CHOWN} ${DIROWNER} /var/log/amavis /var/spool/quarantine
+ @${CHMOD} 0755 /var/log/amavis /var/spool/quarantine
@PKG_PREFIX=${PREFIX} ${PERL5} ${PKGINSTALL} _ POST-INSTALL
- @${CAT} ${PKGMESSAGE}
+ @${CAT} ${PKGMESSAGE}.${MTA}
.include <bsd.port.mk>
diff --git a/security/amavis-perl/distinfo b/security/amavis-perl/distinfo
index e5ca58aa523d..ffe668541e76 100644
--- a/security/amavis-perl/distinfo
+++ b/security/amavis-perl/distinfo
@@ -1 +1 @@
-MD5 (amavis-perl-10.tar.gz) = 48acf27fa6d418863b4094dac8bdafe8
+MD5 (amavis-perl-11.tar.gz) = e19bfabb2da4aeccc8227766995442d5
diff --git a/security/amavis-perl/files/patch-aa b/security/amavis-perl/files/patch-aa
index ccd5ec38dc72..9bd79a952bb8 100644
--- a/security/amavis-perl/files/patch-aa
+++ b/security/amavis-perl/files/patch-aa
@@ -1,11 +1,11 @@
---- configure.orig Thu Dec 7 19:04:06 2000
-+++ configure Sun Dec 31 15:22:09 2000
-@@ -1109,16 +1109,16 @@
+--- configure.orig Tue Sep 25 19:59:02 2001
++++ configure Sat Oct 6 15:42:18 2001
+@@ -1477,16 +1477,16 @@
{ echo "configure: error: Sorry, you need the "file" command" 1>&2; exit 1; }
fi
-echo $ac_n "checking if file can be brief""... $ac_c" 1>&6
--echo "configure:1114: checking if file can be brief" >&5
+-echo "configure:1482: checking if file can be brief" >&5
-$file -b /bin/sh > /dev/null 2>&1
-if test $? -ne 0 ; then
- { echo "configure: error:
@@ -15,7 +15,7 @@
- echo "$ac_t""yes" 1>&6
-fi
+#echo $ac_n "checking if file can be brief""... $ac_c" 1>&6
-+#echo "configure:1114: checking if file can be brief" >&5
++#echo "configure:1482: checking if file can be brief" >&5
+#$file -b /bin/sh > /dev/null 2>&1
+#if test $? -ne 0 ; then
+# { echo "configure: error:
@@ -25,9 +25,9 @@
+# echo "$ac_t""yes" 1>&6
+#fi
- for ac_prog in grep
+ for ac_prog in id
do
-@@ -1775,7 +1775,7 @@
+@@ -2875,7 +2875,7 @@
if test ! -f "$sendmail_cf_orig" ; then
if test -f /etc/sendmail.cf ; then
sendmail_cf_orig=/etc/sendmail.orig.cf
diff --git a/security/amavis-perl/files/patch-ab b/security/amavis-perl/files/patch-ab
index f803e1b9f04e..e96718bd36f8 100644
--- a/security/amavis-perl/files/patch-ab
+++ b/security/amavis-perl/files/patch-ab
@@ -1,15 +1,15 @@
---- amavis/amavis.in.orig Sun Dec 31 15:16:34 2000
-+++ amavis/amavis.in Sun Dec 31 15:24:31 2000
-@@ -414,7 +414,7 @@
+--- amavis/amavis.in.orig Sat Oct 6 15:44:32 2001
++++ amavis/amavis.in Sat Oct 6 15:46:24 2001
+@@ -469,7 +469,7 @@
do_exit($REGERR, __LINE__);
}
- my $filetype = `$file -b $TEMPDIR/parts/$part`;
+ my $filetype = `$file $TEMPDIR/parts/$part`;
chop $filetype;
- do_debug("File-type of $part: $filetype\n");
+ do_log(4,"File-type of $part: $filetype");
-@@ -609,7 +609,7 @@
+@@ -663,7 +663,7 @@
}
# older versions of file report tnef files as data
diff --git a/security/amavis-perl/pkg-deinstall.qmail b/security/amavis-perl/pkg-deinstall.qmail
new file mode 100644
index 000000000000..c367aa729c4c
--- /dev/null
+++ b/security/amavis-perl/pkg-deinstall.qmail
@@ -0,0 +1,25 @@
+#!/usr/bin/perl
+
+use strict;
+
+my $qmailDir;
+
+# ensure we are running only as post installation
+exit 0 if $ARGV[ 1 ] ne "POST-DEINSTALL";
+
+# find location of qmail
+if ( -f "/var/qmail/bin/qmail-send" ) {
+ $qmailDir = "/var/qmail";
+} else {
+ $qmailDir = "/usr/local/qmail";
+}
+
+print "==> Removing virusalert user\n";
+unlink "${qmailDir}/alias/.qmail-virusalert";
+
+print "==> Removing amavis from qmail\n";
+unlink "${qmailDir}/bin/qmail-queue";
+system( "mv ${qmailDir}/bin/qmail-queue-real ${qmailDir}/bin/qmail-queue" );
+
+print "==> Removing mode from suidperl\n";
+chmod 0511, "/usr/bin/suidperl";
diff --git a/security/amavis-perl/pkg-deinstall b/security/amavis-perl/pkg-deinstall.sendmail
index 53b1ffa0118a..f24f7fd0431f 100644
--- a/security/amavis-perl/pkg-deinstall
+++ b/security/amavis-perl/pkg-deinstall.sendmail
@@ -1,5 +1,5 @@
#!/bin/sh
-# $FreeBSD$
+# $FreeBSD: /tmp/pcvs/ports/security/amavis-perl/Attic/pkg-deinstall.sendmail,v 1.1 2001-10-21 18:47:20 dwcjr Exp $
prefix=/usr/local
PATH="/bin:/usr/bin"
diff --git a/security/amavis-perl/pkg-install.qmail b/security/amavis-perl/pkg-install.qmail
new file mode 100644
index 000000000000..0ca188f02604
--- /dev/null
+++ b/security/amavis-perl/pkg-install.qmail
@@ -0,0 +1,39 @@
+#!/usr/bin/perl
+
+use strict;
+
+my $qmailDir;
+my ( $uid, $gid );
+local *F;
+
+# ensure we are running only as post installation
+exit 0 if $ARGV[ 1 ] ne "POST-INSTALL";
+
+# find location of qmail
+if ( -f "/var/qmail/bin/qmail-send" ) {
+ $qmailDir = "/var/qmail";
+} else {
+ $qmailDir = "/usr/local/qmail";
+}
+
+# create virusalert use as root
+print "==> Creating virusalert user as root\n";
+open( F, ">${qmailDir}/alias/.qmail-virusalert" );
+print F "root\n";
+close( F );
+
+# move qmail-queue to qmail-queue-real
+print "==> Moving qmail-queue\n";
+if ( ! -f "${qmailDir}/bin/qmail-queue-real" ) {
+ system( "mv ${qmailDir}/bin/qmail-queue ${qmailDir}/bin/qmail-queue-real" );
+ system( "cp /usr/local/sbin/amavis ${qmailDir}/bin/qmail-queue" );
+ ( undef, undef, $uid, $gid ) = getpwnam( "qmailq" );
+ chown $uid, $gid, "${qmailDir}/bin/qmail-queue";
+ chmod 04711, "${qmailDir}/bin/qmail-queue";
+} else {
+ print "FAILURE: ${qmailDir}/bin/qmail-queue-real already exists!!\n";
+ exit 1;
+}
+
+print "==> Changing permissions on suidperl\n";
+chmod 04755, "/usr/bin/suidperl";
diff --git a/security/amavis-perl/pkg-install b/security/amavis-perl/pkg-install.sendmail
index 986f2a34fe4c..3e19ba519996 100644
--- a/security/amavis-perl/pkg-install
+++ b/security/amavis-perl/pkg-install.sendmail
@@ -1,6 +1,6 @@
#!/usr/bin/perl
# Roman Shterenzon <roman@xpert.com> 27/12/2000
-# $FreeBSD$
+# $FreeBSD: /tmp/pcvs/ports/security/amavis-perl/Attic/pkg-install.sendmail,v 1.1 2001-10-21 18:47:20 dwcjr Exp $
use strict;
@@ -84,12 +84,6 @@ if ( ! -d "/var/spool/mqamavis" ) {
my $gid=getgrnam('daemon');
chown 0, $gid, "/var/spool/mqamavis";
-print "===> Creating /var/spool/quarantine directory\n";
-if ( ! -d "/var/spool/quarantine" ) {
- mkdir "/var/spool/quarantine",0755 || die "Can't create /var/spool/quarantine\n";
-}
-chown 0, $gid, "/var/spool/quarantine";
-
die "There's already a $cf.pre-amavis, is amavis already installed?\n"
if -f "$cf.pre-amavis";
$result=system("cp $cf $cf.pre-amavis");
diff --git a/security/amavis-perl/pkg-message.qmail b/security/amavis-perl/pkg-message.qmail
new file mode 100644
index 000000000000..2fb564166f8f
--- /dev/null
+++ b/security/amavis-perl/pkg-message.qmail
@@ -0,0 +1,20 @@
+
+Please read documentation on http://www.amavis.org/ before you start using it.
+
+SECURITY NOTES:
+
+The qmail installation already has bin/qmail-queue as suid qmailq. This port
+copies bin/qmail-queue to bin/qmail-queue-real and installs itself as
+bin/qmail-queue with suid qmailq.
+
+Additionally, for this port to properly work with qmail, it requires that
+/usr/bin/suidperl be suid root. The following changes were made:
+
+-rwsr-xr-x 3 root wheel 50760 xxx xx xx:xx /usr/bin/suidperl
+
+ADDITIONAL NOTES:
+
+An alias for ~alias/.qmail-virusalert to root was created. Modify this file
+to meet your requirements.
+
+
diff --git a/security/amavis-perl/pkg-message b/security/amavis-perl/pkg-message.sendmail
index 1a4ab678cdc6..1a4ab678cdc6 100644
--- a/security/amavis-perl/pkg-message
+++ b/security/amavis-perl/pkg-message.sendmail
diff --git a/security/amavis-perl/pkg-plist b/security/amavis-perl/pkg-plist
index ffde6df5e5be..7015a88fe7dc 100644
--- a/security/amavis-perl/pkg-plist
+++ b/security/amavis-perl/pkg-plist
@@ -2,7 +2,9 @@ sbin/amavis
%%PORTDOCS%%share/doc/amavis/amavis.txt
%%PORTDOCS%%share/doc/amavis/README
%%PORTDOCS%%share/doc/amavis/README.exim
+%%PORTDOCS%%share/doc/amavis/README.qmail
%%PORTDOCS%%share/doc/amavis/README.postfix
%%PORTDOCS%%share/doc/amavis/README.sendmail
%%PORTDOCS%%share/doc/amavis/README.scanners
+%%PORTDOCS%%share/doc/amavis/README.milter
%%PORTDOCS%%@dirrm share/doc/amavis