CVS: tmda/htdocs filter-sources.html,1.24,1.25 filter-sources.ht,1.8,1.9 config-vars.html,1.60,1.61 config-vars.ht,1.34,1.35 ChangeLog,1.167,1.168

Timothy Legant <[email protected]>
Newsgroups gmane.mail.spam.tmda.cvs
Message-ID <[email protected]>
Update of /cvsroot/tmda/tmda/htdocs
In directory sc8-pr-cvs1:/tmp/cvs-serv4926/htdocs

Modified Files:
	filter-sources.html filter-sources.ht config-vars.html 
	config-vars.ht ChangeLog 
Log Message:
Defaults.py: New variables DB_BARE_APPEND and DB_CONFIRM_APPEND.

FilterParser.py: Removed {from,to}-mysql code.  Moved
__create_sql_params method to module-level function create_sql_params.
Removed -domains argument and always add the domains into the keys.
Made the domains list contain only unique domains.

Util.py: New function 'db_insert' used by the DB_BARE_APPEND and
DB_CONFIRM_APPEND code.

tmda-inject: Added code to insert recipient into database using the
SQL code in DB_BARE_APPEND if both DB_BARE_APPEND and DB_CONNECTION
are set.  Mimics BARE_APPEND functionality.

tmda-rfilter: Added code to insert sender into database using the SQL
code in DB_CONFIRM_APPEND if both DB_CONFIRM_APPEND and DB_CONNECTION
are set.  Mimics CONFIRM_APPEND functionality. Made 'sender_list' in
main() contain only unique senders.

filter-sources.ht: Removed {from,to}-mysql documentation, moved
-domains documentation to top, since now it is default behavior.



Index: filter-sources.html
===================================================================
RCS file: /cvsroot/tmda/tmda/htdocs/filter-sources.html,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- filter-sources.html	9 Jul 2003 20:21:18 -0000	1.24
+++ filter-sources.html	11 Jul 2003 23:02:59 -0000	1.25
@@ -1,6 +1,6 @@
 <HTML>
 <!-- THIS PAGE IS AUTOMATICALLY GENERATED.  DO NOT EDIT. -->
-<!-- Wed Jul  9 15:11:18 2003 -->
+<!-- Thu Jul 10 23:53:37 2003 -->
 <!-- USING HT2HTML 1.2 -->
 <!-- SEE http://barry.wooz.org/software/ht2html -->
 <!-- User-specified headers:
@@ -190,22 +190,74 @@
 option, without the chevrons.
 <br><br>
 
+<strong>NOTE:</strong> <br>
+
+The <code>from*</code> and <code>to*</code> sources match against
+different addresses or sets of addresses depending on whether they are
+used in an incoming filter or an outgoing filter.<br><br>
+
+<table border="1" cellspacing="0">
+<tr><th>Source</th><th>Incoming Filter</th><th>Outgoing Filter</th></tr>
+<tr>
+  <th>from*</th>
+  <td><ul>
+      <li>envelope sender</li>
+      <li>From: header field</li>
+      <li>Reply-To: header field</li>
+      <li>X-Primary-Address header field if the <a
+      href="config-vars.html#PRIMARY_ADDRESS_MATCH">PRIMARY_ADDRESS_MATCH</a>
+      setting can be satisfied</li>
+      </ul>
+  </td>
+  <td><ul>
+      <li>From: header field
+      set by user's MUA</li>
+      </ul>
+  </td>
+</tr>
+<tr>
+  <th>to*</th>
+  <td><ul><li>envelope recipient</li></ul></td>
+  <td>One of:<ul>
+      <li>recipients on tmda-sendmail's command line</li>
+      <li>To: header field</li>
+      </ul>
+  </td>
+</tr>
+</table>
+
+<h3>Domain Search</h3>
+Domain names of the addresses given above are also used in the search.
+The portion after the first <code>@</code> in an e-mail address is
+considered the "domain". i.e,
+<blockquote><pre>
[email protected] -> mastaler.com
[email protected] -> cs.yale.edu
+</blockquote></pre>
+Domains must be listed one per line when used in a file. e.g,
+<blockquote><pre>
+wingnet.net
+mastaler.com
+tmda.net
+cs.yale.edu
+</blockquote></pre>
+
+The matching is exact. This isn't wildcarding, so with the above list, 
+<code>[email protected]</code> <strong>would</strong> match, but 
+<code>[email protected]</code> <strong>would not</strong> match.  
+You'd have to add <code>wopr.cs.yale.edu</code> to the list first.<br><br>
+
+This feature may be useful for sites that wish to check a large number
+of domain names, but don't want the overhead of the wildcard
+code. This feature is less flexible than wildcarding, but is much
+faster since the list of domains can be stored in a CDB or DBM (either directly, 
+or by using <code>-autocdb</code> / <code>-autodbm</code>).
+
+<h3>Sources</h3>
 This group of sources may be used in either incoming or outgoing
 filter files.
 <br><br>
 
-<strong>NOTE:</strong> <br>
-
-In order to find a match, the <code>from-*</code> sources examine the
-envelope sender address, any addresses in the From header field (not the UNIX
-mbox separator From_), any addresses in the Reply-To header field, and
-the address in the X-Primary-Address header field if the 
-<a href="config-vars.html#PRIMARY_ADDRESS_MATCH">PRIMARY_ADDRESS_MATCH</a>
-setting can be satisfied.
-<br><br>
-The <code>to-*</code> sources examine the envelope recipient address but
-<i>not</i> the To header field, which is often bogus in spam email.
-<br><br>
 <dl>
   <dt> <code> from <a href="#email_address">&lt;email_address&gt;</a><br>
     to <a href="#email_address">&lt;email_address&gt;</a> </code> 
