Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 172678402dc25221cbc2711090f0a934 > files > 66

tmda-1.0.3-5mdv2008.1.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<!-- THIS PAGE IS AUTOMATICALLY GENERATED.  DO NOT EDIT. -->
<!-- Mon Feb  9 14:15:57 2004 -->
<!-- USING HT2HTML 2.0 -->
<!-- SEE http://ht2html.sf.net -->
<!-- User-specified headers:
Title: TMDA Filter Specification

-->

<head>
<title>TMDA Filter Specification</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">
<!-- start of page table -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<!-- start of banner row -->
<tr>
<!-- start of corner cells -->
<td width="150" valign="middle" bgcolor="#afeeee" class="corner">
<center><font size="+2"
        >&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">
<!-- start of site links table -->
<table width="100%" border="0"
CELLSPACING=0 CELLPADDING=0
       bgcolor="#ffffff">
<tr>
    <td bgcolor="#cccccc">
<a href="./index.html">Home</a>
    </td>
    <td bgcolor="#cccccc">
<a href="./trouble.html">Help</a>
    </td>
    <td bgcolor="#cccccc">
<a href="tmda-cgi">TMDA-CGI</a>
    </td>
    <td bgcolor="#cccccc">
<a href="http://sourceforge.net/projects/tmda">SourceForge</a>
    </td>
</tr><tr>
    <td bgcolor="#cccccc">
[    <a href="http://www.au.tmda.net/" title="Australia Mirror">AU</a> |    <a href="http://www.de.tmda.net/" title="Germany Mirror">DE</a> |    <a href="http://www.it.tmda.net/" title="Italy Mirror">IT</a> |    <a href="http://www.pl.tmda.net/" title="Poland Mirror">PL</a> |    <a href="http://www.us.tmda.net/" title="USA Mirror">US</a>     mirror ]
    </td>
    <td bgcolor="#cccccc">
<a href="http://tmda.net/faq.cgi">FAQ</a>
    </td>
    <td bgcolor="#cccccc">
<a href="http://wiki.tmda.net/">Wiki</a>
    </td>
    <td bgcolor="#cccccc">
<a href="http://www.cafeshops.com/TMDA/">Store</a>
    </td>
</tr>
</table><!-- end of site links table -->

</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">
<!-- start of sidebar table -->
<table width="100%" border="0" cellspacing="0" cellpadding="3"
       bgcolor="#ffffff">
