aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
Diffstat (limited to 'security')
-rw-r--r--security/Makefile1
-rw-r--r--security/amavis-perl/Makefile56
-rw-r--r--security/amavis-perl/distinfo1
-rw-r--r--security/amavis-perl/files/patch-aa38
-rw-r--r--security/amavis-perl/files/patch-ab20
-rw-r--r--security/amavis-perl/pkg-comment1
-rw-r--r--security/amavis-perl/pkg-deinstall28
-rw-r--r--security/amavis-perl/pkg-descr15
-rw-r--r--security/amavis-perl/pkg-install99
-rw-r--r--security/amavis-perl/pkg-message3
-rw-r--r--security/amavis-perl/pkg-plist8
11 files changed, 270 insertions, 0 deletions
diff --git a/security/Makefile b/security/Makefile
index ffee2622d83..37d0c2a0e98 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -5,6 +5,7 @@
SUBDIR += acid
SUBDIR += aescrypt
SUBDIR += aide
+ SUBDIR += amavis-perl
SUBDIR += bjorb
SUBDIR += bro
SUBDIR += bugs
diff --git a/security/amavis-perl/Makefile b/security/amavis-perl/Makefile
new file mode 100644
index 00000000000..004dd6bd08d
--- /dev/null
+++ b/security/amavis-perl/Makefile
@@ -0,0 +1,56 @@
+# New ports collection makefile for: amavis
+# Date Created: 13 Nov 2000
+# Whom: Roman Shterenzon <roman@xpert.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= amavis-perl
+PORTVERSION= 10
+CATEGORIES= security
+MASTER_SITES= http://www.amavis.org/dist/perl/
+
+MAINTAINER= roman@xpert.com
+
+BUILD_DEPENDS= ${LOCALBASE}/bin/uvscan:${PORTSDIR}/security/vscan \
+ ${LOCALBASE}/bin/bunzip2:${PORTSDIR}/archivers/bzip2 \
+ ${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 \
+ ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/MIME/Base64.pm:${PORTSDIR}/converters/p5-MIME-Base64 \
+ ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/MIME/Body.pm:${PORTSDIR}/mail/p5-MIME-Tools \
+ ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Mail/Address.pm:${PORTSDIR}/mail/p5-Mail-Tools \
+ ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}/Compress/Zlib.pm:${PORTSDIR}/archivers/p5-Compress-Zlib \
+ ${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
+RUN_DEPENDS= ${BUILD_DEPENDS}
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS+= --disable-qmail --disable-postfix --disable-exim --with-virusdir=/var/spool/quarantine --enable-relay
+
+.if defined(NOPORTDOCS)
+PLIST_SUB+= NOPORTDOCS="@comment "
+.else
+PLIST_SUB+= NOPORTDOCS=""
+.endif
+
+do-install:
+ ${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
+ ${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/share/doc/amavis
+.endfor
+.endif
+
+post-install:
+ @PKG_PREFIX=${PREFIX} ${PERL5} ${PKGINSTALL} _ POST-INSTALL
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/security/amavis-perl/distinfo b/security/amavis-perl/distinfo
new file mode 100644
index 00000000000..e5ca58aa523
--- /dev/null
+++ b/security/amavis-perl/distinfo
@@ -0,0 +1 @@
+MD5 (amavis-perl-10.tar.gz) = 48acf27fa6d418863b4094dac8bdafe8
diff --git a/security/amavis-perl/files/patch-aa b/security/amavis-perl/files/patch-aa
new file mode 100644
index 00000000000..ccd5ec38dc7
--- /dev/null
+++ b/security/amavis-perl/files/patch-aa
@@ -0,0 +1,38 @@
+--- configure.orig Thu Dec 7 19:04:06 2000
++++ configure Sun Dec 31 15:22:09 2000
+@@ -1109,16 +1109,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
+-$file -b /bin/sh > /dev/null 2>&1
+-if test $? -ne 0 ; then
+- { echo "configure: error:
+-You need a "file" command that supports -b
+-Check ftp://ftp.astron.com/pub/file/" 1>&2; exit 1; }
+-else
+- 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
++#$file -b /bin/sh > /dev/null 2>&1
++#if test $? -ne 0 ; then
++# { echo "configure: error:
++#You need a "file" command that supports -b
++#Check ftp://ftp.astron.com/pub/file/" 1>&2; exit 1; }
++#else
++# echo "$ac_t""yes" 1>&6
++#fi
+
+ for ac_prog in grep
+ do
+@@ -1775,7 +1775,7 @@
+ if test ! -f "$sendmail_cf_orig" ; then
+ if test -f /etc/sendmail.cf ; then
+ sendmail_cf_orig=/etc/sendmail.orig.cf
+- elif test -f /etc/mail/sendmail.orig.cf ; then
++ elif test -f /etc/mail/sendmail.cf ; then
+ sendmail_cf_orig=/etc/mail/sendmail.orig.cf
+ else
+ { echo "configure: error:
diff --git a/security/amavis-perl/files/patch-ab b/security/amavis-perl/files/patch-ab
new file mode 100644
index 00000000000..f803e1b9f04
--- /dev/null
+++ b/security/amavis-perl/files/patch-ab
@@ -0,0 +1,20 @@
+--- 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 @@
+ 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");
+
+@@ -609,7 +609,7 @@
+ }
+
+ # older versions of file report tnef files as data
+- if ($filetype =~ /^data$/) {
++ if ($filetype =~ /:\sdata$/) {
+ # may be tnef
+
+ # checked already?
diff --git a/security/amavis-perl/pkg-comment b/security/amavis-perl/pkg-comment
new file mode 100644
index 00000000000..654c0526603
--- /dev/null
+++ b/security/amavis-perl/pkg-comment
@@ -0,0 +1 @@
+Mail Virus Scanner (uses external antivirus)
diff --git a/security/amavis-perl/pkg-deinstall b/security/amavis-perl/pkg-deinstall
new file mode 100644
index 00000000000..53b1ffa0118
--- /dev/null
+++ b/security/amavis-perl/pkg-deinstall
@@ -0,0 +1,28 @@
+#!/bin/sh
+# $FreeBSD$
+
+prefix=/usr/local
+PATH="/bin:/usr/bin"
+
+if [ "$2" != "POST-DEINSTALL" ]; then
+ exit 0
+fi
+
+if [ -f /etc/sendmail.cf.pre-amavis ]; then
+ CFG=/etc
+elif [ -f /etc/mail/sendmail.cf.pre-amavis ]; then
+ CFG=/etc/mail
+else
+ echo "No sendmail.cf.pre-amavis found, are you sure that amavis was installed?"
+ exit 1
+fi
+
+rm -f ${CFG}/sendmail.cf
+rm -f ${CFG}/sendmail.orig.cf
+mv ${CFG}/sendmail.cf.pre-amavis ${CFG}/sendmail.cf
+sed /^virusalert/d ${CFG}/aliases > ${CFG}/aliases.tmp
+mv ${CFG}/aliases.tmp ${CFG}/aliases
+newaliases
+rmdir /var/spool/mqamavis 2>/dev/null || echo "You may wish to inspect /var/spool/mqamavis directory by yourself and remove it"
+rmdir /var/spool/quarantine 2>/dev/null || echo "You may wish to inspect /var/spool/quarantine directory by yourself and remove it"
+exit 0
diff --git a/security/amavis-perl/pkg-descr b/security/amavis-perl/pkg-descr
new file mode 100644
index 00000000000..dfbfa2e2fe3
--- /dev/null
+++ b/security/amavis-perl/pkg-descr
@@ -0,0 +1,15 @@
+Imagine a heterogene network environment with both UN*X and DOS / Windows/
+Macintosh workstations. Now think of an UN*X server that serves Windows
+and/or Macintosh workstations via a POP3 service. Would it not be nice to
+ensure attachments coming via email are scanned for viruses before they reach
+a system they are able to infect? Well - that is what this package is for.
+It resides on the server that handles your incoming mails. When a mail
+arrives, instead of being delivered via procmail directly, is parsed through
+a script that extracts all attachments from the mail, unpacks (if needed)
+and scans them using a professional virus scanner program.
+
+This is a perl implementation of the mailscan.
+
+WWW: http://www.amavis.org/
+
+Roman Shterenzon <roman@xpert.com>
diff --git a/security/amavis-perl/pkg-install b/security/amavis-perl/pkg-install
new file mode 100644
index 00000000000..e146b10bf55
--- /dev/null
+++ b/security/amavis-perl/pkg-install
@@ -0,0 +1,99 @@
+#!/usr/bin/perl
+# Roman Shterenzon <roman@xpert.com> 27/12/2000
+# $FreeBSD$
+
+use strict;
+
+$ENV{'PATH'}='/bin:/usr/bin';
+
+my $cfg;
+my $result;
+
+exit 0 if $ARGV[1] ne "POST-INSTALL";
+
+if ( -f '/etc/mail/sendmail.cf' ) {
+ $cfg='/etc/mail';
+}
+elsif ( -f '/etc/sendmail.cf' ) {
+ $cfg='/etc';
+}
+my $cf="$cfg/sendmail.cf";
+my $new="$cfg/amavis.cf";
+
+print "===> Adding neccessary hooks to sendmail.cf file\n";
+
+open(IN, $cf) || die "Cannot open $cf";
+open(OUT, ">$new") || die "Cannot create $new";
+
+my $replace=0;
+
+while(<IN>) {
+ if ( /^O QueueDirectory/ ) {
+ $_="O QueueDirectory=/var/spool/mqamavis\n";
+ $replace++;
+ }
+ elsif ( /O StatusFile/ ) {
+ $_="O StatusFile=/var/log/amavis.st\n";
+ $replace++;
+ }
+ elsif ( /^Mlocal/ ) {
+ print OUT <<'EOF';
+Mamavis, P=/usr/local/sbin/amavis, F=mlsACDFMS5:/|@qhP, S=0, R=0
+ T=DNS/RFC822/X-Unix,
+ A=amavis $f $u
+
+EOF
+ $replace++;
+ }
+ elsif ( /\s+final\s+parsing$/ ) {
+ print OUT "R\$*\t\t\t\$#amavis \$:\$1\n";
+ $replace++;
+ }
+ s/^(DZ.*)/$1av/;
+ print OUT;
+}
+close(OUT);
+close(IN);
+die "I couldn't patch the sendmail.cf file, its format is unknown to me\n"
+ unless ( $replace == 4 );
+
+print "===> Adding alias for virusalert to the aliases file\n";
+if ( ! -f "$cfg/aliases" ) {
+ print "Can't find aliases file, you have to add an alias for virusalert by yourself\n";
+}
+else {
+ open (IN, "$cfg/aliases") || die "Cannot open aliases file for reading\n";
+ my $found;
+ while(<IN>) {
+ $found=1, last if /^virusalert/;
+ }
+ close(IN);
+ unless ($found) {
+ open(OUT, ">>$cfg/aliases") || die "Cannot open aliases file for writing\n";
+ print OUT "virusalert:\troot\n";
+ close(OUT);
+ $result=system("newaliases");
+ die "Failed to run newaliases command\n" if $result;
+ }
+}
+
+print "===> Creating /var/spool/mqamavis directory\n";
+if ( ! -d "/var/spool/mqamavis" ) {
+ mkdir "/var/spool/mqamavis",0755 || die "Can't create /var/spool/mqamavis\n";
+}
+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");
+die "Failed to copy $cf to $cf.pre-amavis\n" if $result;
+rename "$cf", "${cfg}/sendmail.orig.cf" ||
+ die "Unable to rename $cf to ${cfg}/sendmail.orig.cf\n";
+rename "$new", "$cf" || die "Unable to rename $new to $cf\n";
diff --git a/security/amavis-perl/pkg-message b/security/amavis-perl/pkg-message
new file mode 100644
index 00000000000..1a4ab678cdc
--- /dev/null
+++ b/security/amavis-perl/pkg-message
@@ -0,0 +1,3 @@
+
+Please read documentation on http://www.amavis.org/ before you start using it.
+
diff --git a/security/amavis-perl/pkg-plist b/security/amavis-perl/pkg-plist
new file mode 100644
index 00000000000..33cfc646c3c
--- /dev/null
+++ b/security/amavis-perl/pkg-plist
@@ -0,0 +1,8 @@
+sbin/amavis
+%%NOPORTDOCS%%share/doc/amavis/amavis.txt
+%%NOPORTDOCS%%share/doc/amavis/README
+%%NOPORTDOCS%%share/doc/amavis/README.exim
+%%NOPORTDOCS%%share/doc/amavis/README.postfix
+%%NOPORTDOCS%%share/doc/amavis/README.sendmail
+%%NOPORTDOCS%%share/doc/amavis/README.scanners
+%%NOPORTDOCS%%@dirrm share/doc/amavis