@@ -215,9 +267,9 @@
 href="#email_address">below</a>. <br>
     <br>
   <dt> <code> from-file [ <a href="#autoflags">-autocdb</a> | <a href="#autoflags">-autodbm</a> 
-    ] [ <a href="#domains">-domains</a> ] [ -optional ] <a href="#email_file">&lt;textfile&gt;</a><br>
+    ] [ -optional ] <a href="#email_file">&lt;textfile&gt;</a><br>
     to-file [ <a href="#autoflags">-autocdb</a> | <a href="#autoflags">-autodbm</a> 
-    ] [ <a href="#domains">-domains</a> ] [ -optional ] <a href="#email_file">&lt;textfile&gt;</a> </code> 
+    ] [ -optional ] <a href="#email_file">&lt;textfile&gt;</a> </code> 
   <dd> The <code>from-file</code> and <code>to-file</code> sources expect the 
     name of a textfile as the match field. You can specify the entire path explicitly 
     or use a leading '~' to represent the user's home directory, like the shell 
@@ -232,16 +284,13 @@
     <a
 href="#autoflags">below</a>. <br>
     <br>
-    <code>-domains</code> tells the parser that the target file might also
-    contain <a href="#domains">domains</a>.<br>
-    <br>
     If the <code>-optional</code> flag is given, the non-existence of the file 
     is not an error. If the file should exist, don't specify this flag; the parser 
     will log an error and will defer the mail so that you have a chance to fix 
     the problem. <br>
     <br>
-  <dt> <code> from-cdb [ <a href="#domains">-domains</a> ] [ -optional ] <a href="#db_file">&lt;database.cdb&gt;</a><br>
-    to-cdb [ <a href="#domains">-domains</a> ] [ -optional ] <a href="#db_file">&lt;database.cdb&gt;</a> </code> 
+  <dt> <code> from-cdb [ -optional ] <a href="#db_file">&lt;database.cdb&gt;</a><br>
+    to-cdb [ -optional ] <a href="#db_file">&lt;database.cdb&gt;</a> </code> 
   <dd> The <code>from-cdb</code> and <code>to-cdb</code> sources expect a match 
     field of a CDB database filename. You can specify the entire path or use a 
     leading '~' to represent the user's home directory. You should specify the 
@@ -249,16 +298,13 @@
     contents are documented <a
 href="#db_file">below</a>. <br>
     <br>
-    <code>-domains</code> tells the parser that the target CDB might also
-    contain <a href="#domains">domains</a>.<br>
-    <br>
     If the <code>-optional</code> flag is given, the non-existence of the file 
     is not an error. If the file should exist, don't specify this flag; the parser 
     will log an error and will defer the mail so that you have a chance to fix 
     the problem. <br>
     <br>
-  <dt> <code> from-dbm [ <a href="#domains">-domains</a> ] [ -optional ] <a href="#db_file">&lt;database.db&gt;</a><br>
-    to-dbm [ <a href="#domains">-domains</a> ] [ -optional ] <a href="#db_file">&lt;database.db&gt;</a> </code> 
+  <dt> <code> from-dbm [ -optional ] <a href="#db_file">&lt;database.db&gt;</a><br>
+    to-dbm [ -optional ] <a href="#db_file">&lt;database.db&gt;</a> </code> 
   <dd> The <code>from-dbm</code> and <code>to-dbm</code> sources expect the name 
     of a DBM database in the match field. You can specify the entire path or use 
     a leading '~' to represent the user's home directory. You should specify the 
@@ -266,9 +312,6 @@
     contents are documented <a
 href="#db_file">below</a>. <br>
     <br>
-    <code>-domains</code> tells the parser that the target DBM might also
-    contain <a href="#domains">domains</a>.<br>
-    <br>
     If the <code>-optional</code> flag is given, the non-existence of the file 
     is not an error. If the file should exist, don't specify this flag; the parser 
     will log an error and will defer the mail so that you have a chance to fix 
@@ -307,27 +350,8 @@
     will log an error and will defer the mail so that you have a chance to fix 
     the problem. <br>
     <br>
-  <dt> <code> from-mysql [ -like | -rlike ] &lt;table&gt;<br>
-    to-mysql [ -like | -rlike ] &lt;table&gt; </code> 
-  <dd> The <code>from-mysql</code> and <code>to-mysql</code> sources match against 
-    addresses contained in a <a href="http://www.mysql.com/"
-TARGET="Resource Window">MySQL</a> database table. The match field should be the 
-    table name. The MySQL host, user name, password, and database name should 
-    all be configured with the appropriate <a href="config-vars.html"
-TARGET="Resource Window">MYSQL_*</a> variable. The MySQL table format and expected 
-    contents are documented <a href="#MySQL">below</a>.<br>
-    <br>
-    If no flags are specified, the address(es) being tested must exactly match 
-    an entry in the table. Wildcard matching may be done by adding the <code>-like</code> 
-    or <code>-rlike</code> flags. <code>-like</code> indicates that MySQL <code>LIKE</code> 
-    comparison should be done (i.e. <code>%@my.host.name</code> would match all 
-    users in the <code>my.host.name</code> domain). <code>-rlike</code> indicates 
-    that MySQL regular expression (<code>RLIKE</code>) comparison should be done 
-    (i.e. <code>.+@my\.host\.name</code> would match all users in the <code>my.host.name</code> 
-    domain).<br>
-    <br>
-  <dt> <code> from-sql [ <a href="#domains">-domains</a> ] -wildcards | &lt;-addr_column=&lt;column_name&gt; [ -action_column=&lt;column_name&gt;]&gt; &lt;SQL_query&gt;<br>
-  to-sql [ <a href="#domains">-domains</a> ] -wildcards | &lt;-addr_column=&lt;column_name&gt; [ -action_column=&lt;column_name&gt; ]&gt; &lt;SQL_query&gt; </code>
+  <dt> <code> from-sql -wildcards | -addr_column=&lt;column_name&gt; [ -action_column=&lt;column_name&gt;] &lt;SQL_query&gt;<br>
+  to-sql -wildcards | -addr_column=&lt;column_name&gt; [ -action_column=&lt;column_name&gt; ] &lt;SQL_query&gt; </code>
   <dd> The <code>from-sql</code> and <code>to-sql</code> sources match
     against addresses stored in a SQL database. The &lt;SQL_query&gt;
     is a SQL SELECT statement that should retrieve the appropriate