<tr><td bgcolor="#191970"><b><font color="#ffffff">
About
</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="challengeresponse.html">Challenge / Response</a>
</td></tr>
<tr><td bgcolor="#cccccc">
<a href="donations.html">Donations</a>
</td></tr>
<tr><td bgcolor="#cccccc">
<a href="http://wiki.tmda.net/index.cgi/TmdaAdvocacy">Advocacy</a>
</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">
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-Config</a>
</td></tr>
<tr><td bgcolor="#cccccc">
<a href="config-server.html">Server Config</a>
</td></tr>
<tr><td bgcolor="#cccccc">
<a href="config-client.html">Client Config</a>
</td></tr>
<tr><td bgcolor="#cccccc">
<a href="config-vars.html">Config Variables</a>
</td></tr>
<tr><td bgcolor="#cccccc">
<b>Filter Spec</b>
</td></tr>
<tr><td bgcolor="#cccccc">
<a href="filter-sources.html">Filter Sources</a>
</td></tr>
<tr><td bgcolor="#cccccc">
<a href="howto-template.html">Templates</a>
</td></tr>
<tr><td bgcolor="#cccccc">
<a href="tmda-vdomains.html">Virtual Domains</a>
</td></tr>
<tr><td bgcolor="#cccccc">
<a href="tmda-ofmipd.html">tmda-ofmipd</a>
</td></tr>
<tr><td bgcolor="#cccccc">
<a href="http://wiki.tmda.net/index.cgi/TmdaHowtos">User HOWTOs</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">Help</a>
</td></tr>
<tr><td bgcolor="#cccccc">
<a href="http://tmda.net/faq.cgi">FAQ</a>
</td></tr>
<tr><td bgcolor="#cccccc">
<a href="http://wiki.tmda.net/index.cgi/TmdaMailingListsAndNewsgroups">Lists &amp; Newsgroups</a>
</td></tr>
<tr><td bgcolor="#cccccc">
<a href="http://wiki.tmda.net/index.cgi/TmdaMailingListArchives">List Archives</a> 
</td></tr>
<tr><td bgcolor="#cccccc">
<a href="http://wiki.tmda.net/index.cgi/TmdaCommercialSupport">Commercial Support</a>
</td></tr>
<tr><td bgcolor="#cccccc">
<a href="http://wiki.tmda.net/index.cgi/TmdaDocumentation">External Docs</a>
</td></tr>
<tr><td bgcolor="#cccccc">
<a href="http://wiki.tmda.net/">TmdaWiki</a>
</td></tr>
<tr><td bgcolor="#cccccc">&nbsp;
<tr><td bgcolor="#191970"><b><font color="#ffffff">
Miscellaneous
</font></b></td></tr>
<tr><td bgcolor="#cccccc">
<a href="http://wiki.tmda.net/index.cgi/TmdaMirrors">Mirrors</a>
</td></tr>
<tr><td bgcolor="#cccccc">
<a href="logos.html">Logos</a>
</td></tr>
<tr><td bgcolor="#cccccc">
<a href="http://www.cafeshops.com/TMDA/" TARGET="Resource Window">Merchandise</a>
</td></tr>
<tr><td bgcolor="#cccccc">&nbsp;
<tr><td bgcolor="#191970"><b><font color="#ffffff">
Contact
</font></b></td></tr>
<tr><td bgcolor="#cccccc">
<a href="mailto:tmda-users@tmda.net">TMDA Users List</a>
</td></tr>
<tr><td bgcolor="#cccccc">
&nbsp;
</td></tr>
<tr><td bgcolor="#cccccc">
&copy; 2001-2004
</td></tr>
</table><!-- end of sidebar table -->

</td>
<td width="15">&nbsp;&nbsp;</td><!--spacer-->
<!-- end of sidebar cell -->
<!-- start of body cell -->
<td valign="top" width="90%" class="body"><br>
<h3>TMDA Filter Specification</h3>

TMDA filter files are used to control mail both coming in to and going
out of TMDA.  For incoming, the filter controls how the message is
disposed of.  For outgoing, it controls how the message is tagged.
The incoming filter file default is <b>~/.tmda/filters/incoming</b>,
which can be changed by setting <b>FILTER_INCOMING</b> in your
<b>~/.tmda/config</b>.  The outgoing filter file default is
<b>~/.tmda/filters/outgoing</b>, which can be changed by setting
<b>FILTER_OUTGOING</b>.  
<br><br>

<u><b>Format of Filter Files</u></b>:
<br><br>

A filter file is composed of filters, blank lines and comments.  For
ease of organization, macros, variable interpolation and the ability
to include other filter files are supported.  These features are
documented below in the <a href="#addlfeatures">Additional
Features</a> section.
<br><br>

Each filter in a filter file is expected to be a string containing
three fields separated by whitespace.  Each filter may be placed on a
single line or may be spread over several lines, to increase
readability.  You must follow a few rules when formatting your
filters.

<ul>
<li>Each filter must start at the beginning of a line.

<li>Subsequent lines that are part of the same filter <i>must</i> be
indented by one or more spaces or tabs.

<li>Blank lines (either empty or containing only whitespace) or a line
beginning a new filter signify the end of the previous filter.

<li>A line containing only a comment does <i>not</i> end a filter.  You
may intersperse comment lines within your filters (see the examples).

<li>Everything after <code><b>#</b></code> on a line is considered a
comment and ignored.

<li>Filters with invalid syntax are logged with a specific error
message into the debug log and the mail is deferred.  This is to allow
you the chance to fix your filter before processing the mail.
</ul>

The filter file is read sequentially from top to bottom.  The first
filter that matches is used.  The three fields in a filter are:

<blockquote><pre><b>
source match action

</blockquote></pre></b>

<li><b>source</b>: specifices the source of the match.<br><br>

Some sources take optional arguments.  An argument begins with a dash
(<b>-</b>).  Some arguments take options.  If an argument takes an
option, the argument is followed immediately by an equals sign
(<b>=</b>) and the option.  No whitespace is allowed on either side of
the equals sign.<br><br>

