Moved from net-mail/amavis to mail-filter/amavis.
authorSeemant Kulleen <seemant@gentoo.org>
Thu, 3 Jun 2004 06:44:29 +0000 (06:44 +0000)
committerSeemant Kulleen <seemant@gentoo.org>
Thu, 3 Jun 2004 06:44:29 +0000 (06:44 +0000)
mail-filter/amavis/ChangeLog [new file with mode: 0644]
mail-filter/amavis/Manifest [new file with mode: 0644]
mail-filter/amavis/amavis-0.2.1-r3.ebuild [new file with mode: 0644]
mail-filter/amavis/amavis-0.3.12.ebuild [new file with mode: 0644]
mail-filter/amavis/files/0.3.12-postfix.diff [new file with mode: 0644]
mail-filter/amavis/files/amavis-0.2.1-gentoo.diff [new file with mode: 0644]
mail-filter/amavis/files/amavis-0.2.1-securetar.patch [new file with mode: 0644]
mail-filter/amavis/files/digest-amavis-0.2.1-r3 [new file with mode: 0644]
mail-filter/amavis/files/digest-amavis-0.3.12 [new file with mode: 0644]
mail-filter/amavis/metadata.xml [new file with mode: 0644]

diff --git a/mail-filter/amavis/ChangeLog b/mail-filter/amavis/ChangeLog
new file mode 100644 (file)
index 0000000..1506556
--- /dev/null
@@ -0,0 +1,81 @@
+# ChangeLog for net-mail/amavis
+# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/amavis/ChangeLog,v 1.1 2004/06/03 06:44:29 seemant Exp $
+
+*amavis-0.2.1-r3 (02 Jun 2004)
+
+  02 Jun 2004; Seemant Kulleen <seemant@gentoo.org> +metadata.xml,
+  +files/0.3.12-postfix.diff, +files/amavis-0.2.1-gentoo.diff,
+  +files/amavis-0.2.1-securetar.patch, +amavis-0.2.1-r3.ebuild,
+  +amavis-0.3.12.ebuild:
+  Moved from net-mail/amavis to mail-filter/amavis.
+
+  27 Apr 2004; Aron Griffis <agriffis@gentoo.org> amavis-0.2.1-r3.ebuild,
+  amavis-0.3.12.ebuild:
+  Add inherit eutils
+
+  28 Feb 2004; Jason Wever <weeve@gentoo.org> amavis-0.2.1-r3.ebuild:
+  Masked on sparc due to x86 binary dependency and broken patches.
+
+  27 Feb 2004; Sven Blumenstein <bazik@gentoo.org> amavis-0.3.12.ebuild:
+  Stable on sparc.
+
+  14 Jan 2004; Aron Griffis <agriffis@gentoo.org> amavis-0.3.12.ebuild:
+  add ~alpha (bug 21240)
+
+  27 Oct 2003; Nick Hadaway <raker@gentoo.org> amavis-0.3.12.ebuild:
+  Fixing the mta detection.
+
+*amavis-0.3.12 (23 Oct 2002)
+
+  22 Jun 2003; Preston A. Elder <prez@gentoo.org> amavis-0.3.12.ebuild :
+  Changed to use new enewuser/enewgroup commands.
+
+  11 May 2003; Preston A. Elder <prez@gentoo.org> amavis-0.3.12.ebuild 
+  Added dependancy on app-arch/zip and unmasked for x86
+
+  19 Apr 2003; Preston A. Elder <prez@gentoo.org> amavis-0.3.12.ebuild 
+  files/digest-amavis-0.3.12 :
+  Version bump, and made it use virtual/virus.
+*amavis-0.3.12_pre8 (23 Oct 2002)
+
+  06 Dec 2002; Rodney Rees <manson@gentoo.org> : changed sparc ~sparc keywords
+
+  13 Jan 2003; Nick Hadaway <raker@gentoo.org> amavis-0.3.12_pre8.ebuild :
+  Now will find net-mail/f-prot and net-mail/vlnx if installed.  Closes
+  bug #13117
+
+  29 Nov 2002; Nick Hadaway <raker@gentoo.org> amavis-0.3.12_pre8.ebuild :
+  Marked stable.
+
+  17 Nov 2002; Nick Hadaway <raker@gentoo.org> amavis-0.3.12_pre8.ebuild :
+  Fixed a typo and changed /var/amavis permissions and ownership.
+
+  15 Nov 2002; Nick Hadaway <raker@gentoo.org> amavis-0.3.12_pre8.ebuild :
+  The ebuild should now detect what mail system you are using.
+  postfix, exim, qmail, and sendmail are detected.
+
+  23 Oct 2002; Nick Hadaway <raker@gentoo.org> amavis-0.3.12_pre8.ebuild,
+  files/digest-amavis-0.3.12_pre8 :
+  Version bump.  0.2.x of amavis is non-maintained code.  The ebuild currently
+  only supports postfix as the mta.  Depending on how flexible the configuration
+  is I may end up splitting this ebuild into amavis-postfix, amavis-exim, etc...
+
+*amavis-0.2.1-r3 (05 Sep 2002)
+
+  15 Nov 2002; Nick Hadaway <raker@gentoo.org> amavis-0.2.1-r3.ebuild :
+  Updated permissions on scanmail and virusmails
+
+  05 Sep 2002; Daniel Ahlberg <aliz@gentoo.org> :
+  Security update, fixed detection of vlnx, fixed sandbox violations.
+
+*amavis-0.2.1-r2 (1 Feb 2002)
+
+  1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog :
+  
+  Added initial ChangeLog which should be updated whenever the package is
+  updated in any way. This changelog is targetted to users. This means that the
+  comments should well explained and written in clean English. The details about
+  writing correct changelogs are explained in the skel.ChangeLog file which you
+  can find in the root directory of the portage repository.
diff --git a/mail-filter/amavis/Manifest b/mail-filter/amavis/Manifest
new file mode 100644 (file)
index 0000000..5870140
--- /dev/null
@@ -0,0 +1,9 @@
+MD5 c21bb514e50b3103fbf00d4e877018f9 files/0.3.12-postfix.diff 969
+MD5 587d7c8f2f2fce495116525321748c66 files/amavis-0.2.1-gentoo.diff 706
+MD5 08dee7bd07762dc8704f4d6a13f86d64 files/amavis-0.2.1-securetar.patch 479
+MD5 5eb67922799dba116044631c52860bd4 files/digest-amavis-0.2.1-r3 64
+MD5 dd107599b6f61744ffb5e84f36a2a93d files/digest-amavis-0.3.12 65
+MD5 0262a327bac756d583b302fb9b41002e ChangeLog 2988
+MD5 5654975604bd8b549ef37c7337926916 amavis-0.2.1-r3.ebuild 2046
+MD5 c5c2783bfc376abaf5894a97bc267f37 amavis-0.3.12.ebuild 3073
+MD5 5721b86fd871bdfab77231abc6e02f68 metadata.xml 161
diff --git a/mail-filter/amavis/amavis-0.2.1-r3.ebuild b/mail-filter/amavis/amavis-0.2.1-r3.ebuild
new file mode 100644 (file)
index 0000000..8cd9db0
--- /dev/null
@@ -0,0 +1,83 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/amavis/amavis-0.2.1-r3.ebuild,v 1.1 2004/06/03 06:44:29 seemant Exp $
+
+inherit eutils
+
+DESCRIPTION="Virus Scanner"
+HOMEPAGE="http://www.amavis.org/"
+SRC_URI="http://www.amavis.org/dist/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86 -sparc"
+
+DEPEND="net-mail/maildrop
+       >=net-mail/tnef-0.13
+       >=app-antivirus/vlnx-407e
+       mail-mta/qmail"
+
+src_unpack() {
+       unpack ${A}
+       cd ${S}
+       epatch ${FILESDIR}/${P}-securetar.patch
+}
+
+src_compile() {
+       ./reconf
+       epatch ${FILESDIR}/${P}-gentoo.diff
+       econf \
+               --with-logdir=/var/log/scanmail \
+               --with-virusdir=/var/tmp/virusmails \
+               --enable-qmail || die
+       make || die
+}
+
+src_install() {
+       make prefix=${D}/usr install || die
+       dodoc AUTHORS BUGS COPYING ChangeLog FAQ HINTS NEWS README* TODO
+       dodoc doc/amavis.txt
+       dohtml -r doc
+       dodir /var/log/scanmail
+       dodir /var/tmp/virusmails
+       chmod 1777 ${D}/var/log/scanmail
+       chmod 1777 ${D}/var/tmp/virusmails
+}
+
+pkg_setup() {
+       # from "createaccount" that was designed to run during the
+       # installation phase
+
+       error="no"
+       whoami=`/usr/bin/id | cut -d'(' -f2 | cut -d')' -f1`
+
+       aliases=/etc/mail/aliases
+
+       if test "`echo \"virusalert\" | grep \"@\" | wc -l`" -eq 1; then
+               echo "WARNING: using off-site mail account: \"virusalert\""
+               echo "WARNING: be sure it is able to receive mail"
+       else
+               if test "`ls /home | grep -w \"virusalert\" | wc -l`" -eq 1; then
+                       true
+               else
+                       if test -n "$aliases"; then
+                               if test "`grep \"virusalert\" $aliases | wc -l`" -lt 1; then
+                                       if test -w "$aliases"; then
+                                               echo "virusalert: $whoami" >> $aliases
+                                       else
+                                               echo "WARNING: $aliases is not writable by \"$whoami\""
+                                               error="yes"
+                                       fi
+                               fi
+                       else
+                               echo "WARNING: mail aliases file not found: /etc/aliases"
+                               error="yes"
+                       fi
+               fi
+       fi
+
+       if test "$error" = "yes"; then
+               einfo "WARNING: could not create mail account: \"virusalert\""
+               einfo "WARNING: be sure to create it manually"
+       fi
+}
diff --git a/mail-filter/amavis/amavis-0.3.12.ebuild b/mail-filter/amavis/amavis-0.3.12.ebuild
new file mode 100644 (file)
index 0000000..003dcbf
--- /dev/null
@@ -0,0 +1,134 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/amavis/amavis-0.3.12.ebuild,v 1.1 2004/06/03 06:44:29 seemant Exp $
+
+inherit eutils
+
+IUSE=""
+
+DESCRIPTION="A perl module which integrates virus scanning software with your MTA"
+HOMEPAGE="http://www.amavis.org"
+SRC_URI="mirror://sourceforge/amavis/${P/_/}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86 ~amd64 ~alpha sparc"
+
+DEPEND="dev-lang/perl
+       sys-apps/file
+       app-arch/arc
+       app-arch/bzip2
+       app-arch/lha
+       app-arch/unarj
+       app-arch/sharutils
+       app-arch/unrar
+       app-arch/zoo
+       app-arch/unzip
+       dev-perl/IO-stringy
+       dev-perl/Unix-Syslog
+       dev-perl/MailTools
+       dev-perl/MIME-Base64
+       >=dev-perl/MIME-tools-5.313
+       >dev-perl/Convert-UUlib-0.2
+       >=dev-perl/Convert-TNEF-0.06
+       >=dev-perl/Compress-Zlib-1.14
+       dev-perl/Archive-Tar
+       >=dev-perl/Archive-Zip-1.0
+       dev-perl/libnet
+       virtual/mta
+       virtual/mda
+       virtual/antivirus"
+
+S="${WORKDIR}/${P/_/}"
+
+pkg_setup() {
+
+       enewgroup amavis
+       enewuser amavis -1 /bin/false /dev/null amavis
+       pwconv || die
+
+       if ! grep -a ^virusalert: /etc/mail/aliases ; then
+               cp /etc/mail/aliases /etc/mail/aliases.orig
+               echo >> /etc/mail/aliases
+               echo "# user that virus messages are forwarded to" \
+                       >> /etc/mail/aliases
+               echo "virusalert: root" >> /etc/mail/aliases
+               newaliases || die "check your /etc/mail/aliases for problems"
+       fi
+
+}
+
+mymta=`grep "^virtual/mta net-mail\/\(exim\|postfix\|qmail\|sendmail\)" /var/cache/edb/virtuals | awk -F/ '{print $3}'`
+
+src_unpack() {
+
+       unpack ${A}
+       cd ${S}
+
+       if [ "$mymta" == "postfix " ]; then
+               patch -p1 < ${FILESDIR}/0.3.12-postfix.diff || die "patch failed"
+       fi
+
+}
+
+src_compile() {
+
+       cp configure configure.tmp
+       sed \
+               -e "s:/usr/local/f-prot:/opt/f-prot:" \
+               -e "s:ac_dummy=\"\$PATH\:/usr/bin\:/usr/local/bin\":ac_dummy=\"\$PATH\:/usr/bin\:/usr/local/bin\:/opt/vlnx\":" \
+               < configure.tmp > configure
+
+       local myconf
+
+       if [ "$mymta" == "postfix " ]; then
+               myconf="--enable-postfix"
+       elif [ "$mymta" == "qmail " ]; then
+               myconf="--enable-qmail"
+       elif [ "$mymta" == "exim " ]; then
+               myconf="--enable-exim"
+       elif [ "$mymta" == "sendmail " ]; then
+               myconf="--enable-sendmail"
+       fi
+
+       # The quarantine directory for infected emails
+       myconf="${myconf} --with-virusdir=/var/amavis/quarantine"
+
+       econf ${myconf} || die "configure failed"
+
+       make || die "make failed"
+
+}
+
+src_install() {
+
+       dodir /var/amavis/quarantine
+
+       if [ "$mymta" == "qmail " ]; then
+               chown -R qmailq:qmail ${D}/var/amavis
+       else
+               chown -R amavis:amavis ${D}/var/amavis
+       fi
+
+       chmod -R 770 ${D}/var/amavis
+
+       keepdir /var/amavis /var/amavis/quarantine
+
+       einstall \
+               logdir=${D}/var/amavis \
+               runtime_dir=${D}/var/amavis \
+               virusdir=${D}/var/amavis/quarantine \
+               || die "make install failed"
+
+       dodoc AUTHORS BUGS ChangeLog FAQ HINTS INSTALL NEWS README* TODO
+}
+
+pkg_postinst() {
+
+       einfo ""
+       einfo "For amavis to work properly with your $mymta installation"
+       einfo "there are some configuration changes required"
+       einfo ""
+       einfo "less /usr/share/doc/${P}/README.$mymta.gz"
+       einfo ""
+}
diff --git a/mail-filter/amavis/files/0.3.12-postfix.diff b/mail-filter/amavis/files/0.3.12-postfix.diff
new file mode 100644 (file)
index 0000000..2a28ee9
--- /dev/null
@@ -0,0 +1,25 @@
+diff -urN amavis-0.3.12pre8/amavis/Makefile.in amavis-0.3.12pre8-modified/amavis/Makefile.in
+--- amavis-0.3.12pre8/amavis/Makefile.in       2002-05-29 05:55:58.000000000 -0500
++++ amavis-0.3.12pre8-modified/amavis/Makefile.in      2002-10-23 14:30:07.000000000 -0500
+@@ -432,8 +432,8 @@
+           $(mkinstalldirs) $$subdir ; \
+           if test -n $(amavisuser) ; then \
+             chown $(amavisuser) $$subdir ; \
+-            if test $(MTA) = qmail ; then \
+-              chgrp qmail $$subdir ; \
++            if test $(MTA) == postfix ; then \
++              chgrp postfix $$subdir ; \
+             fi; \
+           fi; \
+         fi; \
+@@ -446,8 +446,8 @@
+                       chown $(amavisuser) $(DESTDIR)$(virusdir) ; \
+               fi; \
+       fi
+-      if test $(MTA) = qmail ; then \
+-              chown qmailq:qmail $(DESTDIR)$(prefix)/sbin/amavis ; \
++      if test $(MTA) == postfix ; then \
++              chown postfix:postfix $(DESTDIR)$(prefix)/sbin/amavis ; \
+               chmod 4711 $(DESTDIR)$(prefix)/sbin/amavis ; \
+       fi
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/mail-filter/amavis/files/amavis-0.2.1-gentoo.diff b/mail-filter/amavis/files/amavis-0.2.1-gentoo.diff
new file mode 100644 (file)
index 0000000..570ee8f
--- /dev/null
@@ -0,0 +1,23 @@
+--- configure  Thu Sep  5 12:15:04 2002
++++ configure  Thu Sep  5 12:15:19 2002
+@@ -3225,7 +3225,7 @@
+   ;;
+   *)
+   IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS=":"
+-  ac_dummy="$PATH:/usr/bin:/usr/local/bin"
++  ac_dummy="$PATH:/usr/bin:/usr/local/bin:/opt/vlnx"
+   for ac_dir in $ac_dummy; do 
+     test -z "$ac_dir" && ac_dir=.
+     if test -f $ac_dir/$ac_word; then
+
+--- src/scanmails/Makefile.in  Thu Sep  5 11:49:46 2002
++++ src/scanmails/Makefile.in  Thu Sep  5 11:49:58 2002
+@@ -226,7 +226,7 @@
+ installcheck: installcheck-am
+ install-exec-am: install-sbinSCRIPTS
+       @$(NORMAL_INSTALL)
+-      $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
++      $(MAKE) $(AM_MAKEFLAGS)
+ install-exec: install-exec-am
+ install-data-am:
diff --git a/mail-filter/amavis/files/amavis-0.2.1-securetar.patch b/mail-filter/amavis/files/amavis-0.2.1-securetar.patch
new file mode 100644 (file)
index 0000000..fabb157
--- /dev/null
@@ -0,0 +1,13 @@
+--- src/securetar/securetar.c  Thu Sep  5 11:50:50 2002
++++ src/securetar/securetar.c  Thu Sep  5 13:32:15 2002
+@@ -231,8 +231,8 @@
+               /************************************/
+               /* Write out the corresponding data */
+               /************************************/
+-              while( FileSize>0 ) {
+-                      FileSize-=(long)count=read(fdin,&block,sizeof(block));
++              while( FileSize>0 && (count=read(fdin,&block,sizeof(block))) ) {
++                      FileSize-=(long)count;
+                       write( fdout, &block, count );
+               }
+       }
diff --git a/mail-filter/amavis/files/digest-amavis-0.2.1-r3 b/mail-filter/amavis/files/digest-amavis-0.2.1-r3
new file mode 100644 (file)
index 0000000..07a826c
--- /dev/null
@@ -0,0 +1 @@
+MD5 8d2ce5007d5ad841498ba0294350d492 amavis-0.2.1.tar.gz 236011
diff --git a/mail-filter/amavis/files/digest-amavis-0.3.12 b/mail-filter/amavis/files/digest-amavis-0.3.12
new file mode 100644 (file)
index 0000000..1380aa7
--- /dev/null
@@ -0,0 +1 @@
+MD5 9241bd0331330354955c9c7566176c18 amavis-0.3.12.tar.gz 318788
diff --git a/mail-filter/amavis/metadata.xml b/mail-filter/amavis/metadata.xml
new file mode 100644 (file)
index 0000000..51f94e3
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-mail</herd>
+</pkgmetadata>