@@ -473,12 +497,6 @@
     variables. The Python DB API takes care of that for you in a
     manner appropriate for the database you are using. <br>
     <br>
-    <code>-domains</code> tells the parser that the database column
-    containing addresses to match might also contain <a
-    href="#domains">domains</a>. This is the <code>-addr_column</code>
-    in the case of exact matches or the first column (the name is
-    irrelevant) in the case of <code>-wildcards</code>. <br>
-    <br>
 </dl>
 The following group of sources may be used only in incoming filter files. <br>
 <br>
@@ -588,7 +606,8 @@
     <br>
     <br>
     <strong>NOTE:</strong> Wildcard characters are not recognized in a CDB or 
-    DBM file. <br>
+    DBM file and are only recognized in SQL databases if you specify
+    the -wildcards argument to the rule. <br>
     <br>
     The special characters are: 
 
@@ -620,34 +639,6 @@
     are sent with, use <b><code><></code></b> as the expression. <br>
     <br>
 
-  <dt> <a name="domains"><b>Domains</b></a> 
-  <dd> The portion after the first <code>@</code> in an e-mail
-	address is considered the "domain". i.e,
-<blockquote><pre>
[email protected] -> mastaler.com
[email protected] -> cs.yale.edu
-</blockquote></pre>
-
-Domains must be listed one per line when used in a file. e.g,
-<blockquote><pre>
-wingnet.net
-mastaler.com
-tmda.net
-cs.yale.edu
-</blockquote></pre>
-
-The matching is exact. This isn't wildcarding, so with the above list, 
-<code>[email protected]</code> <strong>would</strong> match, but 
-<code>[email protected]</code> <strong>would not</strong> match.  
-You'd have to add <code>wopr.cs.yale.edu</code> to the list first.<br><br>
-
-This feature may be useful for sites that wish to check a large number
-of domain names, but don't want the overhead of the wildcard
-code. This feature is less flexible than wildcarding, but is much
-faster since the list of domains can be stored in a CDB or DBM (either directly, 
-or by using <code>-autocdb</code> / <code>-autodbm</code>).
-<br><br>
-
   <dt> <a name="email_file"><b>Email Address Files</b></a> 
   <dd> Email address files are textfiles containing an email address, domain, or
     wildcarded email address on each line. 
@@ -696,39 +687,6 @@
 href="http://pilcrow.madison.wi.us/#pycdb" TARGET="Resource
 Window">python-cdb</a> extension module installed. <br>
     <br>
-  <dt> <a name="MySQL" id="MySQL"><b>MySQL Tables</b></a> 
-  <dd> MySQL tables used in <code>from-mysql</code> and <code>to-mysql</code> 
-    filter sources should be created with the following SQL: 
-    <p> 
-    <pre>CREATE TABLE &lt;table_name&gt;
-(
-    ADDRESS text NOT NULL,
-    ACTION text NOT NULL,
-    PRIMARY KEY (ADDRESS(80))
-)</pre>
-    The <code>ACTION</code> field in your records may generally be left blank, 
-    but if present, any command in the field will override the action specified 
-    in the filter source. In other words: 
-    <pre>+-------------+--------+
-| ADDRESS     | ACTION |
-+-------------+--------+
-| %@yahoo.com | bounce |
-+-------------+--------+</pre>
-    will cause all mail from yahoo.com to bounce, even if the filter source was: 
-    <pre>from-mysql -like TMDA accept</pre>
-    Make sure that the MySQL user specified in <a href="config-vars.html#MYSQL_USER"><code>MYSQL_USER</code></a> 
-    has been <code>GRANT</code>ed sufficient <code>SELECT</code> privileges to 
-    allow access to the table listed in your filter source.<br>
-    <br>
-    The TMDA filter parser will stop on the first matching record found. If you 
-    are using the <code>-like</code> or <code>-rlike</code> options and multiple 
-    table entries match, there is no predicting which record will be used.<br>
-    <br>
-    If you wish to explore MySQL databases, make sure you have the <a
-href="http://sourceforge.net/projects/mysql-python/" TARGET="Resource
-Window">mysql-python</a> extension module installed. <br>
-    <br></dt>
-    
   <dd></dt> 
   <dd></dt> 
   <dt> <a name="re_file"><b>Regular Expression Files</b></a> 
@@ -746,7 +704,6 @@
     a backslash (<code><b>\</b></code>). <br>
     <br>
 </dl>
-
 
 </TD><!-- end of body cell -->
 </TR><!-- end of sidebar/body row -->

Index: filter-sources.ht
===================================================================
RCS file: /cvsroot/tmda/tmda/htdocs/filter-sources.ht,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- filter-sources.ht	9 Jul 2003 20:21:18 -0000	1.8
+++ filter-sources.ht	11 Jul 2003 23:02:59 -0000	1.9
@@ -9,22 +9,74 @@
 option, without the chevrons.
 <br><br>
 