Single arguments look like this:
<pre>
    -argument
</pre>
and arguments with options look like this:
<pre>
    -argument=option
</pre>
<br>
Sources are documented <a href="filter-sources.html">here</a> along
with any optional arguments and the expected match field.<br><br>

<li><b>match</b>: 
should be an expression, or the full path to a textfile, CDB database, or
DBM database containing more expressions if <b>source</b> was suffixed
with `-file', `-cdb', or `-dbm'.
<br><br>

The match expression and the contents of the textfile vary based on
the source.  For an explanation of the match field expected for a
given source, see the <a href="filter-sources.html">source
documentation</a>.
<br><br>

The second field within a textfile, CDB or DBM is optional, but overrides
action if present.  e.g,

<blockquote><pre>
foo@mastaler.com
bar@mastaler.com bounce

</blockquote></pre>
DBM support comes with your Python interpreter, but CDB support
currently requires that you first install the
<a href="http://pilcrow.madison.wi.us/#pycdb" TARGET="Resource Window">python-cdb</a>
extension module.
<br><br>

The <em>printcdb/printdbm</em> scripts in the <strong>contrib</strong> directory
can be used to print the contents of CDB/DBM files in TMDA-list format.
<br><br>

<li><b>action</b>: 
action specifies what action to take on the message.  An optional
<code><b>=</b></code> separates the action from the action's option.
Possible values differ based on whether the message is incoming or
outgoing.
<br><br>

(for incoming, action can be one of):
<blockquote><pre>
bounce,reject (bounce the message)
bounce,reject=&lt;template&gt; (bounce the message using a specific template)
drop,exit,stop (silently drop the message)
ok,accept,deliver (deliver the message)
ok,accept,deliver=&lt;instruction&gt; (deliver to a Maildir, mbox, program, or address)
confirm (request confirmation for the message)
confirm=&lt;template&gt; (request confirmation for the message using a specific template)
hold (store the message in the pending queue but do not send a confirmation request)
</blockquote></pre>

The <b>template</b> option to <b>bounce,reject</b> and <b>confirm</b> can be used
to bounce or confirm the message using a specific template file rather than the
default (bounce.txt or confirm_request.txt).  The option can be an absolute pathname to the
template file (e.g, <i>/path/to/template.txt</i>).  Pathnames
starting with a tilde will be expanded.  It can also be
a relative pathname, in which case the template will be searched for
under <a href="config-vars.html#TEMPLATE_DIR">TEMPLATE_DIR</a> as
described in the <a href="howto-template.html">Template HOWTO</a>.
<br><br>

The <b>instruction</b> option to <b>ok,accept,deliver</b> can be used
to short-circuit the default delivery method by delivering the message
to a specific location.  Delivery to qmail-style <a
href="http://www.qmail.org/man/man5/maildir.html" TARGET="Resource
Window"> Maildirs</a>, mboxrd-format <a
href="http://www.qmail.org/man/man5/mbox.html" TARGET="Resource
Window"> mboxes</a>, programs (pipe), and different e-mail addresses
are supported.
<br><br>

<table border cellpadding=4 cellspacing=2>

<tr>
<th>instruction:</th>
<th>format:</th>
<th>examples:</th>
</td>

<tr>
<td>program (pipe)</td>
<td>
A program instruction begins with a vertical bar.  The rest of the line will
be passed to /bin/sh.  Whitespace and shell variables (i.e, $HOME and
~) are allowed.
</td>
<td nowrap>
<code>
deliver=|/usr/ucb/vacation jason<br>
deliver=| /usr/bin/maildrop $HOME/.mailfilter
</code>
</td>
</tr>

<tr>
<td>forward</td>
<td>
A forward instruction begins with an ampersand.  If the address begins with
a letter or number, you may leave out the ampersand.
</td>
<td>
<code>
deliver=&johndoe@new.job.com<br>
deliver=janedoe@new.isp.net
</code>
</td>
</tr>

<tr>
<td>mmdf</td>
<td>
An mmdf instruction begins with a colon.
Please note the following restrictions below.
</td>
<td>
<code>
deliver=:/home/jason/Mailbox<br>
deliver=:~/Mailbox
</code>
</td>
</tr>

