diff options
author | Tobias Scherbaum <dertobi123@gentoo.org> | 2008-12-01 20:54:32 +0000 |
---|---|---|
committer | Tobias Scherbaum <dertobi123@gentoo.org> | 2008-12-01 20:54:32 +0000 |
commit | 34d1fbbe78d57eaed7b9bdc1fd30795e620d9dfe (patch) | |
tree | 5a2a594bbbeb5c7a4bd815a981f2ad008b736f84 | |
parent | Version bump (diff) | |
download | gentoo-2-34d1fbbe78d57eaed7b9bdc1fd30795e620d9dfe.tar.gz gentoo-2-34d1fbbe78d57eaed7b9bdc1fd30795e620d9dfe.tar.bz2 gentoo-2-34d1fbbe78d57eaed7b9bdc1fd30795e620d9dfe.zip |
Revbump, move has_version logic into USE flags and disable spam-checking if spamassassin isn't available (bug #235912 - somewhat)
(Portage version: 2.2_rc16/cvs/Linux 2.6.25-gentoo-r7 x86_64)
-rw-r--r-- | mail-filter/amavisd-new/ChangeLog | 9 | ||||
-rw-r--r-- | mail-filter/amavisd-new/amavisd-new-2.6.1-r1.ebuild | 195 | ||||
-rw-r--r-- | mail-filter/amavisd-new/metadata.xml | 4 |
3 files changed, 207 insertions, 1 deletions
diff --git a/mail-filter/amavisd-new/ChangeLog b/mail-filter/amavisd-new/ChangeLog index bc8a5dfd1761..6a716b1fbb6d 100644 --- a/mail-filter/amavisd-new/ChangeLog +++ b/mail-filter/amavisd-new/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for mail-filter/amavisd-new # Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/amavisd-new/ChangeLog,v 1.128 2008/11/20 16:15:43 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-filter/amavisd-new/ChangeLog,v 1.129 2008/12/01 20:54:32 dertobi123 Exp $ + +*amavisd-new-2.6.1-r1 (01 Dec 2008) + + 01 Dec 2008; Tobias Scherbaum <dertobi123@gentoo.org> metadata.xml, + +amavisd-new-2.6.1-r1.ebuild: + Revbump, move has_version logic into USE flags and disable spam-checking if + spamassassin isn't available (bug #235912 - somewhat) 20 Nov 2008; Jeroen Roovers <jer@gentoo.org> amavisd-new-2.6.1.ebuild: Marked ~hppa too (thanks to LuckyLuke). diff --git a/mail-filter/amavisd-new/amavisd-new-2.6.1-r1.ebuild b/mail-filter/amavisd-new/amavisd-new-2.6.1-r1.ebuild new file mode 100644 index 000000000000..71761edb12e0 --- /dev/null +++ b/mail-filter/amavisd-new/amavisd-new-2.6.1-r1.ebuild @@ -0,0 +1,195 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/amavisd-new/amavisd-new-2.6.1-r1.ebuild,v 1.1 2008/12/01 20:54:32 dertobi123 Exp $ + +inherit eutils + +DESCRIPTION="High-performance interface between the MTA and content checkers." +HOMEPAGE="http://www.ijs.si/software/amavisd/" +SRC_URI="http://www.ijs.si/software/amavisd/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86" +IUSE="courier dkim ldap milter mysql postgres qmail razor spamassassin" + +DEPEND=">=sys-apps/sed-4 + >=dev-lang/perl-5.8.2 + milter? ( || ( mail-filter/libmilter >=mail-mta/sendmail-8.12 ) )" + +RDEPEND="${DEPEND} + >=sys-apps/coreutils-5.0-r3 + app-arch/gzip + app-arch/bzip2 + app-arch/arc + app-arch/cabextract + app-arch/freeze + app-arch/lha + app-arch/unarj + || ( app-arch/unrar app-arch/rar ) + app-arch/zoo + >=dev-perl/Archive-Zip-1.14 + >=virtual/perl-Compress-Zlib-1.35 + dev-perl/Convert-TNEF + >=dev-perl/Convert-UUlib-1.08 + virtual/perl-MIME-Base64 + >=dev-perl/MIME-tools-5.415 + >=dev-perl/MailTools-1.58 + >=dev-perl/net-server-0.91 + virtual/perl-Digest-MD5 + dev-perl/IO-stringy + >=virtual/perl-Time-HiRes-1.49 + dev-perl/Unix-Syslog + >=sys-libs/db-3.2 + dev-perl/BerkeleyDB + virtual/mta + ldap? ( >=dev-perl/perl-ldap-0.33 ) + mysql? ( dev-perl/DBD-mysql ) + postgres? ( dev-perl/DBD-Pg ) + dkim? ( >=dev-perl/Mail-DKIM-0.31 ) + razor? ( mail-filter/razor ) + spamassassin? ( mail-filter/spamassassin )" + +AMAVIS_ROOT="/var/amavis" + +src_unpack() { + unpack ${A} + cd "${S}" + + if use courier ; then + epatch amavisd-new-courier.patch + fi + + if use qmail ; then + epatch amavisd-new-qmqpqq.patch + fi + + epatch "${FILESDIR}/${PN}-2.4.4-amavisd.conf-gentoo.patch" + + if ! use dkim ; then + epatch "${FILESDIR}/${PN}-dkimconf.patch" + fi +} + +src_compile() { + if use milter ; then + cd "${S}/helper-progs" + + econf --with-runtime-dir=${AMAVIS_ROOT} \ + --with-sockname=${AMAVIS_ROOT}/amavisd.sock \ + --with-user=amavis || die "helper-progs econf failed" + emake || die "helper-progs compile problem" + + cd "${S}" + fi +} + +src_install() { + dosbin amavisd amavisd-agent amavisd-nanny amavisd-release + dobin p0f-analyzer.pl + + insinto /etc + insopts -m0640 + newins amavisd.conf-sample amavisd.conf + + dosed "s:^#\\?\\\$MYHOME[^;]*;:\$MYHOME = '$AMAVIS_ROOT';:" \ + /etc/amavisd.conf + + newinitd "${FILESDIR}/amavisd.rc6" amavisd + dosed "s:/var/run/amavis/:$AMAVIS_ROOT/:g" /etc/init.d/amavisd + + keepdir ${AMAVIS_ROOT} + keepdir ${AMAVIS_ROOT}/db + keepdir ${AMAVIS_ROOT}/quarantine + keepdir ${AMAVIS_ROOT}/tmp + + newdoc test-messages/README README.samples + dodoc AAAREADME.first INSTALL MANIFEST RELEASE_NOTES README_FILES/README.* \ + test-messages/sample* amavisd.conf-default amavisd-agent \ + amavisd-custom.conf + + dodir /usr/share/doc/${PF}/html + insinto /usr/share/doc/${PF}/html + doins README_FILES/*.{html,css} + dodir /usr/share/doc/${PF}/html/images + insinto /usr/share/doc/${PF}/html/images + doins README_FILES/images/* + + if use milter ; then + cd "${S}/helper-progs" + einstall + cd "${S}" + fi + + for i in whitelist blacklist spam_lovers; do + if [ -f ${AMAVIS_ROOT}/${i} ]; then + cp "${AMAVIS_ROOT}/${i}" "${D}/${AMAVIS_ROOT}" + else + touch "${D}"/${AMAVIS_ROOT}/${i} + fi + done + + if use ldap ; then + elog "Adding ${P} schema to openldap schema dir." + dodir /etc/openldap/schema + insinto /etc/openldap/schema + insopts -o root -g root -m 644 + newins LDAP.schema ${PN}.schema || die + newins LDAP.schema ${PN}.schema.default || die + fi + + find "${D}"/${AMAVIS_ROOT} -name "*" -type d -exec chmod 0750 \{\} \; + find "${D}"/${AMAVIS_ROOT} -name "*" -type f -exec chmod 0640 \{\} \; +} + +pkg_preinst() { + enewgroup amavis + enewuser amavis -1 -1 ${AMAVIS_ROOT} amavis + + if [ -z "$(dnsdomainname)" ] ; then + dosed "s:^#\\?\\\$mydomain[^;]*;:\$mydomain = '$(hostname)';:" \ + /etc/amavisd.conf + else + dosed "s:^#\\?\\\$mydomain[^;]*;:\$mydomain = '$(dnsdomainname)';:" \ + /etc/amavisd.conf + fi + + if use razor ; then + if [ ! -d ${AMAVIS_ROOT}/.razor ] ; then + elog "Setting up initial razor config files..." + + razor-admin -create -home="${D}"/${AMAVIS_ROOT}/.razor + sed -i -e "s:debuglevel\([ ]*\)= .:debuglevel\1= 0:g" \ + "${D}"/${AMAVIS_ROOT}/.razor/razor-agent.conf + fi + fi + + if ! use spamassassin ; then + einfo "Disabling anti-spam code in amavisd.conf..." + + dosed "s:^#[\t ]*@bypass_spam_checks_maps[\t ]*=[\t ]*(1);:\@bypass_spam_checks_maps = (1);:" \ + /etc/amavisd.conf + fi +} + +pkg_postinst() { + if ! use spamassassin ; then + echo + elog "Amavisd-new no longer requires SpamAssassin, but no anti-spam checking" + elog "will be performed without it. Since you do not have SpamAssassin installed," + elog "all spam checks have been disabled. To enable them, install SpamAssassin" + elog "and comment out the line containing: " + elog "@bypass_spam_checks_maps = (1); in /etc/amavisd.conf." + fi + echo + ewarn "As of amavisd-new-2.4.5 p0f-analyzer.pl only binds to the loopback interface" + ewarn "by default instead of to all interfaces. You will need to change $bind_addr" + ewarn "in p0f-analyzer.pl to '0.0.0.0' if p0f-analyzer.pl is running on a different" + ewarn "host from amavisd or from other querying clients." + echo + ewarn "Adjusting permissions for /etc/amavisd.conf (0 for world, owner root:amavis)" + echo + chmod o-rwx /etc/amavisd.conf + chown root:amavis /etc/amavisd.conf + chown -R amavis:amavis ${AMAVIS_ROOT} +} diff --git a/mail-filter/amavisd-new/metadata.xml b/mail-filter/amavisd-new/metadata.xml index 763dd2fae15e..9059172b55aa 100644 --- a/mail-filter/amavisd-new/metadata.xml +++ b/mail-filter/amavisd-new/metadata.xml @@ -7,5 +7,9 @@ <flag name='courier'>Add support for usage with courierfilter</flag> <flag name='dkim'>Add optional Yahoo! DomainKey support</flag> <flag name='qmail'>Add support for qmail</flag> + <flag name='razor'>Configure mail-filter/razor, a distributed, collaborative + spam detection and filtering network for use with amavisd-new</flag> + <flag name='spamassassin'>Enable usage of mail-filter/spamassassin for spam + protection</flag> </use> </pkgmetadata> |