+<strong>NOTE:</strong> <br>
+
+The <code>from*</code> and <code>to*</code> sources match against
+different addresses or sets of addresses depending on whether they are
+used in an incoming filter or an outgoing filter.<br><br>
+
+<table border="1" cellspacing="0">
+<tr><th>Source</th><th>Incoming Filter</th><th>Outgoing Filter</th></tr>
+<tr>
+  <th>from*</th>
+  <td><ul>
+      <li>envelope sender</li>
+      <li>From: header field</li>
+      <li>Reply-To: header field</li>
+      <li>X-Primary-Address header field if the <a
+      href="config-vars.html#PRIMARY_ADDRESS_MATCH">PRIMARY_ADDRESS_MATCH</a>
+      setting can be satisfied</li>
+      </ul>
+  </td>
+  <td><ul>
+      <li>From: header field
+      set by user's MUA</li>
+      </ul>
+  </td>
+</tr>
+<tr>
+  <th>to*</th>
+  <td><ul><li>envelope recipient</li></ul></td>
+  <td>One of:<ul>
+      <li>recipients on tmda-sendmail's command line</li>
+      <li>To: header field</li>
+      </ul>
+  </td>
+</tr>
+</table>
+
+<h3>Domain Search</h3>
+Domain names of the addresses given above are also used in the search.
+The portion after the first <code>@</code> in an e-mail address is
+considered the "domain". i.e,
+<blockquote><pre>
[email protected] -> mastaler.com
[email protected] -> cs.yale.edu
+</blockquote></pre>
+Domains must be listed one per line when used in a file. e.g,
+<blockquote><pre>
+wingnet.net
+mastaler.com
+tmda.net
+cs.yale.edu
+</blockquote></pre>
+
+The matching is exact. This isn't wildcarding, so with the above list, 
+<code>[email protected]</code> <strong>would</strong> match, but 
+<code>[email protected]</code> <strong>would not</strong> match.  
+You'd have to add <code>wopr.cs.yale.edu</code> to the list first.<br><br>
+
+This feature may be useful for sites that wish to check a large number
+of domain names, but don't want the overhead of the wildcard
+code. This feature is less flexible than wildcarding, but is much
+faster since the list of domains can be stored in a CDB or DBM (either directly, 
+or by using <code>-autocdb</code> / <code>-autodbm</code>).
+
+<h3>Sources</h3>
 This group of sources may be used in either incoming or outgoing
 filter files.
 <br><br>
 
-<strong>NOTE:</strong> <br>
-
-In order to find a match, the <code>from-*</code> sources examine the
-envelope sender address, any addresses in the From header field (not the UNIX
-mbox separator From_), any addresses in the Reply-To header field, and
-the address in the X-Primary-Address header field if the 
-<a href="config-vars.html#PRIMARY_ADDRESS_MATCH">PRIMARY_ADDRESS_MATCH</a>
-setting can be satisfied.
-<br><br>
-The <code>to-*</code> sources examine the envelope recipient address but
-<i>not</i> the To header field, which is often bogus in spam email.
-<br><br>
 <dl>
   <dt> <code> from <a href="#email_address">&lt;email_address&gt;</a><br>
     to <a href="#email_address">&lt;email_address&gt;</a> </code> 
@@ -34,9 +86,9 @@
 href="#email_address">below</a>. <br>
     <br>
   <dt> <code> from-file [ <a href="#autoflags">-autocdb</a> | <a href="#autoflags">-autodbm</a> 
-    ] [ <a href="#domains">-domains</a> ] [ -optional ] <a href="#email_file">&lt;textfile&gt;</a><br>
+    ] [ -optional ] <a href="#email_file">&lt;textfile&gt;</a><br>
     to-file [ <a href="#autoflags">-autocdb</a> | <a href="#autoflags">-autodbm</a> 
-    ] [ <a href="#domains">-domains</a> ] [ -optional ] <a href="#email_file">&lt;textfile&gt;</a> </code> 
+    ] [ -optional ] <a href="#email_file">&lt;textfile&gt;</a> </code> 
   <dd> The <code>from-file</code> and <code>to-file</code> sources expect the 
     name of a textfile as the match field. You can specify the entire path explicitly 
     or use a leading '~' to represent the user's home directory, like the shell 
@@ -51,16 +103,13 @@
     <a
 href="#autoflags">below</a>. <br>
     <br>
-    <code>-domains</code> tells the parser that the target file might also
-    contain <a href="#domains">domains</a>.<br>
-    <br>
     If the <code>-optional</code> flag is given, the non-existence of the file 
     is not an error. If the file should exist, don't specify this flag; the parser 
     will log an error and will defer the mail so that you have a chance to fix 
     the problem. <br>
     <br>
-  <dt> <code> from-cdb [ <a href="#domains">-domains</a> ] [ -optional ] <a href="#db_file">&lt;database.cdb&gt;</a><br>
-    to-cdb [ <a href="#domains">-domains</a> ] [ -optional ] <a href="#db_file">&lt;database.cdb&gt;</a> </code> 
+  <dt> <code> from-cdb [ -optional ] <a href="#db_file">&lt;database.cdb&gt;</a><br>
+    to-cdb [ -optional ] <a href="#db_file">&lt;database.cdb&gt;</a> </code> 
   <dd> The <code>from-cdb</code> and <code>to-cdb</code> sources expect a match 
     field of a CDB database filename. You can specify the entire path or use a 
     leading '~' to represent the user's home directory. You should specify the 
@@ -68,16 +117,13 @@
     contents are documented <a
 href="#db_file">below</a>. <br>
     <br>
-    <code>-domains</code> tells the parser that the target CDB might also
-    contain <a href="#domains">domains</a>.<br>
-    <br>
     If the <code>-optional</code> flag is given, the non-existence of the file 
     is not an error. If the file should exist, don't specify this flag; the parser 
     will log an error and will defer the mail so that you have a chance to fix 
     the problem. <br>
     <br>
-  <dt> <code> from-dbm [ <a href="#domains">-domains</a> ] [ -optional ] <a href="#db_file">&lt;database.db&gt;</a><br>
-    to-dbm [ <a href="#domains">-domains</a> ] [ -optional ] <a href="#db_file">&lt;database.db&gt;</a> </code> 
+  <dt> <code> from-dbm [ -optional ] <a href="#db_file">&lt;database.db&gt;</a><br>
+    to-dbm [ -optional ] <a href="#db_file">&lt;database.db&gt;</a> </code> 
   <dd> The <code>from-dbm</code> and <code>to-dbm</code> sources expect the name 
     of a DBM database in the match field. You can specify the entire path or use 
     a leading '~' to represent the user's home directory. You should specify the 
@@ -85,9 +131,6 @@
     contents are documented <a
 href="#db_file">below</a>. <br>
     <br>
-    <code>-domains</code> tells the parser that the target DBM might also
-    contain <a href="#domains">domains</a>.<br>
-    <br>
     If the <code>-optional</code> flag is given, the non-existence of the file 
     is not an error. If the file should exist, don't specify this flag; the parser 
     will log an error and will defer the mail so that you have a chance to fix 