<tr>
<td>mbox</td>
<td>
An mbox instruction begins with a slash or tilde, and does not end with a
slash.  Please note the following restrictions below.
</td>
<td>
<code>
deliver=/home/jason/Mailbox<br>
deliver=~/Mailbox
</code>
</td>
</tr>

<tr>
<td>maildir</td>
<td>
A maildir instruction begins with a slash or tilde and ends with a slash.
Please note the following restrictions below.
</td>
<td>
<code>
deliver=/home/jason/Maildir/<br>
deliver=~/Maildir/
</code>
</td>
</tr>

</table>
<br>

<u>Please note the following restrictions to mmdf, mbox and Maildir delivery:</u><br>
<ul>

<li>
TMDA will not create Maildirs, mmdf or mbox files if they do not exist.  You
must create them prior to having TMDA deliver mail to them with
commands like 
<a href="http://www.qmail.org/man/man1/maildirmake.html" TARGET="Resource Window">
<em>maildirmake</em></a> 
and <em>touch</em>.
<br><br>

<li>
TMDA requires write access to any Maildir, mmdf or mbox file you wish to
deliver mail to.
<br><br>

<li>
TMDA will not deliver to an mmdf or mbox symlink.  Specify the path to the
actual mbox file instead.
<br><br>

<li>
Do not deliver to mmdf or mbox files located on an NFS filesystem.  This is
unsafe and can corrupt your mbox file -- this applies to all MDAs, not
just TMDA.  Use Maildir instead as it is immune to such
problems.
</ul>
<br>

