diff options
author | Seemant Kulleen <seemant@gentoo.org> | 2004-06-03 06:45:44 +0000 |
---|---|---|
committer | Seemant Kulleen <seemant@gentoo.org> | 2004-06-03 06:45:44 +0000 |
commit | b5acffb3a9a5cd4985a97163f9aa62c1b512660c (patch) | |
tree | cd5ae385059f6a2b068cec0dda9a0dbbc96af82c /mail-filter | |
parent | Moving to mail-filter/amavisd-new (diff) | |
download | historical-b5acffb3a9a5cd4985a97163f9aa62c1b512660c.tar.gz historical-b5acffb3a9a5cd4985a97163f9aa62c1b512660c.tar.bz2 historical-b5acffb3a9a5cd4985a97163f9aa62c1b512660c.zip |
Moved from net-mail/amavisd-new to mail-filter/amavisd-new.
Diffstat (limited to 'mail-filter')
-rw-r--r-- | mail-filter/amavisd-new/ChangeLog | 113 | ||||
-rw-r--r-- | mail-filter/amavisd-new/Manifest | 10 | ||||
-rw-r--r-- | mail-filter/amavisd-new/amavisd-new-20030616_p8.ebuild | 101 | ||||
-rw-r--r-- | mail-filter/amavisd-new/amavisd-new-20030616_p9.ebuild | 107 | ||||
-rw-r--r-- | mail-filter/amavisd-new/files/addr_extensions_in_sql.patch | 177 | ||||
-rw-r--r-- | mail-filter/amavisd-new/files/amavisd.rc6 | 18 | ||||
-rw-r--r-- | mail-filter/amavisd-new/files/digest-amavisd-new-20030616_p8 | 1 | ||||
-rw-r--r-- | mail-filter/amavisd-new/files/digest-amavisd-new-20030616_p9 | 1 | ||||
-rw-r--r-- | mail-filter/amavisd-new/files/lost_connection.patch | 13 | ||||
-rw-r--r-- | mail-filter/amavisd-new/files/sql_timeout.patch | 84 | ||||
-rw-r--r-- | mail-filter/amavisd-new/metadata.xml | 6 |
11 files changed, 631 insertions, 0 deletions
diff --git a/mail-filter/amavisd-new/ChangeLog b/mail-filter/amavisd-new/ChangeLog new file mode 100644 index 000000000000..c0fb21238eaa --- /dev/null +++ b/mail-filter/amavisd-new/ChangeLog @@ -0,0 +1,113 @@ +# ChangeLog for net-mail/amavisd-new +# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/amavisd-new/ChangeLog,v 1.1 2004/06/03 06:45:44 seemant Exp $ + +*amavisd-new-20030616_p8 (02 Jun 2004) + + 02 Jun 2004; Seemant Kulleen <seemant@gentoo.org> +metadata.xml, + +files/addr_extensions_in_sql.patch, +files/amavisd.rc6, + +files/lost_connection.patch, +files/sql_timeout.patch, + +amavisd-new-20030616_p8.ebuild, +amavisd-new-20030616_p9.ebuild: + Moved from net-mail/amavisd-new to mail-filter/amavisd-new. + + 26 Apr 2004; Aron Griffis <agriffis@gentoo.org> + amavisd-new-20030616_p8.ebuild, amavisd-new-20030616_p9.ebuild: + Add die following econf for bug 48950 + + 24 Apr 2004; Max Kalika <max@gentoo.org> amavisd-new-20030616_p9.ebuild: + Remove some optional compression dependencies. Fixes bug 33883. + +*amavisd-new-20030616_p9 (24 Apr 2004) + + 24 Apr 2004; Max Kalika <max@gentoo.org> amavisd-new-20030616_p7.ebuild, + amavisd-new-20030616_p9.ebuild, files/addr_extensions_in_sql.patch, + files/lost_connection.patch, files/sql_timeout.patch, + files/uid-as-string.patch: + Bump to version _p9. Add 3 patches: allow address extensions (for virus, spam, + banned mails to go to a + address) in per-user SQL policies; catch another SQL + server going away error; add sql_timeout setting for allowing SQL server + reconnection after a configured period. + + 15 Mar 2004; Max Kalika <max@gentoo.org> amavisd-new-20030616_p8.ebuild: + Bump to stable x86. + + 10 Mar 2004; Max Kalika <max@gentoo.org> amavisd-new-20030616_p8.ebuild, + metadata.xml: + Remove patch -- was accepted upstream for this version. Add antivirus herd to + metadata.xml. + +*amavisd-new-20030616_p8 (09 Mar 2004) + + 09 Mar 2004; Max Kalika <max@gentoo.org> amavisd-new-20030616_p4.ebuild, + amavisd-new-20030616_p5.ebuild, amavisd-new-20030616_p6.ebuild, + amavisd-new-20030616_p8.ebuild: + Bump to version 20030616_p8. Clean up old ebuilds. + + 29 Feb 2004; Jason Wever <weeve@gentoo.org> amavisd-new-20030616_p7.ebuild: + squash tested, ~sparc approved. + +*amavisd-new-20030616_p7 (14 Jan 2004) + + 14 Jan 2004; Max Kalika <max@gentoo.org> amavisd-new-20030616_p4.ebuild, + amavisd-new-20030616_p5.ebuild, amavisd-new-20030616_p6.ebuild, + amavisd-new-20030616_p7.ebuild, files/uid-as-string.patch: + Bump to version 20030616_p7. Add patch to treat the sql user id as string. + + 12 Nov 2003; <max@gentoo.org> amavisd-new-20030616_p4.ebuild, + amavisd-new-20030616_p5.ebuild, amavisd-new-20030616_p6.ebuild: + Fix milter socket path. + +*amavisd-new-20030616_p6 (10 Nov 2003) + + 10 Nov 2003; <max@gentoo.org> amavisd-new-20030616_p6.ebuild: + Bump to version 20030616_p6. + + 03 Nov 2003; Max Kalika <max@gentoo.org> amavisd-new-20030616_p4.ebuild, + amavisd-new-20030616_p5.ebuild: + Fileutils is obsolete. Depend on coreutils. + + 30 Oct 2003; Max Kalika <max@gentoo.org> amavisd-new-20030616_p4.ebuild, + amavisd-new-20030616_p5.ebuild, files/amavisd.rc6: + Bump to stable x86. + +*amavisd-new-20030616_p5 (26 Aug 2003) + + 26 Aug 2003; Max Kalika <max@gentoo.org> amavisd-new-20030616_p5.ebuild: + Bump to version 20030616_p5. + +*amavisd-new-20030616_p4 (16 Aug 2003) + + 16 Aug 2003; Max Kalika <max@gentoo.org> amavisd-new-20030616_p2.ebuild, + amavisd-new-20030616_p4.ebuild: + Bump version to 20030616-p4. + + 21 Jul 2003; Max Kalika <max@gentoo.org> amavisd-new-20030616_p2.ebuild: + Force libnet RDEPEND to 1.12 as it requires Net::SMTP version 2.24 which is + first available in that package. + + 15 Jul 2003; Max Kalika <max@gentoo.org> amavisd-new-20030314_p2.ebuild, + amavisd-new-20030616.ebuild, amavisd-new-20030616_p2.ebuild: + Fix postgres depend. + +*amavisd-new-20030616_p2 (30 Jun 2003) + + 30 Jun 2003; Max Kalika <max@gentoo.org> amavisd-new-20030616_p2.ebuild: + Bump version to 20030616_p2. + + 26 Jun 2003; Max Kalika <max@gentoo.org> amavisd-new-20030314_p2.ebuild, + amavisd-new-20030616.ebuild: + Fix proper USE flag syntax. + +*amavisd-new-20030616 (23 Jun 2003) + + 23 Jun 2003; Max Kalika <max@gentoo.org> amavisd-new-20030314_p2.ebuild, + amavisd-new-20030616.ebuild: + Bump version to 20030616. Drop the no-longer-needed ldap patch. Drop + spamassassin use flag and force spamassassin dependency. Add temporary sed fix + as advised by the release note. Fix econf parameters for both versions. + +*amavisd-new-20030314_p2 (12 Jun 2003) + + 12 Jun 2003; Max Kalika <max@gentoo.org> amavisd-new-20030314_p2.ebuild: + Initial version. + diff --git a/mail-filter/amavisd-new/Manifest b/mail-filter/amavisd-new/Manifest new file mode 100644 index 000000000000..b759e1449ea1 --- /dev/null +++ b/mail-filter/amavisd-new/Manifest @@ -0,0 +1,10 @@ +MD5 1f1f4cf9c92f92f966361a8ac08aa543 files/amavisd.rc6 305 +MD5 0c677a1cb17705ea75841cabd5d14634 files/digest-amavisd-new-20030616_p8 75 +MD5 f45025857b1aaeeb225782bf7f35c5c3 files/addr_extensions_in_sql.patch 10222 +MD5 0a2364d819d448c49ea72dfe8c2a109a files/digest-amavisd-new-20030616_p9 75 +MD5 b9ac0b985d0cb7da0ab45fa22ebe38c8 files/lost_connection.patch 567 +MD5 3256d64018bee64fa34ed62fb93e44af files/sql_timeout.patch 3282 +MD5 7f1cfdf2c440b5fbe641896ce05ce61c ChangeLog 4130 +MD5 2d5e57cf8d2e3fe7f732094202816f39 amavisd-new-20030616_p8.ebuild 2589 +MD5 8ea5e2ba914fdb717d548ff5f1164959 amavisd-new-20030616_p9.ebuild 2855 +MD5 7e32edfd72887a57b16ecd73f0f7a1a0 metadata.xml 184 diff --git a/mail-filter/amavisd-new/amavisd-new-20030616_p8.ebuild b/mail-filter/amavisd-new/amavisd-new-20030616_p8.ebuild new file mode 100644 index 000000000000..39084a8c090b --- /dev/null +++ b/mail-filter/amavisd-new/amavisd-new-20030616_p8.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/amavisd-new/amavisd-new-20030616_p8.ebuild,v 1.1 2004/06/03 06:45:44 seemant 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/${PN}-${PV/_/-}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="x86 ~amd64 ~sparc" +IUSE="ldap mysql postgres milter" + +DEPEND=">=sys-apps/sed-4" + +RDEPEND="${DEPEND} + >=sys-apps/coreutils-5.0-r3 + app-arch/gzip + app-arch/bzip2 + app-arch/arc + app-arch/lha + app-arch/unarj + app-arch/unrar + app-arch/zoo + dev-perl/Archive-Tar + dev-perl/Archive-Zip + dev-perl/Compress-Zlib + dev-perl/Convert-TNEF + dev-perl/Convert-UUlib + dev-perl/MIME-Base64 + dev-perl/MIME-tools + >=dev-perl/MailTools-1.58 + dev-perl/net-server + >=dev-perl/libnet-1.12 + dev-perl/Digest-MD5 + dev-perl/IO-stringy + dev-perl/Time-HiRes + dev-perl/Unix-Syslog + dev-perl/Mail-SpamAssassin + virtual/mta + virtual/antivirus + ldap? ( dev-perl/perl-ldap ) + mysql? ( dev-perl/DBD-mysql ) + postgres? ( dev-perl/DBD-Pg ) + milter? ( >=mail-mta/sendmail-8.12 )" + +S="${WORKDIR}/${PN}-${PV/_*/}" + +src_compile() { + if use milter ; then + cd "${S}/helper-progs" + + econf --with-runtime-dir=/var/run/amavis \ + --with-sockname=/var/run/amavis/amavisd.sock \ + --with-user=amavis || die "econf failed" + emake || die "compile problem" + + cd "${S}" + fi +} + +src_install() { + enewgroup amavis + enewuser amavis -1 /bin/false /var/lib/amavis amavis + + dosbin amavisd + + insinto /etc + doins amavisd.conf + dosed "s:^#\\?\\\$MYHOME[^;]*;:\$MYHOME = '/var/run/amavis';:" \ + /etc/amavisd.conf + dosed "s:^#\\?\\\$daemon_user[^;]*;:\$daemon_user = 'amavis';:" \ + /etc/amavisd.conf + dosed "s:^#\\?\\\$daemon_group[^;]*;:\$daemon_group = 'amavis';:" \ + /etc/amavisd.conf + if [ "$(domainname)" = "(none)" ] ; then + dosed "s:^#\\?\\\$mydomain[^;]*;:\$mydomain = '$(hostname)';:" \ + /etc/amavisd.conf + else + dosed "s:^#\\?\\\$mydomain[^;]*;:\$mydomain = '$(domainname)';:" \ + /etc/amavisd.conf + fi + + exeinto /etc/init.d + newexe "${FILESDIR}/amavisd.rc6" amavisd + + keepdir /var/spool/amavis /var/run/amavis + fowners amavis:amavis /var/spool/amavis /var/run/amavis + fperms 0750 /var/spool/amavis /var/run/amavis + + newdoc test-messages/README README.samples + dodoc AAAREADME.first INSTALL LDAP.schema LICENSE MANIFEST RELEASE_NOTES \ + README_FILES/* test-messages/sample-* + + if use milter ; then + cd "${S}/helper-progs" + einstall + fi +} diff --git a/mail-filter/amavisd-new/amavisd-new-20030616_p9.ebuild b/mail-filter/amavisd-new/amavisd-new-20030616_p9.ebuild new file mode 100644 index 000000000000..2d8dea02f375 --- /dev/null +++ b/mail-filter/amavisd-new/amavisd-new-20030616_p9.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/amavisd-new/amavisd-new-20030616_p9.ebuild,v 1.1 2004/06/03 06:45:44 seemant 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/${PN}-${PV/_/-}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64 ~sparc" +IUSE="ldap mysql postgres milter" + +DEPEND=">=sys-apps/sed-4" + +RDEPEND="${DEPEND} + >=sys-apps/coreutils-5.0-r3 + app-arch/gzip + app-arch/bzip2 + dev-perl/Archive-Tar + dev-perl/Archive-Zip + dev-perl/Compress-Zlib + dev-perl/Convert-TNEF + dev-perl/Convert-UUlib + dev-perl/MIME-Base64 + dev-perl/MIME-tools + >=dev-perl/MailTools-1.58 + dev-perl/net-server + >=dev-perl/libnet-1.12 + dev-perl/Digest-MD5 + dev-perl/IO-stringy + dev-perl/Time-HiRes + dev-perl/Unix-Syslog + dev-perl/Mail-SpamAssassin + virtual/mta + virtual/antivirus + ldap? ( dev-perl/perl-ldap ) + mysql? ( dev-perl/DBD-mysql ) + postgres? ( dev-perl/DBD-Pg ) + milter? ( >=mail-mta/sendmail-8.12 )" + +S="${WORKDIR}/${PN}-${PV/_*/}" + +src_unpack() { + unpack ${A} && cd "${S}" + + # Allow address extension policies in per-user SQL lookups. + epatch "${FILESDIR}/addr_extensions_in_sql.patch" + # Add an SQL server timeout/reconnect setting. + epatch "${FILESDIR}/sql_timeout.patch" + # Catch an extra SQL server disconnection error. + epatch "${FILESDIR}/lost_connection.patch" +} + +src_compile() { + if use milter ; then + cd "${S}/helper-progs" + + econf --with-runtime-dir=/var/run/amavis \ + --with-sockname=/var/run/amavis/amavisd.sock \ + --with-user=amavis || die "econf failed" + emake || die "compile problem" + + cd "${S}" + fi +} + +src_install() { + enewgroup amavis + enewuser amavis -1 /bin/false /var/lib/amavis amavis + + dosbin amavisd + + insinto /etc + doins amavisd.conf + dosed "s:^#\\?\\\$MYHOME[^;]*;:\$MYHOME = '/var/run/amavis';:" \ + /etc/amavisd.conf + dosed "s:^#\\?\\\$daemon_user[^;]*;:\$daemon_user = 'amavis';:" \ + /etc/amavisd.conf + dosed "s:^#\\?\\\$daemon_group[^;]*;:\$daemon_group = 'amavis';:" \ + /etc/amavisd.conf + if [ "$(domainname)" = "(none)" ] ; then + dosed "s:^#\\?\\\$mydomain[^;]*;:\$mydomain = '$(hostname)';:" \ + /etc/amavisd.conf + else + dosed "s:^#\\?\\\$mydomain[^;]*;:\$mydomain = '$(domainname)';:" \ + /etc/amavisd.conf + fi + + exeinto /etc/init.d + newexe "${FILESDIR}/amavisd.rc6" amavisd + + keepdir /var/spool/amavis /var/run/amavis + fowners amavis:amavis /var/spool/amavis /var/run/amavis + fperms 0750 /var/spool/amavis /var/run/amavis + + newdoc test-messages/README README.samples + dodoc AAAREADME.first INSTALL LDAP.schema LICENSE MANIFEST RELEASE_NOTES \ + README_FILES/* test-messages/sample-* + + if use milter ; then + cd "${S}/helper-progs" + einstall + fi +} diff --git a/mail-filter/amavisd-new/files/addr_extensions_in_sql.patch b/mail-filter/amavisd-new/files/addr_extensions_in_sql.patch new file mode 100644 index 000000000000..6ba4fac5f48b --- /dev/null +++ b/mail-filter/amavisd-new/files/addr_extensions_in_sql.patch @@ -0,0 +1,177 @@ +--- amavisd 2004-03-08 18:21:43.000000000 -0800 ++++ amavisd 2004-04-08 11:25:37.000000000 -0700 +@@ -4925,7 +4925,8 @@ + $bypass_banned_checks_sql $bypass_header_checks_sql + $spam_tag_level_sql $spam_tag2_level_sql $spam_kill_level_sql + $spam_modifies_subj_sql $local_domains_sql $wb_listed_sql +- $spam_quarantine_to_sql); ++ $spam_quarantine_to_sql $addr_extension_spam_sql ++ $addr_extension_virus_sql $addr_extension_banned_sql); + + use vars qw($default_ldap $user_id_ldap + $virus_lovers_ldap $spam_lovers_ldap +@@ -5074,21 +5075,24 @@ + # B0: boolean, nonexistent field treated as false, + # B1: boolean, nonexistent field treated as true + my $nf = sub {Amavis::Lookup::SQLfield->new($sql_policy,@_)}; #shorthand +- $user_id_sql = $nf->('id', 'S'); +- $virus_lovers_sql = $nf->('virus_lover', 'B0'); +- $spam_lovers_sql = $nf->('spam_lover', 'B-'); +- $banned_files_lovers_sql= $nf->('banned_files_lover', 'B-'); +- $bad_header_lovers_sql = $nf->('bad_header_lover', 'B-'); +- $bypass_virus_checks_sql= $nf->('bypass_virus_checks', 'B0'); +- $bypass_spam_checks_sql = $nf->('bypass_spam_checks', 'B0'); +- $bypass_banned_checks_sql=$nf->('bypass_banned_checks','B-'); +- $bypass_header_checks_sql=$nf->('bypass_header_checks','B-'); +- $spam_tag_level_sql = $nf->('spam_tag_level', 'N' ); +- $spam_tag2_level_sql = $nf->('spam_tag2_level', 'N' ); +- $spam_kill_level_sql = $nf->('spam_kill_level', 'N' ); +- $spam_modifies_subj_sql = $nf->('spam_modifies_subj', 'B-'); +- $spam_quarantine_to_sql = $nf->('spam_quarantine_to', 'S-'); +- $local_domains_sql = $nf->('local', 'B1'); ++ $user_id_sql = $nf->('id', 'S'); ++ $virus_lovers_sql = $nf->('virus_lover', 'B0'); ++ $spam_lovers_sql = $nf->('spam_lover', 'B-'); ++ $banned_files_lovers_sql = $nf->('banned_files_lover', 'B-'); ++ $bad_header_lovers_sql = $nf->('bad_header_lover', 'B-'); ++ $bypass_virus_checks_sql = $nf->('bypass_virus_checks', 'B0'); ++ $bypass_spam_checks_sql = $nf->('bypass_spam_checks', 'B0'); ++ $bypass_banned_checks_sql= $nf->('bypass_banned_checks', 'B-'); ++ $bypass_header_checks_sql= $nf->('bypass_header_checks', 'B-'); ++ $spam_tag_level_sql = $nf->('spam_tag_level', 'N' ); ++ $spam_tag2_level_sql = $nf->('spam_tag2_level', 'N' ); ++ $spam_kill_level_sql = $nf->('spam_kill_level', 'N' ); ++ $spam_modifies_subj_sql = $nf->('spam_modifies_subj', 'B-'); ++ $spam_quarantine_to_sql = $nf->('spam_quarantine_to', 'S-'); ++ $addr_extension_spam_sql = $nf->('addr_extension_spam', 'S-'); ++ $addr_extension_virus_sql= $nf->('addr_extension_virus', 'S-'); ++ $addr_extension_banned_sql=$nf->('addr_extension_banned','S-'); ++ $local_domains_sql = $nf->('local', 'B1'); + section_time('sql-prepare'); + } + } +@@ -5534,8 +5538,12 @@ + $r->recip_done(1); + } + # add address extensions if enabled and passing the message +- my($ext) = @virusname ? $addr_extension_virus +- : @banned_filename ? $addr_extension_banned : ''; ++ my($ext) = @virusname ++ ? lookup($r->recip_addr, $addr_extension_virus_sql, ++ $addr_extension_virus) ++ : @banned_filename ++ ? lookup($r->recip_addr, $addr_extension_virus_sql, ++ $addr_extension_banned) : ''; + if ($recipient_delimiter ne '' && $ext ne '' && + $r->recip_destiny == D_PASS && + lookup($r->recip_addr, $local_domains_sql, +@@ -5589,8 +5597,9 @@ + $r->recip_done(1); + } + # add address extensions if enabled and passing the message +- if ($recipient_delimiter ne '' && +- $addr_extension_spam ne '' && ++ my($ext) = lookup($r->recip_addr, $addr_extension_spam_sql, ++ $addr_extension_spam); ++ if ($recipient_delimiter ne '' && $ext ne '' && + $r->recip_destiny == D_PASS && + lookup($r->recip_addr, $local_domains_sql, + $local_domains_ldap, \%local_domains, +@@ -5604,9 +5613,9 @@ + s/^(.*?)\Q$recipient_delimiter\E.*$(?!\n)/$1/s; + } + do_log(5,"adding extension $recipient_delimiter". +- "$addr_extension_spam to $localpart\@$domain"); ++ "$ext to $localpart\@$domain"); + $r->recip_addr_modified($localpart. +- $recipient_delimiter.$addr_extension_spam.$domain); ++ $recipient_delimiter.$ext.$domain); + } + } + if ($considered_spam_by_some_recips) { +--- amavisd.conf 2004-04-08 11:32:15.000000000 -0700 ++++ amavisd.conf 2004-04-08 11:47:02.000000000 -0700 +@@ -853,6 +853,11 @@ + # $addr_extension_spam = 'spam'; # (default is undef, same as empty) + # $addr_extension_banned = 'banned'; # (default is undef, same as empty) + ++# Alternatively, these can be configured as a per-recipient lookup and/or ++# overridden by an SQL policy. ++# $addr_extension_virus = new_RE( # per-recip multiple quarantines ++# [qr'^(.*)@example\.com$'i => 'virus'], ++# [qr/.*/ => 'filtered'] ); + + # Delimiter between local part of the recipient address and address extension + # (which can optionally be added, see variables $addr_extension_virus and +--- README_FILES/README.lookups 2004-04-08 11:32:15.000000000 -0700 ++++ README_FILES/README.lookups 2004-04-08 11:45:11.000000000 -0700 +@@ -444,24 +444,29 @@ + id int unsigned NOT NULL auto_increment, + policy_name varchar(32), -- not used by amavisd-new + +- virus_lover char(1), -- Y/N +- spam_lover char(1), -- Y/N (optional field) +- banned_files_lover char(1), -- Y/N (optional field) +- bad_header_lover char(1), -- Y/N (optional field) +- +- bypass_virus_checks char(1), -- Y/N +- bypass_spam_checks char(1), -- Y/N +- bypass_banned_checks char(1), -- Y/N (optional field) +- bypass_header_checks char(1), -- Y/N (optional field) ++ virus_lover char(1), -- Y/N ++ spam_lover char(1), -- Y/N (optional field) ++ banned_files_lover char(1), -- Y/N (optional field) ++ bad_header_lover char(1), -- Y/N (optional field) ++ ++ bypass_virus_checks char(1), -- Y/N ++ bypass_spam_checks char(1), -- Y/N ++ bypass_banned_checks char(1), -- Y/N (optional field) ++ bypass_header_checks char(1), -- Y/N (optional field) + +- spam_modifies_subj char(1), -- Y/N (optional field) +- spam_quarantine_to varchar(64) DEFAULT NULL, -- (optional field) ++ spam_modifies_subj char(1), -- Y/N (optional field) ++ spam_quarantine_to varchar(64) DEFAULT NULL, -- (optional field) + spam_tag_level float, -- higher score inserts spam info headers + spam_tag2_level float DEFAULT NULL, -- higher score inserts + -- 'declared spam' info header fields + spam_kill_level float, -- higher score activates evasive actions, e.g. + -- reject/drop, quarantine, ... + -- (subject to final_spam_destiny setting) ++ ++ addr_extension_virus varchar(64) DEFAULT NULL, -- (optional field) ++ addr_extension_spam varchar(64) DEFAULT NULL, -- (optional field) ++ addr_extension_banned varchar(64) DEFAULT NULL, -- (optional field) ++ + PRIMARY KEY (id) + ); + +@@ -487,17 +492,17 @@ + + -- INSERT INTO users VALUES (20, 0, 5, '@.', NULL); -- catchall + +-INSERT INTO policy VALUES (1, 'Non-paying', 'N','N','N','N', 'Y','Y','Y','N', 'Y',NULL, 3.0, 7, 10); +-INSERT INTO policy VALUES (2, 'Uncensored', 'Y','Y','Y','Y', 'N','N','N','N', 'N',NULL, 3.0, 999, 999); +-INSERT INTO policy VALUES (3, 'Wants all spam','N','Y','N','N', 'N','N','N','N', 'Y',NULL, 3.0, 999, 999); +-INSERT INTO policy VALUES (4, 'Wants viruses', 'Y','N','Y','Y', 'N','N','N','N', 'Y',NULL, 3.0, 6.9, 6.9); +-INSERT INTO policy VALUES (5, 'Normal', 'N','N','N','N', 'N','N','N','N', 'Y',NULL, 3.0, 6.9, 6.9); +-INSERT INTO policy VALUES (6, 'Trigger happy', 'N','N','N','N', 'N','N','N','N', 'Y',NULL, 3.0, 5, 5); +-INSERT INTO policy VALUES (7, 'Permissive', 'N','N','N','Y', 'N','N','N','N', 'Y',NULL, 3.0, 10, 20); +-INSERT INTO policy VALUES (8, '6.5/7.8', 'N','N','N','N', 'N','N','N','N', 'N',NULL, 3.0, 6.5, 7.8); +-INSERT INTO policy VALUES (9, 'userB', 'N','N','N','Y', 'N','N','N','N', 'Y',NULL, 3.0, 6.3, 6.3); +-INSERT INTO policy VALUES (10,'userC', 'N','N','N','N', 'N','N','N','N', 'N',NULL, 3.0, 6.0, 6.0); +-INSERT INTO policy VALUES (11,'userD', 'Y','N','Y','Y', 'N','N','N','N', 'N',NULL, 3.0, 7, 7); ++INSERT INTO policy VALUES (1, 'Non-paying', 'N','N','N','N', 'Y','Y','Y','N', 'Y',NULL, 3.0, 7, 10, 'viruses', NULL, NULL); ++INSERT INTO policy VALUES (2, 'Uncensored', 'Y','Y','Y','Y', 'N','N','N','N', 'N',NULL, 3.0, 999, 999, NULL, 'spam', NULL); ++INSERT INTO policy VALUES (3, 'Wants all spam','N','Y','N','N', 'N','N','N','N', 'Y',NULL, 3.0, 999, 999, NULL, 'spam', 'banned); ++INSERT INTO policy VALUES (4, 'Wants viruses', 'Y','N','Y','Y', 'N','N','N','N', 'Y',NULL, 3.0, 6.9, 6.9, 'junk', 'junk', 'junk'); ++INSERT INTO policy VALUES (5, 'Normal', 'N','N','N','N', 'N','N','N','N', 'Y',NULL, 3.0, 6.9, 6.9, NULL, NULL, NULL); ++INSERT INTO policy VALUES (6, 'Trigger happy', 'N','N','N','N', 'N','N','N','N', 'Y',NULL, 3.0, 5, 5, NULL, NULL, NULL); ++INSERT INTO policy VALUES (7, 'Permissive', 'N','N','N','Y', 'N','N','N','N', 'Y',NULL, 3.0, 10, 20, NULL, NULL, NULL); ++INSERT INTO policy VALUES (8, '6.5/7.8', 'N','N','N','N', 'N','N','N','N', 'N',NULL, 3.0, 6.5, 7.8, NULL, NULL, NULL); ++INSERT INTO policy VALUES (9, 'userB', 'N','N','N','Y', 'N','N','N','N', 'Y',NULL, 3.0, 6.3, 6.3, NULL, NULL, NULL); ++INSERT INTO policy VALUES (10,'userC', 'N','N','N','N', 'N','N','N','N', 'N',NULL, 3.0, 6.0, 6.0, NULL, NULL, NULL); ++INSERT INTO policy VALUES (11,'userD', 'Y','N','Y','Y', 'N','N','N','N', 'N',NULL, 3.0, 7, 7, NULL, NULL, NULL); + + -- sender envelope addresses needed for white/blacklisting + INSERT INTO mailaddr VALUES ( 1, 5, '@example.com'); diff --git a/mail-filter/amavisd-new/files/amavisd.rc6 b/mail-filter/amavisd-new/files/amavisd.rc6 new file mode 100644 index 000000000000..f076cfa145d7 --- /dev/null +++ b/mail-filter/amavisd-new/files/amavisd.rc6 @@ -0,0 +1,18 @@ +#!/sbin/runscript + +depend() { + need net logger + before mta +} + +start() { + ebegin "Starting amavisd-new" + start-stop-daemon --start --quiet --exec /usr/sbin/amavisd + eend $? +} + +stop() { + ebegin "Stopping amavisd-new" + start-stop-daemon --stop --quiet --pidfile /var/run/amavis/amavisd.pid + eend $? +} diff --git a/mail-filter/amavisd-new/files/digest-amavisd-new-20030616_p8 b/mail-filter/amavisd-new/files/digest-amavisd-new-20030616_p8 new file mode 100644 index 000000000000..7e4aded4e501 --- /dev/null +++ b/mail-filter/amavisd-new/files/digest-amavisd-new-20030616_p8 @@ -0,0 +1 @@ +MD5 5b55cef4ef4cc717b9ee1ed204a1ed96 amavisd-new-20030616-p8.tar.gz 328420 diff --git a/mail-filter/amavisd-new/files/digest-amavisd-new-20030616_p9 b/mail-filter/amavisd-new/files/digest-amavisd-new-20030616_p9 new file mode 100644 index 000000000000..9a8e116e9317 --- /dev/null +++ b/mail-filter/amavisd-new/files/digest-amavisd-new-20030616_p9 @@ -0,0 +1 @@ +MD5 4c96fadc57a5de84cc3bc6b548b46aff amavisd-new-20030616-p9.tar.gz 363756 diff --git a/mail-filter/amavisd-new/files/lost_connection.patch b/mail-filter/amavisd-new/files/lost_connection.patch new file mode 100644 index 000000000000..d9e75cad6208 --- /dev/null +++ b/mail-filter/amavisd-new/files/lost_connection.patch @@ -0,0 +1,13 @@ +--- amavisd 2004-03-08 18:21:43.000000000 -0800 ++++ amavisd 2004-04-08 11:25:37.000000000 -0700 +@@ -6985,7 +6985,9 @@ + my($err) = $@; + do_log(0, "lookup_sql: $DBI::err, $DBI::errstr"); + if ($sth && ($sth->err eq '2006' || # MySQL server has gone away +- $sth->errstr =~ /\bserver has gone away\b/)) { ++ $sth->errstr =~ /\bserver has gone away\b/ || ++ $sth->err eq '2013' || ++ $sth->errstr =~ /\bLost connection to\b/)) { + do_log(0,"NOTICE: Disconnected from SQL server"); + $sql_connected = 0; $self->{dbh}->disconnect; + } diff --git a/mail-filter/amavisd-new/files/sql_timeout.patch b/mail-filter/amavisd-new/files/sql_timeout.patch new file mode 100644 index 000000000000..364d67a9887c --- /dev/null +++ b/mail-filter/amavisd-new/files/sql_timeout.patch @@ -0,0 +1,84 @@ +diff -ruN amavisd.orig/amavisd amavisd-new-20030616/amavisd +--- amavisd.orig/amavisd 2004-04-16 08:15:39.000000000 -0700 ++++ amavisd-new-20030616/amavisd 2004-04-16 08:16:47.000000000 -0700 +@@ -191,7 +191,7 @@ + %blacklist_sender @blacklist_sender_acl $blacklist_sender_re + $per_recip_blacklist_sender_lookup_tables + $viruses_that_fake_sender_re +- @lookup_sql_dsn $sql_key_fieldname ++ @lookup_sql_dsn $sql_timeout $sql_key_fieldname + $sql_select_policy $sql_select_white_black_list + $enable_ldap $default_ldap $virus_lovers_ldap + $banned_files_lovers_ldap $bypass_virus_checks_ldap +@@ -337,6 +337,12 @@ + # ( ['DBI:mysql:mail:host1', 'some-username1', 'some-password1'], + # ['DBI:mysql:mail:host2', 'some-username2', 'some-password2'] ); + ++# The SQL timeout value specifies how long to wait before closing ++# and reopening a connection. The default is the MySQL default ++# connection timeout of 1 day. This timer is intialized once on ++# initial connection and is reset at every successful sql lookup. ++$sql_timeout = 60*60*24; ++ + # The SQL select clause to fetch per-recipient policy settings + # The %k will be replaced by a comma-separated list of query addresses + # (e.g. full address, domain only, catchall). Use ORDER, if there +@@ -6824,7 +6830,7 @@ + import Amavis::rfc2821_2822_Tools qw(split_address split_localpart); + } + +-use vars qw($sql_connected); ++use vars qw($sql_connected $sql_timestamp); + + # Connect to a database. Take a list of database connection + # parameters and try each until one succeeds. +@@ -6844,7 +6850,10 @@ + } + do_log(0, "connect_to_sql: unable to connect to any DSN at all!" + ) if !$dbh && @dsns>1; +- $sql_connected = 1 if $dbh; ++ if ($dbh) { ++ $sql_connected = 1; ++ $sql_timestamp = time; ++ } + $dbh; + } + +@@ -6915,6 +6924,13 @@ + } + return $match; + } ++ if ($sql_timeout && (time - $sql_timestamp > $sql_timeout)) { ++ if ($sql_connected) { ++ $self->{dbh}->disconnect; ++ do_log(4, "lookup_sql: connection timed out, reconnecting"); ++ } ++ $self->{dbh} = $sql_connected = undef; ++ } + if (!$sql_connected) { + my($sql_dbh) = connect_to_sql(@lookup_sql_dsn); + section_time('sql-connect'); +@@ -6980,6 +6996,7 @@ + last if $found; # first match wins, loop is for possible future use + } + $sth->finish(); ++ $sql_timestamp = time; + }; # eval + if ($@ ne '') { + my($err) = $@; +diff -ruN amavisd.orig/amavisd.conf amavisd-new-20030616/amavisd.conf +--- amavisd.orig/amavisd.conf 2004-04-16 08:15:39.000000000 -0700 ++++ amavisd-new-20030616/amavisd.conf 2004-04-16 08:27:20.000000000 -0700 +@@ -808,6 +808,12 @@ + # With PostgreSQL the dsn (first element of the triple) may look like: + # 'DBI:Pg:host=host1;dbname=mail' + ++# How long to maintain an SQL connection before attempting to reconnect? ++# This is used to prevent the SQL server from timing out the connection ++# on the backend and delaying mail due to requeueing. Set this to 0 or undef ++# to disable SQL reconnection attempts. The default is 1 day. ++# $sql_timeout = 60*60*24; ++ + # The SQL select clause to fetch per-recipient policy settings. + # The %k will be replaced by a comma-separated list of query addresses + # (e.g. full address, domain only, catchall). Use ORDER, if there diff --git a/mail-filter/amavisd-new/metadata.xml b/mail-filter/amavisd-new/metadata.xml new file mode 100644 index 000000000000..0f4f00996a87 --- /dev/null +++ b/mail-filter/amavisd-new/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>net-mail</herd> +<herd>antivirus</herd> +</pkgmetadata> |