--- /dev/null
+# 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.
+
--- /dev/null
+--- 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');