(for outgoing, action can be one of):
<blockquote><pre>
bare (don't tag)
bare=append (don't tag, and also add recipient to your BARE_APPEND file)
sender (tag with a sender address based on recipient)
sender=address (tag with a sender address based on address instead)
domain (tag with a sender address based on recipient's domain)
domain=address (tag with a sender address based on the domain of address instead)
dated (tag with a dated address)
dated=timeout_interval 
exp,explicit,as=full_address (use an explicit address)
ext,extension=address_extension (add an extension to the address)
kw,keyword=keyword (tag with a keyword address)
default (take the default action specified by ACTION_OUTGOING)
tag (tag one or more specific headers with the above actions)

</blockquote></pre>

For all of the outgoing actions except <b>tag</b>, the tag applies to
both the From: (or Resent-From:) header and the envelope sender.  Both
will be set to the same address.
<br><br>

The <b>tag</b> action is a little more flexible, in that it can be
used to tag more than one header and each header can be tagged with a
different address.  The <b>tag</b> syntax is as follows:

<pre><blockquote>
&lt;to* | from*&gt; &lt;match&gt; tag &lt;header action&gt; [header action] ...

</blockquote></pre>
Any of the to* or from* <b>sources</b> may be used.  The &lt;match&gt;
is explained in the <a href="filter-sources.html">source
documentation</a>.  The &lt;match&gt; is followed by the keyword
<b>tag</b> which is followed by a list of header/action pairs.
<br><br>

The header is the name of the RFC822 header field you want to tag,
usually From: or Reply-To:.  When you specify the header name, do not
include the colon (<code><b>:</b></code>).  Use <b>envelope</b> to tag
the envelope sender.
<br><br>

The action is any one of the outgoing actions from the list above
(except <b>tag</b>, of course).  That action will be used to tag the
specified header only.  If the specified action is not one from the
list above, the action is inserted verbatim as a string.  This can be
used to add arbitrary headers to your outgoing messages based on
destination.  Quotes are required for text that includes whitespace
and are unnecessary for single word strings.
<br><br>

The <b>tag</b> action is especially useful for mailing lists.  Here,
the envelope sender is set to your subscription address but the From:
header is set to a dated address, making it easy for list members to
respond to you but greatly reducing the likelihood that spammers will
be able to harvest and use the dated address before it expires.
<pre><blockquote>
to tmda-users@tmda.net tag
   envelope  exp=foo@catseye.net
   from      dated=1w

</blockquote></pre>
In simple cases where you wish to tag the From: header and the
envelope sender with the same address but tag Reply-To: differently,
you may specify the From: header but not the envelope sender.  TMDA
will use address in the From: header as the envelope sender.
<pre><blockquote>
to closed-list@lists.com tag
   from      sender=closed-list-admin@lists.com
   reply-to  dated

</blockquote></pre>
This will set both the From: header and the envelope sender to the
same address (a sender address) based on the envelope sender of the
list.  Reply-To: will be dated to allow list members to reply to you.
<br><br>

<a name="addlfeatures">
<u><b>Additional Features</b></u>:</a>
<br><br>

<li> <b>Macros</b><br><br>

A macro is, in its simplest form, a piece of text that is to be
substituted for another piece of text, rather like a #define in C.
Here's how to define a simple macro in a filter file.
<pre><blockquote>
macro INBOX ~/Mail/Inbox

</blockquote></pre>
Here's how to use that macro in a filter rule.
<pre><blockquote>
to foo@catseye.net deliver=INBOX

</blockquote></pre>
Before the filter parser attempts to parse a rule it performs a macro
substitution pass on the text.  The result of that substitution on the
above example filter is this.
<pre><blockquote>
to foo@catseye.net deliver=~/Mail/Inbox

</blockquote></pre>
After the substitution is performed, the rule is parsed normally and
any syntax errors are identified and logged as usual.
<br><br>

Macros may also take parameters.  For example, assume that you always
deliver list mail to a unique maildir per list.  Here's a macro to
help with that.
<pre><blockquote>
macro LIST_DELIVER(m) deliver=~/Mail/m/

</blockquote></pre>
Here's how you might use it for the two TMDA mailing lists.
<pre><blockquote>
from tmda-users-bounces@tmda.net   LIST_DELIVER(TMDA-Users)
from tmda-workers-bounces@tmda.net LIST_DELIVER(TMDA-Workers)

</blockquote></pre>
Expanding the above macros results in these rules.
<pre><blockquote>
from tmda-users-bounces@tmda.net   deliver=~/Mail/TMDA-Users/
from tmda-workers-bounces@tmda.net deliver=~/Mail/TMDA-Workers/

</blockquote></pre>
Macros may refer to other macros but may not refer to themselves, even
indirectly.  In other words, if macro A refers to macro B, B may not
refer to A.  This will result in a parser syntax error.
<br><br>

Macros are not case-sensitive.  Use case as you prefer to help clarify
your filter files.
<br><br>

<li> <b>Included Filters</b><br><br>

Filter files may include the contents of other filter files.  The
included filter rules are placed inline right where they were
included.  This positioning is important to remember, since the first
matching rule encountered is the one that will be applied to an
incoming email.
<br><br>

A filter include statement looks like this.
<pre><blockquote>
include [ -optional ] /path/to/included/filter_file

</blockquote></pre>
If the -optional flag is specified, the parser will not raise an error
if the file is missing.  If you expect that the file will always be
present and its absence would be an error, do not specify this flag!
That way, the parser will log an error and defer the mail, so that you
can fix the problem.
<br><br>

Filter includes may be nested; that is, the included filter file may
include other filter files itself, and those files may also include
other files.  If a filter file tries to include one of the files that
included it, however, an error will be logged and the mail will be
deferred.
<br><br>

<li> <b>Variable Interpolation</b><br><br>

Filter files support variable interpolation or substitution, like the
shell.  A variable is recognized if it begins with a dollar sign and a
left curly brace (<code><b>${</b></code>) and ends with a right curly
brace (<code><b>}</b></code>), like this: <code>${TMDADIR}</code>.
<br><br>

A variable name is looked up first in the Defaults namespace (all of
the configuration variables set in Defaults.py or your ~/.tmda/config) and
then in the environment if it was not found in the Defaults
namespace.  If it is still not found, the parser generates an error
and the mail is deferred.  Variable names are case-sensitive.
<br><br>

Using variables may allow you to create a system-wide filter that
users can modify by providing their own additions.  A Python variable,
such as 'username', would need to be set in the user's configuration
file, like this.
<pre><blockquote>
username = "foo"

</blockquote></pre>
Here's an extremely simple system-wide filter that uses the 'username'
variable to include a user's filter.
<pre><blockquote>
from-file /etc/company_blacklist drop
from-file /etc/company_whitelist accept
include -optional /home/vdomain/tmda/lists/whitelist.${username}

</blockquote></pre>
If the 'foo' user chooses to create a whitelist and names it
"whitelist.foo", it will automatically be included.  Because of the
use of the -optional flag, the file is not required.
<br><br>

<u><b>Example Incoming Filter</u></b>:

<pre>

### ~/.tmda/filters/incoming (first match wins) ###

# Accept all bounces (messages with an empty envelope sender)
from <> ok

# Accept all messages to postmistress
to postmistress@* accept

# Bounce all messages from badboy.dom
from *@=badboy.dom bounce

# Accept all messages from mycorp.dom
from *@=mycorp.dom ok

# Include my blacklist and whitelist
from-dbm ~/.tmda/lists/blacklist.db drop
from-cdb ~/.tmda/lists/whitelist.cdb accept
from-file -autodbm ~/.tmda/lists/nastygrams bounce
from-file -autocdb ~/.tmda/lists/confirmed ok
from-file ~/.tmda/lists/whitelist_wildcards accept

# Mailman mailing list subscribers and digest subscribers
from-mailman -attr=members ~mailman/lists/viewnet-news ok
from-mailman -attr=digest_members ~mailman/lists/viewnet-news ok

# ezmlm mailing list subscribers and digest subscribers
from-ezmlm ~alias/all-acl-users ok
from-ezmlm ~alias/all-acl-users/digest ok

# Revoked addresses
to jason-stupid_promo.289076@mastaler.com bounce
to jason-jcrew.832234@mastaler.com confirm

# Examine the message content
body "viagra|ginseng" confirm
headers 'Precedence:.*junk' reject
headers -case 'MAKE MONEY FAST' drop

# Accept all messages smaller than 10KB, but drop messages larger than 1MB
size <10000 deliver
size >1000000 exit

# Throw the message away if Razor says it's spam
pipe /usr/bin/razor-check drop

# Save the message to a special mbox if Razor says it's spam
pipe "/usr/bin/razor-check -rs=razor.server.com" deliver=~/mbox.spam

</pre>

<u><b>Example Outgoing Filter</u></b>:
<pre>

#### ~/.tmda/filters/outgoing (first match wins) ###

# All mail from postmaster is sent bare
from postmaster@* bare

# And so is all mail from the tmda-users mailing list owner
to-mailman -attr=owner ~mailman/lists/tmda-users bare

# All whitelisted contacts receive untagged messages
to-cdb ~/.tmda/lists/whitelist.cdb bare
to-file ~/.tmda/lists/whitelist_wildcards bare

# Keyword Addresses
to *@myisp.net kw=myisp
to king@grassland.com keyword=elvis_parsley

# Dated addresses (some with a non-default timeout interval)
to bobby@peru.com dated
to-dbm /var/dbm/slowpokes.db dated=6M

# Allow anyone at whitehouse.gov to reply
to president@whitehouse.gov domain

# Majordomo and Mailman check the From: header for membership
to mutt-users@mutt.org tag
   from      sender=owner-mutt-users@mutt.org
   reply-to  dated

# ezmlm checks the envelope sender address for membership
to tmda-admin@samstech.net tag
   # Set envelope sender to the extension address I subscribed with
   # and From: to 'default'.  TMDA comes with the default action
   # (ACTION_OUTGOING) set to 'dated'.  Reply-To: isn't necessary in
   # this case.
   envelope  extension=mlists-tmda-admin
   from      default

# Add some arbitrary headers.
to foo@bar.com tag organization "Whatwerks.com, Inc."

to foo@bar.com tag
   from             sender
   reply-to         dated
   organization     "Disney Land"
   x-favorite-dwarf Hungry

# Use a different username and/or domain
to *@gnus.org exp=jason@gnus.org
to xemacs-binary-kits* explicit=binkit-manager@XEmacs.ORG
to *mail*@=xemacs.org as=postmaster@XEmacs.ORG
to *@=xemacs.org as=jasonrm@xemacs.org

</pre>

</td><!-- end of body cell -->
</tr><!-- end of sidebar/body row -->
</table><!-- end of page table -->
</body></html>