@@ -126,27 +169,8 @@
     will log an error and will defer the mail so that you have a chance to fix 
     the problem. <br>
     <br>
-  <dt> <code> from-mysql [ -like | -rlike ] &lt;table&gt;<br>
-    to-mysql [ -like | -rlike ] &lt;table&gt; </code> 
-  <dd> The <code>from-mysql</code> and <code>to-mysql</code> sources match against 
-    addresses contained in a <a href="http://www.mysql.com/"
-TARGET="Resource Window">MySQL</a> database table. The match field should be the 
-    table name. The MySQL host, user name, password, and database name should 
-    all be configured with the appropriate <a href="config-vars.html"
-TARGET="Resource Window">MYSQL_*</a> variable. The MySQL table format and expected 
-    contents are documented <a href="#MySQL">below</a>.<br>
-    <br>
-    If no flags are specified, the address(es) being tested must exactly match 
-    an entry in the table. Wildcard matching may be done by adding the <code>-like</code> 
-    or <code>-rlike</code> flags. <code>-like</code> indicates that MySQL <code>LIKE</code> 
-    comparison should be done (i.e. <code>%@my.host.name</code> would match all 
-    users in the <code>my.host.name</code> domain). <code>-rlike</code> indicates 
-    that MySQL regular expression (<code>RLIKE</code>) comparison should be done 
-    (i.e. <code>.+@my\.host\.name</code> would match all users in the <code>my.host.name</code> 
-    domain).<br>
-    <br>
-  <dt> <code> from-sql [ <a href="#domains">-domains</a> ] -wildcards | &lt;-addr_column=&lt;column_name&gt; [ -action_column=&lt;column_name&gt;]&gt; &lt;SQL_query&gt;<br>
-  to-sql [ <a href="#domains">-domains</a> ] -wildcards | &lt;-addr_column=&lt;column_name&gt; [ -action_column=&lt;column_name&gt; ]&gt; &lt;SQL_query&gt; </code>
+  <dt> <code> from-sql -wildcards | -addr_column=&lt;column_name&gt; [ -action_column=&lt;column_name&gt;] &lt;SQL_query&gt;<br>
+  to-sql -wildcards | -addr_column=&lt;column_name&gt; [ -action_column=&lt;column_name&gt; ] &lt;SQL_query&gt; </code>
   <dd> The <code>from-sql</code> and <code>to-sql</code> sources match
     against addresses stored in a SQL database. The &lt;SQL_query&gt;
     is a SQL SELECT statement that should retrieve the appropriate
@@ -292,12 +316,6 @@
     variables. The Python DB API takes care of that for you in a
     manner appropriate for the database you are using. <br>
     <br>
-    <code>-domains</code> tells the parser that the database column
-    containing addresses to match might also contain <a
-    href="#domains">domains</a>. This is the <code>-addr_column</code>
-    in the case of exact matches or the first column (the name is
-    irrelevant) in the case of <code>-wildcards</code>. <br>
-    <br>
 </dl>
 The following group of sources may be used only in incoming filter files. <br>
 <br>
@@ -407,7 +425,8 @@
     <br>
     <br>
     <strong>NOTE:</strong> Wildcard characters are not recognized in a CDB or 
-    DBM file. <br>
+    DBM file and are only recognized in SQL databases if you specify
+    the -wildcards argument to the rule. <br>
     <br>
     The special characters are: 
 
@@ -439,34 +458,6 @@
     are sent with, use <b><code><></code></b> as the expression. <br>
     <br>
 
-  <dt> <a name="domains"><b>Domains</b></a> 
-  <dd> The portion after the first <code>@</code> in an e-mail
-	address is considered the "domain". i.e,
-<blockquote><pre>
[email protected] -> mastaler.com
[email protected] -> cs.yale.edu
-</blockquote></pre>
-
-Domains must be listed one per line when used in a file. e.g,
-<blockquote><pre>
-wingnet.net
-mastaler.com
-tmda.net
-cs.yale.edu
-</blockquote></pre>
-
-The matching is exact. This isn't wildcarding, so with the above list, 
-<code>[email protected]</code> <strong>would</strong> match, but 
-<code>[email protected]</code> <strong>would not</strong> match.  
-You'd have to add <code>wopr.cs.yale.edu</code> to the list first.<br><br>
-
-This feature may be useful for sites that wish to check a large number
-of domain names, but don't want the overhead of the wildcard
-code. This feature is less flexible than wildcarding, but is much
-faster since the list of domains can be stored in a CDB or DBM (either directly, 
-or by using <code>-autocdb</code> / <code>-autodbm</code>).
-<br><br>
-
   <dt> <a name="email_file"><b>Email Address Files</b></a> 
   <dd> Email address files are textfiles containing an email address, domain, or
     wildcarded email address on each line. 
@@ -515,39 +506,6 @@
 href="http://pilcrow.madison.wi.us/#pycdb" TARGET="Resource
 Window">python-cdb</a> extension module installed. <br>
     <br>
-  <dt> <a name="MySQL" id="MySQL"><b>MySQL Tables</b></a> 
-  <dd> MySQL tables used in <code>from-mysql</code> and <code>to-mysql</code> 
-    filter sources should be created with the following SQL: 
-    <p> 
-    <pre>CREATE TABLE &lt;table_name&gt;
-(
-    ADDRESS text NOT NULL,
-    ACTION text NOT NULL,
-    PRIMARY KEY (ADDRESS(80))
-)</pre>
-    The <code>ACTION</code> field in your records may generally be left blank, 
-    but if present, any command in the field will override the action specified 
-    in the filter source. In other words: 
-    <pre>+-------------+--------+
-| ADDRESS     | ACTION |
-+-------------+--------+
-| %@yahoo.com | bounce |
-+-------------+--------+</pre>
-    will cause all mail from yahoo.com to bounce, even if the filter source was: 
-    <pre>from-mysql -like TMDA accept</pre>
-    Make sure that the MySQL user specified in <a href="config-vars.html#MYSQL_USER"><code>MYSQL_USER</code></a> 
-    has been <code>GRANT</code>ed sufficient <code>SELECT</code> privileges to 
-    allow access to the table listed in your filter source.<br>
-    <br>
-    The TMDA filter parser will stop on the first matching record found. If you 
-    are using the <code>-like</code> or <code>-rlike</code> options and multiple 
-    table entries match, there is no predicting which record will be used.<br>
-    <br>
-    If you wish to explore MySQL databases, make sure you have the <a
-href="http://sourceforge.net/projects/mysql-python/" TARGET="Resource
-Window">mysql-python</a> extension module installed. <br>
-    <br></dt>
-    
   <dd></dt> 
   <dd></dt> 
   <dt> <a name="re_file"><b>Regular Expression Files</b></a> 
@@ -565,4 +523,3 @@
     a backslash (<code><b>\</b></code>). <br>
     <br>
 </dl>
-

Index: config-vars.html
===================================================================
RCS file: /cvsroot/tmda/tmda/htdocs/config-vars.html,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- config-vars.html	3 Jul 2003 20:36:39 -0000	1.60
+++ config-vars.html	11 Jul 2003 23:02:59 -0000	1.61
@@ -1,191 +1,186 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
+<HTML>
 <!-- THIS PAGE IS AUTOMATICALLY GENERATED.  DO NOT EDIT. -->
-<!-- Thu Jul  3 14:34:17 2003 -->
-<!-- USING HT2HTML 2.0 -->
-<!-- SEE http://ht2html.sf.net -->
+<!-- Fri Jul 11 16:42:53 2003 -->
+<!-- USING HT2HTML 1.2 -->
+<!-- SEE http://barry.wooz.org/software/ht2html -->
 <!-- User-specified headers:
 Title: TMDA Configuration Variables
 
 -->
 
-<head>
-<title>TMDA Configuration Variables</title>
-<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
-<meta name="generator" content="HT2HTML/2.0">
-<style type="text/css">
-body { margin: 0px; }
-</style>
-</head>
-<body bgcolor="#ffffff" text="#000000"
-      marginwidth="0" marginheight="0"
-      link="#0000bb"  vlink="#551a8b"
-      alink="#ff0000">
+<HEAD>
+<TITLE>TMDA Configuration Variables</TITLE>
+
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000"
+      TOPMARGIN="0" LEFTMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0"
+      LINK="#0000bb"  VLINK="#551a8b"
+      ALINK="#ff0000">
 <!-- start of page table -->
-<table width="100%" border="0" cellspacing="0" cellpadding="0">
+<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=0>
 <!-- start of banner row -->
-<tr>
+<TR>
 <!-- start of corner cells -->
-<td width="150" valign="middle" bgcolor="#afeeee" class="corner">
+<TD WIDTH=150 VALIGN=CENTER BGCOLOR="#afeeee">
 <center><font size="+2"
-        >&gt;&gt;&gt;&nbsp;TMDA&nbsp</font></center> </td>
-<td width="15" bgcolor="#cccccc">&nbsp;&nbsp;</td><!--spacer-->
+        >&gt;&gt;&gt;&nbsp;TMDA&nbsp</font></center> </TD>
+<TD WIDTH=15 BGCOLOR="#cccccc">&nbsp;&nbsp;</TD><!--spacer-->
 <!-- end of corner cells -->
 <!-- start of banner -->
-<td width="90%" bgcolor="#cccccc" class="banner">
+<TD WIDTH="90%" BGCOLOR="#cccccc">
 <!-- start of site links table -->
-<table width="100%" border="0"
+<TABLE WIDTH="100%" BORDER=0
 CELLSPACING=0 CELLPADDING=0
-       bgcolor="#ffffff">
-<tr>
-    <td bgcolor="#cccccc">
+       COLS=4 ROWS=1 BGCOLOR="#ffffff">
+<TR>
+    <TD BGCOLOR="#cccccc">
 <a href="./index.html">TMDA Homepage</a><br>[    <a href="http://www.au.tmda.net/">AU</a> |    <a href="http://www.us.tmda.net/">US</a>     mirror ]
-    </td>
-    <td bgcolor="#cccccc">
+    </TD>
+    <TD BGCOLOR="#cccccc">
 <a href="./tmda-cgi">tmda-cgi</a>
-    </td>
-    <td bgcolor="#cccccc">
+    </TD>
+    <TD BGCOLOR="#cccccc">
 <a href="http://sourceforge.net/projects/tmda">TMDA @ SourceForge</a>
-    </td>
-    <td bgcolor="#cccccc">
-&nbsp;&nbsp;</td>
-</tr>
-</table><!-- end of site links table -->
+    </TD>
+    <TD BGCOLOR="#cccccc">
+&nbsp;&nbsp;</TD>
+</TR>
+</TABLE><!-- end of site links table -->
 
-</td><!-- end of banner -->
-</tr><!-- end of banner row -->
-<tr><!-- start of sidebar/body row -->
+</TD><!-- end of banner -->
+</TR><!-- end of banner row -->
+<TR><!-- start of sidebar/body row -->
 <!-- start of sidebar cells -->
-<td width="150" valign="top" bgcolor="#cccccc" class="sidebar">
+<TD WIDTH=150 VALIGN=TOP BGCOLOR="#cccccc">
 <!-- start of sidebar table -->
-<table width="100%" border="0" cellspacing="0" cellpadding="3"
-       bgcolor="#ffffff">
-<tr><td bgcolor="#191970"><b><font color="#ffffff">
+<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=3
+       BGCOLOR="#ffffff">
+<TR><TD BGCOLOR="#191970"><B><FONT COLOR="#ffffff">
 Overview
-</font></b></td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="index.html">Introduction</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="history.html">History</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="features.html">Features</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="results.html">Results &amp; Testimonials</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="inuse.html">TMDA In Use</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="press.html">Press Coverage</a><!-- -*- html -*- -->
-</td></tr>
-<tr><td bgcolor="#cccccc">&nbsp;
-<tr><td bgcolor="#191970"><b><font color="#ffffff">
+</FONT></B></TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="index.html">Introduction</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="history.html">History</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="features.html">Features</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="results.html">Results &amp; Testimonials</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="inuse.html">TMDA In Use</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="press.html">Press Coverage</A><!-- -*- html -*- -->
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">&nbsp;
+<TR><TD BGCOLOR="#191970"><B><FONT COLOR="#ffffff">
 Install
-</font></b></td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="requirements.html">Requirements</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="download.html">Download</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="install.html">Installation</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="upgrade.html">Upgrading</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">&nbsp;
-<tr><td bgcolor="#191970"><b><font color="#ffffff">
+</FONT></B></TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="requirements.html">Requirements</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="download.html">Download</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="install.html">Installation</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="upgrade.html">Upgrading</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">&nbsp;
+<TR><TD BGCOLOR="#191970"><B><FONT COLOR="#ffffff">
 Configuration
-</font></b></td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="config.html">Overview</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="config-pre.html">Pre-Configuration</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="config-server.html">Server Configuration</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="config-client.html">Client Configuration</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
+</FONT></B></TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="config.html">Overview</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="config-pre.html">Pre-Configuration</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="config-server.html">Server Configuration</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="config-client.html">Client Configuration</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
 <b>Configuration Variables</b>
-</td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="config-filter.html">Filter Specification</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="filter-sources.html">Filter Sources</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">&nbsp;
-<tr><td bgcolor="#191970"><b><font color="#ffffff">
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="config-filter.html">Filter Specification</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="filter-sources.html">Filter Sources</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">&nbsp;
+<TR><TD BGCOLOR="#191970"><B><FONT COLOR="#ffffff">
 HOWTOs
-</font></b></td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="howtos.html">Overview</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="howto-template.html">Templates</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="tmda-ofmipd.html">tmda-ofmipd</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="tmda-vdomains.html">Virtual Domains</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">&nbsp;
-<tr><td bgcolor="#191970"><b><font color="#ffffff">
+</FONT></B></TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="howtos.html">Overview</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="howto-template.html">Templates</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="tmda-ofmipd.html">tmda-ofmipd</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="tmda-vdomains.html">Virtual Domains</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">&nbsp;
+<TR><TD BGCOLOR="#191970"><B><FONT COLOR="#ffffff">
 Support
-</font></b></td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="trouble.html">Troubleshooting</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
+</FONT></B></TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="trouble.html">Troubleshooting</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
 <a href="http://tmda.net/faq.cgi" TARGET="Resource Window">FAQ</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="bugs.html">Bugs &amp; Patches</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="bugs.html">Bugs &amp; Patches</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
 <a href="http://tmda.net/lists/listinfo/" TARGET="Resource Window">Mailing Lists</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
 <a href="http://mla.libertine.org/" TARGET="Resource Window">List Archive</a> 
-</td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="support-commercial.html">Commercial Support</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="resources.html">External Resources</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="mirrors.html">Mirrors</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">&nbsp;
-<tr><td bgcolor="#191970"><b><font color="#ffffff">
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="support-commercial.html">Commercial Support</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="resources.html">External Resources</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="mirrors.html">Mirrors</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">&nbsp;
+<TR><TD BGCOLOR="#191970"><B><FONT COLOR="#ffffff">
 Author
-</font></b></td></tr>
-<tr><td bgcolor="#cccccc">
-<a href="mailto:[email protected]">Jason R. Mastaler</a>
-</td></tr>
-<tr><td bgcolor="#cccccc">
+</FONT></B></TD></TR>
+<TR><TD BGCOLOR="#cccccc">
+<A HREF="mailto:[email protected]">Jason R. Mastaler</A>
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
 &nbsp;
-</td></tr>
-<tr><td bgcolor="#cccccc">
+</TD></TR>
+<TR><TD BGCOLOR="#cccccc">
 &copy; 2001-2003
-</td></tr>
-</table><!-- end of sidebar table -->
+</TD></TR>
+</TABLE><!-- end of sidebar table -->
 
-</td>
-<td width="15">&nbsp;&nbsp;</td><!--spacer-->
+</TD>
+<TD WIDTH=15>&nbsp;&nbsp;</TD><!--spacer-->
 <!-- end of sidebar cell -->
 <!-- start of body cell -->
-<td valign="top" width="90%" class="body"><br>
+<TD VALIGN=TOP WIDTH="90%"><BR>
 <h3>TMDA Configuration Variables</h3>
 
 <ul>
@@ -283,6 +278,10 @@
 <td><a href="#DATED_TEMPLATE_VARS">DATED_TEMPLATE_VARS</a></td>
 </tr>
 <tr>
+<td><a href="#DB_BARE_APPEND">DB_BARE_APPEND</a></td>
+<td><a href="#DB_CONFIRM_APPEND">DB_CONFIRM_APPEND</a></td>
+</tr>
+<tr>
 <td><a href="#DB_CONNECTION">DB_CONNECTION</a></td>
 <td><a href="#DELIVERY">DELIVERY</a></td>
 </tr>
@@ -924,6 +923,63 @@
 <br><br>
 Default is 0 (turned off)
 <dt><hr>
+<a name="DB_BARE_APPEND"><h4>DB_BARE_APPEND</h4></a>
+<dd>
+SQL INSERT statement to be used to insert recipient addresses into
+a SQL database if the outgoing &lt;action&gt; was 'bare=append'. The Python
+DB API will take care of properly quoting parameters that are strings.
+Requires a valid DB_CONNECTION object.
+<br><br>
+Available substition parameters are:
+<br><br>
+%(recipient)s  - recipient's email address
+%(username)s   - USERNAME (of TMDA user)
+%(hostname)s   - HOSTNAME (of TMDA user)
+%(sender)s     - USERNAME@HOSTNAME (address of TMDA user)
+%(fromheader)s - address of TMDA user in From: header field
+<br><br>
+Examples:
+<br><br>
+<code>DB_BARE_APPEND = """</code><br>
+<blockquote>
+<code> INSERT INTO whitelist (user_email, address)</code><br>
+<code>      VALUES (%(sender)s, %(recipient)s)"""</code>
+</blockquote>
+<br>
+Default is None
+<dt><hr>
+<a name="DB_CONFIRM_APPEND"><h4>DB_CONFIRM_APPEND</h4></a>
+<dd>
+SQL INSERT statement to be used to insert confirmed sender addresses
+into a SQL database. The Python DB API will take care of properly
+quoting parameters that are strings.
+Requires a valid DB_CONNECTION object.
+<br><br>
+Available substition parameters are:
+<br><br>
+%(recipient)s  - USERNAME@HOSTNAME
+%(username)s   - USERNAME
+%(hostname)s   - HOSTNAME
+%(sender)s     - sender's address (envelope sender or X-Primary-Address)
+<br><br>
+Examples:
+<br><br>
+<code>DB_CONFIRM_APPEND = """</code><br>
+<blockquote>
+<code> INSERT INTO whitelist (user_email, address)</code><br>
+<code>      VALUES (%(recipient)s, %(sender)s)"""</code>
+</blockquote>
+<br>
+DB_CONFIRM_APPEND = """
+<blockquote>
+ INSERT INTO wildcard_list (uid, address, action)
+      SELECT uid, %(sender)s, 'accept'
+        FROM users
+       WHERE users.email = %(recipient)s"""
+</blockquote>
+<br>
+Default is None
+<dt><hr>
 <a name="DB_CONNECTION"><h4>DB_CONNECTION</h4></a>
 <dd>
 Python DB API Connection object. This is specific to the database
@@ -1837,7 +1893,7 @@
 Default is 0 (turned off)
 </dl>
 
-</td><!-- end of body cell -->
-</tr><!-- end of sidebar/body row -->
-</table><!-- end of page table -->
-</body></html>
+</TD><!-- end of body cell -->
+</TR><!-- end of sidebar/body row -->
+</TABLE><!-- end of page table -->
+</BODY></HTML>

Index: config-vars.ht
===================================================================
RCS file: /cvsroot/tmda/tmda/htdocs/config-vars.ht,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- config-vars.ht	3 Jul 2003 20:01:46 -0000	1.34
+++ config-vars.ht	11 Jul 2003 23:02:59 -0000	1.35
@@ -97,6 +97,10 @@
 <td><a href="#DATED_TEMPLATE_VARS">DATED_TEMPLATE_VARS</a></td>
 </tr>
 <tr>
+<td><a href="#DB_BARE_APPEND">DB_BARE_APPEND</a></td>
+<td><a href="#DB_CONFIRM_APPEND">DB_CONFIRM_APPEND</a></td>
+</tr>
+<tr>
 <td><a href="#DB_CONNECTION">DB_CONNECTION</a></td>
 <td><a href="#DELIVERY">DELIVERY</a></td>
 </tr>
@@ -737,6 +741,63 @@
 in your templates.
 <br><br>
 Default is 0 (turned off)
+<dt><hr>
+<a name="DB_BARE_APPEND"><h4>DB_BARE_APPEND</h4></a>
+<dd>
+SQL INSERT statement to be used to insert recipient addresses into
+a SQL database if the outgoing &lt;action&gt; was 'bare=append'. The Python
+DB API will take care of properly quoting parameters that are strings.
+Requires a valid DB_CONNECTION object.
+<br><br>
+Available substition parameters are:
+<br><br>
+%(recipient)s  - recipient's email address
+%(username)s   - USERNAME (of TMDA user)
+%(hostname)s   - HOSTNAME (of TMDA user)
+%(sender)s     - USERNAME@HOSTNAME (address of TMDA user)
+%(fromheader)s - address of TMDA user in From: header field
+<br><br>
+Examples:
+<br><br>
+<code>DB_BARE_APPEND = """</code><br>
+<blockquote>
+<code> INSERT INTO whitelist (user_email, address)</code><br>
+<code>      VALUES (%(sender)s, %(recipient)s)"""</code>
+</blockquote>
+<br>
+Default is None
+<dt><hr>
+<a name="DB_CONFIRM_APPEND"><h4>DB_CONFIRM_APPEND</h4></a>
+<dd>
+SQL INSERT statement to be used to insert confirmed sender addresses
+into a SQL database. The Python DB API will take care of properly
+quoting parameters that are strings.
+Requires a valid DB_CONNECTION object.
+<br><br>
+Available substition parameters are:
+<br><br>
+%(recipient)s  - USERNAME@HOSTNAME
+%(username)s   - USERNAME
+%(hostname)s   - HOSTNAME
+%(sender)s     - sender's address (envelope sender or X-Primary-Address)
+<br><br>
+Examples:
+<br><br>
+<code>DB_CONFIRM_APPEND = """</code><br>
+<blockquote>
+<code> INSERT INTO whitelist (user_email, address)</code><br>
+<code>      VALUES (%(recipient)s, %(sender)s)"""</code>
+</blockquote>
+<br>
+DB_CONFIRM_APPEND = """
+<blockquote>
+ INSERT INTO wildcard_list (uid, address, action)
+      SELECT uid, %(sender)s, 'accept'
+        FROM users
+       WHERE users.email = %(recipient)s"""
+</blockquote>
+<br>
+Default is None
 <dt><hr>
 <a name="DB_CONNECTION"><h4>DB_CONNECTION</h4></a>
 <dd>

Index: ChangeLog
===================================================================
RCS file: /cvsroot/tmda/tmda/htdocs/ChangeLog,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -r1.167 -r1.168
--- ChangeLog	9 Jul 2003 20:21:18 -0000	1.167
+++ ChangeLog	11 Jul 2003 23:02:59 -0000	1.168
@@ -1,3 +1,8 @@
+2003-07-11  Tim Legant  <[email protected]>
+
+	* filter-sources.ht: Removed {from,to}-mysql documentation, moved
+	-domains documentation to top, since now it is default behavior.
+
 2003-07-09  Tim Legant  <[email protected]>
 
 	* filter-sources.ht: Added section on new sources 'from-sql' and

_______________________________________
tmda-cvs mailing list
http://tmda.net/lists/listinfo/tmda-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.