You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2007/05/02 14:33:14 UTC
svn commit: r534420 [6/13] - in /spamassassin/site/full/3.2.x: ./ doc/
Added: spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Conf_Parser.html
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Conf_Parser.html?view=auto&rev=534420
==============================================================================
--- spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Conf_Parser.html (added)
+++ spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Conf_Parser.html Wed May 2 05:33:04 2007
@@ -0,0 +1,156 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Mail::SpamAssassin::Conf::Parser - parse SpamAssassin configuration</title>
+<link rev="made" href="mailto:jm@apache.org" />
+</head>
+
+<body style="background-color: white">
+
+<p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
+
+<ul>
+
+ <li><a href="#name">NAME</a></li>
+ <li><a href="#synopsis">SYNOPSIS</a></li>
+ <li><a href="#description">DESCRIPTION</a></li>
+ <li><a href="#structure_of_a_config_block">STRUCTURE OF A CONFIG BLOCK</a></li>
+ <li><a href="#methods">METHODS</a></li>
+</ul>
+<!-- INDEX END -->
+
+<hr />
+<p>
+</p>
+<h1><a name="name">NAME</a></h1>
+<p>Mail::SpamAssassin::Conf::Parser - parse SpamAssassin configuration</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<pre>
+ (see Mail::SpamAssassin)</pre>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+<p>Mail::SpamAssassin is a module to identify spam using text analysis and
+several internet-based realtime blacklists.</p>
+<p>This class is used internally by SpamAssassin to parse its configuration files.
+Please refer to the <code>Mail::SpamAssassin</code> documentation for public interfaces.</p>
+<p>
+</p>
+<hr />
+<h1><a name="structure_of_a_config_block">STRUCTURE OF A CONFIG BLOCK</a></h1>
+<p>This is the structure of a config-setting block. Each is a hashref which may
+contain these keys:</p>
+<dl>
+<dt><strong><a name="item_setting">setting</a></strong><br />
+</dt>
+<dd>
+the name of the setting it modifies, e.g. ``required_score''. this also doubles
+as the default for 'command' (below). THIS IS REQUIRED.
+</dd>
+<p></p>
+<dt><strong><a name="item_command">command</a></strong><br />
+</dt>
+<dd>
+The command string used in the config file for this setting. Optional;
+'setting' will be used for the command if this is omitted.
+</dd>
+<p></p>
+<dt><strong><a name="item_aliases">aliases</a></strong><br />
+</dt>
+<dd>
+An [aryref] of other aliases for the same command. optional.
+</dd>
+<p></p>
+<dt><strong><a name="item_type">type</a></strong><br />
+</dt>
+<dd>
+The type of this setting:
+</dd>
+<dd>
+<pre>
+ - $CONF_TYPE_STRING: string
+ - $CONF_TYPE_NUMERIC: numeric value (float or int)
+ - $CONF_TYPE_BOOL: boolean (0/no or 1/yes)
+ - $CONF_TYPE_TEMPLATE: template, like "report"
+ - $CONF_TYPE_ADDRLIST: address list, like "whitelist_from"
+ - $CONF_TYPE_HASH_KEY_VALUE: hash key/value pair,
+ like "describe" or tflags</pre>
+</dd>
+<dd>
+<p>If this is set, a 'code' block is assigned based on the type.</p>
+</dd>
+<dd>
+<p>Note that <code>$CONF_TYPE_HASH_KEY_VALUE</code>-type settings require that the
+value be non-empty, otherwise they'll produce a warning message.</p>
+</dd>
+<p></p>
+<dt><strong><a name="item_code">code</a></strong><br />
+</dt>
+<dd>
+A subroutine to deal with the setting. Only used if <strong>type</strong> is not set. ONE OF
+<strong>code</strong> OR <strong>type</strong> IS REQUIRED. The arguments passed to the function are
+<code>($self, $key, $value, $line)</code>, where $key is the setting (*not* the command),
+$value is the value string, and $line is the entire line.
+</dd>
+<dd>
+<p>There are two special return values that the <strong>code</strong> subroutine may return
+to signal that there is an error in the configuration:</p>
+</dd>
+<dd>
+<p><code>$Mail::SpamAssassin::Conf::MISSING_REQUIRED_VALUE</code> -- this setting requires
+that a value be set, but one was not provided.</p>
+</dd>
+<dd>
+<p><code>$Mail::SpamAssassin::Conf::INVALID_VALUE</code> -- this setting requires a value
+from a set of 'valid' values, but the user provided an invalid one.</p>
+</dd>
+<dd>
+<p>Any other values -- including <code>undef</code> -- returned from the subroutine are
+considered to mean 'success'.</p>
+</dd>
+<p></p>
+<dt><strong><a name="item_default">default</a></strong><br />
+</dt>
+<dd>
+The default value for the setting. may be omitted if the default value is a
+non-scalar type, which should be set in the Conf ctor. note for path types:
+using ``__userstate__'' is recommended for defaults, as it allows
+Mail::SpamAssassin module users who set that configuration setting, to receive
+the correct values.
+</dd>
+<p></p>
+<dt><strong><a name="item_is_priv">is_priv</a></strong><br />
+</dt>
+<dd>
+Set to 1 if this setting requires 'allow_user_rules' when run from spamd.
+</dd>
+<p></p>
+<dt><strong><a name="item_is_admin">is_admin</a></strong><br />
+</dt>
+<dd>
+Set to 1 if this setting can only be set in the system-wide config when run
+from spamd. (All settings can be used by local programs run directly by the
+user.)
+</dd>
+<p></p>
+<dt><strong><a name="item_is_frequent">is_frequent</a></strong><br />
+</dt>
+<dd>
+Set to 1 if this value occurs frequently in the config. this means it's looked
+up first for speed.
+</dd>
+<p></p></dl>
+<p>
+</p>
+<hr />
+<h1><a name="methods">METHODS</a></h1>
+</dl>
+
+</body>
+
+</html>
Added: spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Conf_Parser.txt
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Conf_Parser.txt?view=auto&rev=534420
==============================================================================
--- spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Conf_Parser.txt (added)
+++ spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Conf_Parser.txt Wed May 2 05:33:04 2007
@@ -0,0 +1,86 @@
+NAME
+ Mail::SpamAssassin::Conf::Parser - parse SpamAssassin configuration
+
+SYNOPSIS
+ (see Mail::SpamAssassin)
+
+DESCRIPTION
+ Mail::SpamAssassin is a module to identify spam using text analysis and
+ several internet-based realtime blacklists.
+
+ This class is used internally by SpamAssassin to parse its configuration
+ files. Please refer to the "Mail::SpamAssassin" documentation for public
+ interfaces.
+
+STRUCTURE OF A CONFIG BLOCK
+ This is the structure of a config-setting block. Each is a hashref which
+ may contain these keys:
+
+ setting
+ the name of the setting it modifies, e.g. "required_score". this
+ also doubles as the default for 'command' (below). THIS IS REQUIRED.
+
+ command
+ The command string used in the config file for this setting.
+ Optional; 'setting' will be used for the command if this is omitted.
+
+ aliases
+ An [aryref] of other aliases for the same command. optional.
+
+ type
+ The type of this setting:
+
+ - $CONF_TYPE_STRING: string
+ - $CONF_TYPE_NUMERIC: numeric value (float or int)
+ - $CONF_TYPE_BOOL: boolean (0/no or 1/yes)
+ - $CONF_TYPE_TEMPLATE: template, like "report"
+ - $CONF_TYPE_ADDRLIST: address list, like "whitelist_from"
+ - $CONF_TYPE_HASH_KEY_VALUE: hash key/value pair,
+ like "describe" or tflags
+
+ If this is set, a 'code' block is assigned based on the type.
+
+ Note that $CONF_TYPE_HASH_KEY_VALUE-type settings require that the
+ value be non-empty, otherwise they'll produce a warning message.
+
+ code
+ A subroutine to deal with the setting. Only used if type is not set.
+ ONE OF code OR type IS REQUIRED. The arguments passed to the
+ function are "($self, $key, $value, $line)", where $key is the
+ setting (*not* the command), $value is the value string, and $line
+ is the entire line.
+
+ There are two special return values that the code subroutine may
+ return to signal that there is an error in the configuration:
+
+ $Mail::SpamAssassin::Conf::MISSING_REQUIRED_VALUE -- this setting
+ requires that a value be set, but one was not provided.
+
+ $Mail::SpamAssassin::Conf::INVALID_VALUE -- this setting requires a
+ value from a set of 'valid' values, but the user provided an invalid
+ one.
+
+ Any other values -- including "undef" -- returned from the
+ subroutine are considered to mean 'success'.
+
+ default
+ The default value for the setting. may be omitted if the default
+ value is a non-scalar type, which should be set in the Conf ctor.
+ note for path types: using "__userstate__" is recommended for
+ defaults, as it allows Mail::SpamAssassin module users who set that
+ configuration setting, to receive the correct values.
+
+ is_priv
+ Set to 1 if this setting requires 'allow_user_rules' when run from
+ spamd.
+
+ is_admin
+ Set to 1 if this setting can only be set in the system-wide config
+ when run from spamd. (All settings can be used by local programs run
+ directly by the user.)
+
+ is_frequent
+ Set to 1 if this value occurs frequently in the config. this means
+ it's looked up first for speed.
+
+METHODS
Added: spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Conf_SQL.html
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Conf_SQL.html?view=auto&rev=534420
==============================================================================
--- spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Conf_SQL.html (added)
+++ spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Conf_SQL.html Wed May 2 05:33:04 2007
@@ -0,0 +1,56 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Mail::SpamAssassin::Conf::SQL - load SpamAssassin scores from SQL database</title>
+<link rev="made" href="mailto:jm@apache.org" />
+</head>
+
+<body style="background-color: white">
+
+<p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
+
+<ul>
+
+ <li><a href="#name">NAME</a></li>
+ <li><a href="#synopsis">SYNOPSIS</a></li>
+ <li><a href="#description">DESCRIPTION</a></li>
+ <li><a href="#methods">METHODS</a></li>
+</ul>
+<!-- INDEX END -->
+
+<hr />
+<p>
+</p>
+<h1><a name="name">NAME</a></h1>
+<p>Mail::SpamAssassin::Conf::SQL - load SpamAssassin scores from SQL database</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<pre>
+ (see Mail::SpamAssassin)</pre>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+<p>Mail::SpamAssassin is a module to identify spam using text analysis and
+several internet-based realtime blacklists.</p>
+<p>This class is used internally by SpamAssassin to load scores from an SQL
+database. Please refer to the <code>Mail::SpamAssassin</code> documentation for public
+interfaces.</p>
+<p>
+</p>
+<hr />
+<h1><a name="methods">METHODS</a></h1>
+<dl>
+<dt><strong><a name="item_load">$f->load ($username)</a></strong><br />
+</dt>
+<dd>
+Read configuration paramaters from SQL database and parse scores from it.
+</dd>
+</dl>
+
+</body>
+
+</html>
Added: spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Conf_SQL.txt
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Conf_SQL.txt?view=auto&rev=534420
==============================================================================
--- spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Conf_SQL.txt (added)
+++ spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Conf_SQL.txt Wed May 2 05:33:04 2007
@@ -0,0 +1,20 @@
+NAME
+ Mail::SpamAssassin::Conf::SQL - load SpamAssassin scores from SQL
+ database
+
+SYNOPSIS
+ (see Mail::SpamAssassin)
+
+DESCRIPTION
+ Mail::SpamAssassin is a module to identify spam using text analysis and
+ several internet-based realtime blacklists.
+
+ This class is used internally by SpamAssassin to load scores from an SQL
+ database. Please refer to the "Mail::SpamAssassin" documentation for
+ public interfaces.
+
+METHODS
+ $f->load ($username)
+ Read configuration paramaters from SQL database and parse scores
+ from it.
+
Added: spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_DnsResolver.html
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_DnsResolver.html?view=auto&rev=534420
==============================================================================
--- spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_DnsResolver.html (added)
+++ spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_DnsResolver.html Wed May 2 05:33:04 2007
@@ -0,0 +1,170 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Mail::SpamAssassin::DnsResolver - DNS resolution engine</title>
+<link rev="made" href="mailto:jm@apache.org" />
+</head>
+
+<body style="background-color: white">
+
+<p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
+
+<ul>
+
+ <li><a href="#name">NAME</a></li>
+ <li><a href="#description">DESCRIPTION</a></li>
+ <li><a href="#methods">METHODS</a></li>
+</ul>
+<!-- INDEX END -->
+
+<hr />
+<p>
+</p>
+<h1><a name="name">NAME</a></h1>
+<p>Mail::SpamAssassin::DnsResolver - DNS resolution engine</p>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+<p>This is a DNS resolution engine for SpamAssassin, implemented in order to
+reduce file descriptor usage by Net::DNS and avoid a response collision bug in
+that module.</p>
+<p>
+</p>
+<hr />
+<h1><a name="methods">METHODS</a></h1>
+<dl>
+<dt><strong><a name="item_load_resolver">$res-><code>load_resolver()</code></a></strong><br />
+</dt>
+<dd>
+Load the <code>Net::DNS::Resolver</code> object. Returns 0 if Net::DNS cannot be used,
+1 if it is available.
+</dd>
+<p></p>
+<dt><strong><a name="item_get_resolver">$resolver = $res-><code>get_resolver()</code></a></strong><br />
+</dt>
+<dd>
+Return the <code>Net::DNS::Resolver</code> object.
+</dd>
+<p></p>
+<dt><strong><a name="item_nameservers">$res-><code>nameservers()</code></a></strong><br />
+</dt>
+<dd>
+Wrapper for Net::DNS::Resolver->nameservers to get or set list of nameservers
+</dd>
+<p></p>
+<dt><strong><a name="item_connect_sock">$res-><code>connect_sock()</code></a></strong><br />
+</dt>
+<dd>
+Re-connect to the first nameserver listed in <code>/etc/resolv.conf</code> or similar
+platform-dependent source, as provided by <code>Net::DNS</code>.
+</dd>
+<p></p>
+<dt><strong><a name="item_get_sock">$res-><code>get_sock()</code></a></strong><br />
+</dt>
+<dd>
+Return the <code>IO::Socket::INET</code> object used to communicate with
+the nameserver.
+</dd>
+<p></p>
+<dt><strong><a name="item_new_dns_packet">$packet = new_dns_packet ($host, $type, $class)</a></strong><br />
+</dt>
+<dd>
+A wrapper for <code>Net::DNS::Packet::new()</code> which traps a die thrown by it.
+</dd>
+<dd>
+<p>To use this, change calls to <code>Net::DNS::Resolver::bgsend</code> from:</p>
+</dd>
+<dd>
+<pre>
+ $res->bgsend($hostname, $type);</pre>
+</dd>
+<dd>
+<p>to:</p>
+</dd>
+<dd>
+<pre>
+ $res->bgsend(Mail::SpamAssassin::DnsResolver::new_dns_packet($hostname, $type, $class));</pre>
+</dd>
+<p></p>
+<dt><strong><a name="item_bgsend">$id = $res->bgsend($host, $type, $class, $cb)</a></strong><br />
+</dt>
+<dd>
+Quite similar to <code>Net::DNS::Resolver::bgsend</code>, except that when a response
+packet eventually arrives, and <a href="#item_poll_responses"><code>poll_responses</code></a> is called, the callback
+sub reference <code>$cb</code> will be called.
+</dd>
+<dd>
+<p>Note that <code>$type</code> and <code>$class</code> may be <code>undef</code>, in which case they
+will default to <code>A</code> and <code>IN</code>, respectively.</p>
+</dd>
+<dd>
+<p>The callback sub will be called with two arguments -- the packet that was
+delivered and an id string that fingerprints the query packet and the expected reply.
+It is expected that a closure callback be used, like so:</p>
+</dd>
+<dd>
+<pre>
+ my $id = $self->{resolver}->bgsend($host, $type, undef, sub {
+ my $reply = shift;
+ my $reply_id = shift;
+ $self->got_a_reply ($reply, $reply_id);
+ });</pre>
+</dd>
+<dd>
+<p>The callback can ignore the reply as an invalid packet sent to the listening port
+if the reply id does not match the return value from bgsend.</p>
+</dd>
+<p></p>
+<dt><strong><a name="item_poll_responses">$nfound = $res-><code>poll_responses()</code></a></strong><br />
+</dt>
+<dd>
+See if there are any <a href="#item_bgsend"><code>bgsend</code></a> response packets ready, and return
+the number of such packets delivered to their callbacks.
+</dd>
+<p></p>
+<dt><strong><a name="item_bgabort">$res-><code>bgabort()</code></a></strong><br />
+</dt>
+<dd>
+Call this to release pending requests from memory, when aborting backgrounded
+requests, or when the scan is complete.
+<code>Mail::SpamAssassin::PerMsgStatus::check</code> calls this before returning.
+</dd>
+<p></p>
+<dt><strong><a name="item_send">$packet = $res->send($name, $type, $class)</a></strong><br />
+</dt>
+<dd>
+Emulates <a href="#item_send"><code>Net::DNS::Resolver::send()</code></a>.
+</dd>
+<p></p>
+<dt><strong><a name="item_errorstring">$res-><code>errorstring()</code></a></strong><br />
+</dt>
+<dd>
+Little more than a stub for callers expecting this from <code>Net::DNS::Resolver</code>.
+</dd>
+<dd>
+<p>If called immediately after a call to $res->send this will return
+<code>query timed out</code> if the $res->send DNS query timed out. Otherwise
+<code>unknown error or no error</code> will be returned.</p>
+</dd>
+<dd>
+<p>No other errors are reported.</p>
+</dd>
+<p></p>
+<dt><strong><a name="item_finish_socket">$res-><code>finish_socket()</code></a></strong><br />
+</dt>
+<dd>
+Reset socket when done with it.
+</dd>
+<p></p>
+<dt><strong><a name="item_finish">$res-><code>finish()</code></a></strong><br />
+</dt>
+<dd>
+Clean up for destruction.
+</dd>
+<p></p></dl>
+
+</body>
+
+</html>
Added: spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_DnsResolver.txt
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_DnsResolver.txt?view=auto&rev=534420
==============================================================================
--- spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_DnsResolver.txt (added)
+++ spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_DnsResolver.txt Wed May 2 05:33:04 2007
@@ -0,0 +1,92 @@
+NAME
+ Mail::SpamAssassin::DnsResolver - DNS resolution engine
+
+DESCRIPTION
+ This is a DNS resolution engine for SpamAssassin, implemented in order
+ to reduce file descriptor usage by Net::DNS and avoid a response
+ collision bug in that module.
+
+METHODS
+ $res->load_resolver()
+ Load the "Net::DNS::Resolver" object. Returns 0 if Net::DNS cannot
+ be used, 1 if it is available.
+
+ $resolver = $res->get_resolver()
+ Return the "Net::DNS::Resolver" object.
+
+ $res->nameservers()
+ Wrapper for Net::DNS::Resolver->nameservers to get or set list of
+ nameservers
+
+ $res->connect_sock()
+ Re-connect to the first nameserver listed in "/etc/resolv.conf" or
+ similar platform-dependent source, as provided by "Net::DNS".
+
+ $res->get_sock()
+ Return the "IO::Socket::INET" object used to communicate with the
+ nameserver.
+
+ $packet = new_dns_packet ($host, $type, $class)
+ A wrapper for "Net::DNS::Packet::new()" which traps a die thrown by
+ it.
+
+ To use this, change calls to "Net::DNS::Resolver::bgsend" from:
+
+ $res->bgsend($hostname, $type);
+
+ to:
+
+ $res->bgsend(Mail::SpamAssassin::DnsResolver::new_dns_packet($hostname, $type, $class));
+
+ $id = $res->bgsend($host, $type, $class, $cb)
+ Quite similar to "Net::DNS::Resolver::bgsend", except that when a
+ response packet eventually arrives, and "poll_responses" is called,
+ the callback sub reference $cb will be called.
+
+ Note that $type and $class may be "undef", in which case they will
+ default to "A" and "IN", respectively.
+
+ The callback sub will be called with two arguments -- the packet
+ that was delivered and an id string that fingerprints the query
+ packet and the expected reply. It is expected that a closure
+ callback be used, like so:
+
+ my $id = $self->{resolver}->bgsend($host, $type, undef, sub {
+ my $reply = shift;
+ my $reply_id = shift;
+ $self->got_a_reply ($reply, $reply_id);
+ });
+
+ The callback can ignore the reply as an invalid packet sent to the
+ listening port if the reply id does not match the return value from
+ bgsend.
+
+ $nfound = $res->poll_responses()
+ See if there are any "bgsend" response packets ready, and return the
+ number of such packets delivered to their callbacks.
+
+ $res->bgabort()
+ Call this to release pending requests from memory, when aborting
+ backgrounded requests, or when the scan is complete.
+ "Mail::SpamAssassin::PerMsgStatus::check" calls this before
+ returning.
+
+ $packet = $res->send($name, $type, $class)
+ Emulates "Net::DNS::Resolver::send()".
+
+ $res->errorstring()
+ Little more than a stub for callers expecting this from
+ "Net::DNS::Resolver".
+
+ If called immediately after a call to $res->send this will return
+ "query timed out" if the $res->send DNS query timed out. Otherwise
+ "unknown error or no error" will be returned.
+
+ No other errors are reported.
+
+ $res->finish_socket()
+ Reset socket when done with it.
+
+ $res->finish()
+ Clean up for destruction.
+
Added: spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger.html
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger.html?view=auto&rev=534420
==============================================================================
--- spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger.html (added)
+++ spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger.html Wed May 2 05:33:04 2007
@@ -0,0 +1,132 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Mail::SpamAssassin::Logger - SpamAssassin logging module</title>
+<link rev="made" href="mailto:jm@apache.org" />
+</head>
+
+<body style="background-color: white">
+
+<p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
+
+<ul>
+
+ <li><a href="#name">NAME</a></li>
+ <li><a href="#synopsis">SYNOPSIS</a></li>
+ <li><a href="#methods">METHODS</a></li>
+</ul>
+<!-- INDEX END -->
+
+<hr />
+<p>
+</p>
+<h1><a name="name">NAME</a></h1>
+<p>Mail::SpamAssassin::Logger - SpamAssassin logging module</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<pre>
+ use Mail::SpamAssassin::Logger;</pre>
+<pre>
+ $SIG{__WARN__} = sub {
+ log_message("warn", $_[0]);
+ };</pre>
+<pre>
+ $SIG{__DIE__} = sub {
+ log_message("error", $_[0]) if $_[0] !~ /\bin eval\b/;
+ };</pre>
+<p>
+</p>
+<hr />
+<h1><a name="methods">METHODS</a></h1>
+<dl>
+<dt><strong><a name="item_add_facilities"><code>add_facilities(facilities)</code></a></strong><br />
+</dt>
+<dd>
+Enable debug logging for specific facilities. Each facility is the area
+of code to debug. Facilities can be specified as a hash reference (the
+key names are used), an array reference, an array, or a comma-separated
+scalar string.
+</dd>
+<dd>
+<p>If ``all'' is listed, then all debug facilities are enabled. Higher
+priority informational messages that are suitable for logging in normal
+circumstances are available with an area of ``info''. Some very verbose
+messages require the facility to be specifically enabled (see
+<a href="#item_would_log"><code>would_log</code></a> below).</p>
+</dd>
+<p></p>
+<dt><strong><a name="item_log_message">log_message($level, $message)</a></strong><br />
+</dt>
+<dt><strong>log_message($level, @message)</strong><br />
+</dt>
+<dd>
+Log a message at a specific level. Levels are specified as strings:
+``warn'', ``error'', ``info'', and ``dbg''. The first element of the message
+must be prefixed with a facility name followed directly by a colon.
+</dd>
+<p></p>
+<dt><strong><a name="item_dbg">dbg(``facility: message'')</a></strong><br />
+</dt>
+<dd>
+This is used for all low priority debugging messages.
+</dd>
+<p></p>
+<dt><strong><a name="item_info">info(``facility: message'')</a></strong><br />
+</dt>
+<dd>
+This is used for informational messages indicating a normal, but
+significant, condition. This should be infrequently called. These
+messages are typically logged when SpamAssassin is run as a daemon.
+</dd>
+<p></p>
+<dt><strong><a name="item_add">add(method => 'syslog', socket => $socket, facility => $facility)</a></strong><br />
+</dt>
+<dd>
+<code>socket</code> is the type the syslog (``unix'' or ``inet''). <code>facility</code> is the
+syslog facility (typically ``mail'').
+</dd>
+<p></p>
+<dt><strong>add(method => 'file', filename => $file)</strong><br />
+</dt>
+<dd>
+<code>filename</code> is the name of the log file.
+</dd>
+<p></p>
+<dt><strong>add(method => 'stderr')</strong><br />
+</dt>
+<dd>
+No options are needed for stderr logging, just don't close stderr first.
+</dd>
+<p></p>
+<dt><strong><a name="item_remove"><code>remove(method)</code></a></strong><br />
+</dt>
+<dd>
+Remove a logging method. Only the method name needs to be passed as a
+scalar.
+</dd>
+<p></p>
+<dt><strong><a name="item_would_log">would_log($level, $facility)</a></strong><br />
+</dt>
+<dd>
+Returns 0 if a message at the given level and with the given facility
+would be logged. Returns 1 if a message at a given level and facility
+would be logged normally. Returns 2 if the facility was specifically
+enabled.
+</dd>
+<dd>
+<p>The facility argument is optional.</p>
+</dd>
+<p></p>
+<dt><strong><a name="item_close_log"><code>close_log()</code></a></strong><br />
+</dt>
+<dd>
+Close all logs.
+</dd>
+<p></p></dl>
+
+</body>
+
+</html>
Added: spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger.txt
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger.txt?view=auto&rev=534420
==============================================================================
--- spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger.txt (added)
+++ spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger.txt Wed May 2 05:33:04 2007
@@ -0,0 +1,67 @@
+NAME
+ Mail::SpamAssassin::Logger - SpamAssassin logging module
+
+SYNOPSIS
+ use Mail::SpamAssassin::Logger;
+
+ $SIG{__WARN__} = sub {
+ log_message("warn", $_[0]);
+ };
+
+ $SIG{__DIE__} = sub {
+ log_message("error", $_[0]) if $_[0] !~ /\bin eval\b/;
+ };
+
+METHODS
+ add_facilities(facilities)
+ Enable debug logging for specific facilities. Each facility is the
+ area of code to debug. Facilities can be specified as a hash
+ reference (the key names are used), an array reference, an array, or
+ a comma-separated scalar string.
+
+ If "all" is listed, then all debug facilities are enabled. Higher
+ priority informational messages that are suitable for logging in
+ normal circumstances are available with an area of "info". Some very
+ verbose messages require the facility to be specifically enabled
+ (see "would_log" below).
+
+ log_message($level, $message)
+ log_message($level, @message)
+ Log a message at a specific level. Levels are specified as strings:
+ "warn", "error", "info", and "dbg". The first element of the message
+ must be prefixed with a facility name followed directly by a colon.
+
+ dbg("facility: message")
+ This is used for all low priority debugging messages.
+
+ info("facility: message")
+ This is used for informational messages indicating a normal, but
+ significant, condition. This should be infrequently called. These
+ messages are typically logged when SpamAssassin is run as a daemon.
+
+ add(method => 'syslog', socket => $socket, facility => $facility)
+ "socket" is the type the syslog ("unix" or "inet"). "facility" is
+ the syslog facility (typically "mail").
+
+ add(method => 'file', filename => $file)
+ "filename" is the name of the log file.
+
+ add(method => 'stderr')
+ No options are needed for stderr logging, just don't close stderr
+ first.
+
+ remove(method)
+ Remove a logging method. Only the method name needs to be passed as
+ a scalar.
+
+ would_log($level, $facility)
+ Returns 0 if a message at the given level and with the given
+ facility would be logged. Returns 1 if a message at a given level
+ and facility would be logged normally. Returns 2 if the facility was
+ specifically enabled.
+
+ The facility argument is optional.
+
+ close_log()
+ Close all logs.
+
Added: spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_File.html
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_File.html?view=auto&rev=534420
==============================================================================
--- spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_File.html (added)
+++ spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_File.html Wed May 2 05:33:04 2007
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Mail::SpamAssassin::Logger::File - log to file</title>
+<link rev="made" href="mailto:jm@apache.org" />
+</head>
+
+<body style="background-color: white">
+
+<p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
+
+<ul>
+
+ <li><a href="#name">NAME</a></li>
+ <li><a href="#synopsis">SYNOPSIS</a></li>
+ <li><a href="#description">DESCRIPTION</a></li>
+</ul>
+<!-- INDEX END -->
+
+<hr />
+<p>
+</p>
+<h1><a name="name">NAME</a></h1>
+<p>Mail::SpamAssassin::Logger::File - log to file</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<pre>
+ loadplugin Mail::SpamAssassin::Logger::File</pre>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+
+</body>
+
+</html>
Added: spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_File.txt
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_File.txt?view=auto&rev=534420
==============================================================================
--- spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_File.txt (added)
+++ spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_File.txt Wed May 2 05:33:04 2007
@@ -0,0 +1,7 @@
+NAME
+ Mail::SpamAssassin::Logger::File - log to file
+
+SYNOPSIS
+ loadplugin Mail::SpamAssassin::Logger::File
+
+DESCRIPTION
Added: spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_Stderr.html
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_Stderr.html?view=auto&rev=534420
==============================================================================
--- spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_Stderr.html (added)
+++ spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_Stderr.html Wed May 2 05:33:04 2007
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Mail::SpamAssassin::Logger::Stderr - log to standard error</title>
+<link rev="made" href="mailto:jm@apache.org" />
+</head>
+
+<body style="background-color: white">
+
+<p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
+
+<ul>
+
+ <li><a href="#name">NAME</a></li>
+ <li><a href="#synopsis">SYNOPSIS</a></li>
+ <li><a href="#description">DESCRIPTION</a></li>
+</ul>
+<!-- INDEX END -->
+
+<hr />
+<p>
+</p>
+<h1><a name="name">NAME</a></h1>
+<p>Mail::SpamAssassin::Logger::Stderr - log to standard error</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<pre>
+ loadplugin Mail::SpamAssassin::Logger::Stderr</pre>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+
+</body>
+
+</html>
Added: spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_Stderr.txt
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_Stderr.txt?view=auto&rev=534420
==============================================================================
--- spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_Stderr.txt (added)
+++ spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_Stderr.txt Wed May 2 05:33:04 2007
@@ -0,0 +1,7 @@
+NAME
+ Mail::SpamAssassin::Logger::Stderr - log to standard error
+
+SYNOPSIS
+ loadplugin Mail::SpamAssassin::Logger::Stderr
+
+DESCRIPTION
Added: spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_Syslog.html
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_Syslog.html?view=auto&rev=534420
==============================================================================
--- spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_Syslog.html (added)
+++ spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_Syslog.html Wed May 2 05:33:04 2007
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Mail::SpamAssassin::Logger::Syslog - log to syslog</title>
+<link rev="made" href="mailto:jm@apache.org" />
+</head>
+
+<body style="background-color: white">
+
+<p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
+
+<ul>
+
+ <li><a href="#name">NAME</a></li>
+ <li><a href="#synopsis">SYNOPSIS</a></li>
+ <li><a href="#description">DESCRIPTION</a></li>
+</ul>
+<!-- INDEX END -->
+
+<hr />
+<p>
+</p>
+<h1><a name="name">NAME</a></h1>
+<p>Mail::SpamAssassin::Logger::Syslog - log to syslog</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<pre>
+ loadplugin Mail::SpamAssassin::Logger::Syslog</pre>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+
+</body>
+
+</html>
Added: spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_Syslog.txt
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_Syslog.txt?view=auto&rev=534420
==============================================================================
--- spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_Syslog.txt (added)
+++ spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Logger_Syslog.txt Wed May 2 05:33:04 2007
@@ -0,0 +1,7 @@
+NAME
+ Mail::SpamAssassin::Logger::Syslog - log to syslog
+
+SYNOPSIS
+ loadplugin Mail::SpamAssassin::Logger::Syslog
+
+DESCRIPTION
Added: spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message.html
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message.html?view=auto&rev=534420
==============================================================================
--- spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message.html (added)
+++ spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message.html Wed May 2 05:33:04 2007
@@ -0,0 +1,208 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Mail::SpamAssassin::Message - decode, render, and hold an RFC-2822 message</title>
+<link rev="made" href="mailto:jm@apache.org" />
+</head>
+
+<body style="background-color: white">
+
+<p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
+
+<ul>
+
+ <li><a href="#name">NAME</a></li>
+ <li><a href="#description">DESCRIPTION</a></li>
+ <li><a href="#public_methods">PUBLIC METHODS</a></li>
+ <li><a href="#parsing_methods__nonpublic">PARSING METHODS, NON-PUBLIC</a></li>
+</ul>
+<!-- INDEX END -->
+
+<hr />
+<p>
+</p>
+<h1><a name="name">NAME</a></h1>
+<p>Mail::SpamAssassin::Message - decode, render, and hold an RFC-2822 message</p>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+<p>This module encapsulates an email message and allows access to the various MIME
+message parts and message metadata.</p>
+<p>The message structure, after initiating a <code>parse()</code> cycle, looks like this:
+</p>
+<pre>
+
+ Message object, also top-level node in Message::Node tree
+ |
+ +---> Message::Node for other parts in MIME structure
+ | |---> [ more Message::Node parts ... ]
+ | [ others ... ]
+ |
+ +---> Message::Metadata object to hold metadata</pre>
+<p>
+</p>
+<hr />
+<h1><a name="public_methods">PUBLIC METHODS</a></h1>
+<dl>
+<dt><strong><a name="item_new"><code>new()</code></a></strong><br />
+</dt>
+<dd>
+Creates a Mail::SpamAssassin::Message object. Takes a hash reference
+as a parameter. The used hash key/value pairs are as follows:
+</dd>
+<dd>
+<p><code>message</code> is either undef (which will use STDIN), a scalar of the
+entire message, an array reference of the message with 1 line per array
+element, and either a file glob or IO::File object which holds the entire
+contents of the message.</p>
+</dd>
+<dd>
+<p>Note: The message is expected to generally be in RFC 2822 format, optionally
+including an mbox message separator line (the ``From '' line) as the first line.</p>
+</dd>
+<dd>
+<p><code>parse_now</code> specifies whether or not to create the MIME tree
+at object-creation time or later as necessary.</p>
+</dd>
+<dd>
+<p>The <em>parse_now</em> option, by default, is set to false (0).
+This allows SpamAssassin to not have to generate the tree of
+Mail::SpamAssassin::Message::Node objects and their related data if the
+tree is not going to be used. This is handy, for instance, when running
+<code>spamassassin -d</code>, which only needs the pristine header and body which
+is always handled when the object is created.</p>
+</dd>
+<dd>
+<p><code>subparse</code> specifies how many MIME recursion levels should be parsed.
+Defaults to 20.</p>
+</dd>
+<p></p>
+<dt><strong><a name="item_find_parts"><code>find_parts()</code></a></strong><br />
+</dt>
+<dd>
+Used to search the tree for specific MIME parts. See
+<em>Mail::SpamAssassin::Message::Node</em> for more details.
+</dd>
+<p></p>
+<dt><strong><a name="item_get_pristine_header"><code>get_pristine_header()</code></a></strong><br />
+</dt>
+<dd>
+Returns pristine headers of the message. If no specific header name
+is given as a parameter (case-insensitive), then all headers will be
+returned as a scalar, including the blank line at the end of the headers.
+</dd>
+<dd>
+<p>If called in an array context, an array will be returned with each
+specific header in a different element. In a scalar context, the last
+specific header is returned.</p>
+</dd>
+<dd>
+<p>ie: If 'Subject' is specified as the header, and there are 2 Subject
+headers in a message, the last/bottom one in the message is returned in
+scalar context or both are returned in array context.</p>
+</dd>
+<dd>
+<p>Note: the returned header will include the ending newline and any embedded
+whitespace folding.</p>
+</dd>
+<p></p>
+<dt><strong><a name="item_get_mbox_separator"><code>get_mbox_separator()</code></a></strong><br />
+</dt>
+<dd>
+Returns the mbox separator found in the message, or undef if there
+wasn't one.
+</dd>
+<p></p>
+<dt><strong><a name="item_get_body"><code>get_body()</code></a></strong><br />
+</dt>
+<dd>
+Returns an array of the pristine message body, one line per array element.
+</dd>
+<p></p>
+<dt><strong><a name="item_get_pristine"><code>get_pristine()</code></a></strong><br />
+</dt>
+<dd>
+Returns a scalar of the entire pristine message.
+</dd>
+<p></p>
+<dt><strong><a name="item_get_pristine_body"><code>get_pristine_body()</code></a></strong><br />
+</dt>
+<dd>
+Returns a scalar of the pristine message body.
+</dd>
+<p></p>
+<dt><strong><a name="item_extract_message_metadata"><code>extract_message_metadata($permsgstatus)</code></a></strong><br />
+</dt>
+<dt><strong><a name="item_get_metadata">$str = <code>get_metadata($hdr)</code></a></strong><br />
+</dt>
+<dt><strong><a name="item_put_metadata">put_metadata($hdr, $text)</a></strong><br />
+</dt>
+<dt><strong><a name="item_delete_metadata"><code>delete_metadata($hdr)</code></a></strong><br />
+</dt>
+<dt><strong><a name="item_get_all_metadata">$str = <code>get_all_metadata()</code></a></strong><br />
+</dt>
+<dt><strong><a name="item_finish_metadata"><code>finish_metadata()</code></a></strong><br />
+</dt>
+<dd>
+Destroys the metadata for this message. Once a message has been
+scanned fully, the metadata is no longer required. Destroying
+this will free up some memory.
+</dd>
+<p></p>
+<dt><strong><a name="item_finish"><code>finish()</code></a></strong><br />
+</dt>
+<dd>
+Clean up an object so that it can be destroyed.
+</dd>
+<p></p>
+<dt><strong><a name="item_receive_date"><code>receive_date()</code></a></strong><br />
+</dt>
+<dd>
+Return a time_t value with the received date of the current message,
+or current time if received time couldn't be determined.
+</dd>
+<p></p></dl>
+<p>
+</p>
+<hr />
+<h1><a name="parsing_methods__nonpublic">PARSING METHODS, NON-PUBLIC</a></h1>
+<p>These methods take a RFC2822-esque formatted message and create a tree
+with all of the MIME body parts included. Those parts will be decoded
+as necessary, and text/html parts will be rendered into a standard text
+format, suitable for use in SpamAssassin.</p>
+<dl>
+<dt><strong><a name="item_parse_body"><code>parse_body()</code></a></strong><br />
+</dt>
+<dd>
+<a href="#item_parse_body"><code>parse_body()</code></a> passes the body part that was passed in onto the
+correct part parser, either <a href="#item__parse_multipart"><code>_parse_multipart()</code></a> for multipart/* parts,
+or <a href="#item__parse_normal"><code>_parse_normal()</code></a> for everything else. Multipart sections become the
+root of sub-trees, while everything else becomes a leaf in the tree.
+</dd>
+<dd>
+<p>For multipart messages, the first call to <a href="#item_parse_body"><code>parse_body()</code></a> doesn't create a
+new sub-tree and just uses the parent node to contain children. All other
+calls to <a href="#item_parse_body"><code>parse_body()</code></a> will cause a new sub-tree root to be created and
+children will exist underneath that root. (this is just so the tree
+doesn't have a root node which points at the actual root node ...)</p>
+</dd>
+<p></p>
+<dt><strong><a name="item__parse_multipart"><code>_parse_multipart()</code></a></strong><br />
+</dt>
+<dd>
+Generate a root node, and for each child part call <a href="#item_parse_body"><code>parse_body()</code></a>
+to generate the tree.
+</dd>
+<p></p>
+<dt><strong><a name="item__parse_normal"><code>_parse_normal()</code></a></strong><br />
+</dt>
+<dd>
+Generate a leaf node and add it to the parent.
+</dd>
+<p></p></dl>
+
+</body>
+
+</html>
Added: spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message.txt
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message.txt?view=auto&rev=534420
==============================================================================
--- spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message.txt (added)
+++ spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message.txt Wed May 2 05:33:04 2007
@@ -0,0 +1,125 @@
+NAME
+ Mail::SpamAssassin::Message - decode, render, and hold an RFC-2822
+ message
+
+DESCRIPTION
+ This module encapsulates an email message and allows access to the
+ various MIME message parts and message metadata.
+
+ The message structure, after initiating a parse() cycle, looks like
+ this:
+
+ Message object, also top-level node in Message::Node tree
+ |
+ +---> Message::Node for other parts in MIME structure
+ | |---> [ more Message::Node parts ... ]
+ | [ others ... ]
+ |
+ +---> Message::Metadata object to hold metadata
+
+PUBLIC METHODS
+ new()
+ Creates a Mail::SpamAssassin::Message object. Takes a hash reference
+ as a parameter. The used hash key/value pairs are as follows:
+
+ "message" is either undef (which will use STDIN), a scalar of the
+ entire message, an array reference of the message with 1 line per
+ array element, and either a file glob or IO::File object which holds
+ the entire contents of the message.
+
+ Note: The message is expected to generally be in RFC 2822 format,
+ optionally including an mbox message separator line (the "From "
+ line) as the first line.
+
+ "parse_now" specifies whether or not to create the MIME tree at
+ object-creation time or later as necessary.
+
+ The *parse_now* option, by default, is set to false (0). This allows
+ SpamAssassin to not have to generate the tree of
+ Mail::SpamAssassin::Message::Node objects and their related data if
+ the tree is not going to be used. This is handy, for instance, when
+ running "spamassassin -d", which only needs the pristine header and
+ body which is always handled when the object is created.
+
+ "subparse" specifies how many MIME recursion levels should be
+ parsed. Defaults to 20.
+
+ find_parts()
+ Used to search the tree for specific MIME parts. See
+ *Mail::SpamAssassin::Message::Node* for more details.
+
+ get_pristine_header()
+ Returns pristine headers of the message. If no specific header name
+ is given as a parameter (case-insensitive), then all headers will be
+ returned as a scalar, including the blank line at the end of the
+ headers.
+
+ If called in an array context, an array will be returned with each
+ specific header in a different element. In a scalar context, the
+ last specific header is returned.
+
+ ie: If 'Subject' is specified as the header, and there are 2 Subject
+ headers in a message, the last/bottom one in the message is returned
+ in scalar context or both are returned in array context.
+
+ Note: the returned header will include the ending newline and any
+ embedded whitespace folding.
+
+ get_mbox_separator()
+ Returns the mbox separator found in the message, or undef if there
+ wasn't one.
+
+ get_body()
+ Returns an array of the pristine message body, one line per array
+ element.
+
+ get_pristine()
+ Returns a scalar of the entire pristine message.
+
+ get_pristine_body()
+ Returns a scalar of the pristine message body.
+
+ extract_message_metadata($permsgstatus)
+ $str = get_metadata($hdr)
+ put_metadata($hdr, $text)
+ delete_metadata($hdr)
+ $str = get_all_metadata()
+ finish_metadata()
+ Destroys the metadata for this message. Once a message has been
+ scanned fully, the metadata is no longer required. Destroying this
+ will free up some memory.
+
+ finish()
+ Clean up an object so that it can be destroyed.
+
+ receive_date()
+ Return a time_t value with the received date of the current message,
+ or current time if received time couldn't be determined.
+
+PARSING METHODS, NON-PUBLIC
+ These methods take a RFC2822-esque formatted message and create a tree
+ with all of the MIME body parts included. Those parts will be decoded as
+ necessary, and text/html parts will be rendered into a standard text
+ format, suitable for use in SpamAssassin.
+
+ parse_body()
+ parse_body() passes the body part that was passed in onto the
+ correct part parser, either _parse_multipart() for multipart/*
+ parts, or _parse_normal() for everything else. Multipart sections
+ become the root of sub-trees, while everything else becomes a leaf
+ in the tree.
+
+ For multipart messages, the first call to parse_body() doesn't
+ create a new sub-tree and just uses the parent node to contain
+ children. All other calls to parse_body() will cause a new sub-tree
+ root to be created and children will exist underneath that root.
+ (this is just so the tree doesn't have a root node which points at
+ the actual root node ...)
+
+ _parse_multipart()
+ Generate a root node, and for each child part call parse_body() to
+ generate the tree.
+
+ _parse_normal()
+ Generate a leaf node and add it to the parent.
+
Added: spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message_Metadata.html
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message_Metadata.html?view=auto&rev=534420
==============================================================================
--- spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message_Metadata.html (added)
+++ spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message_Metadata.html Wed May 2 05:33:04 2007
@@ -0,0 +1,59 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Mail::SpamAssassin::Message::Metadata - extract metadata from a message</title>
+<link rev="made" href="mailto:jm@apache.org" />
+</head>
+
+<body style="background-color: white">
+
+<p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
+
+<ul>
+
+ <li><a href="#name">NAME</a></li>
+ <li><a href="#synopsis">SYNOPSIS</a></li>
+ <li><a href="#description">DESCRIPTION</a></li>
+ <li><a href="#public_methods">PUBLIC METHODS</a></li>
+</ul>
+<!-- INDEX END -->
+
+<hr />
+<p>
+</p>
+<h1><a name="name">NAME</a></h1>
+<p>Mail::SpamAssassin::Message::Metadata - extract metadata from a message</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+<p>This class is tasked with extracting ``metadata'' from messages for use as
+Bayes tokens, fodder for eval tests, or other rules. Metadata is
+supplemental data inferred from the message, like the examples below.</p>
+<p>It is held in two forms:</p>
+<p>1. as name-value pairs of strings, presented in mail header format. For
+ example, ``X-Language'' => ``en''. This is the general form for simple
+ metadata that's useful as Bayes tokens, can be added to marked-up
+ messages using ``add_header'', etc., such as the trusted-relay inference
+ and language detection.</p>
+<p>2. as more complex data structures on the $msg->{metadata} object. This
+ is the form used for metadata like the HTML parse data, which is stored
+ there for access by eval rule code. Because it's not simple strings,
+ it's not added as a Bayes token by default (Bayes needs simple strings).</p>
+<p>
+</p>
+<hr />
+<h1><a name="public_methods">PUBLIC METHODS</a></h1>
+<dl>
+<dt><strong><a name="item_new"><code>new()</code></a></strong><br />
+</dt>
+</dl>
+
+</body>
+
+</html>
Added: spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message_Metadata.txt
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message_Metadata.txt?view=auto&rev=534420
==============================================================================
--- spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message_Metadata.txt (added)
+++ spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message_Metadata.txt Wed May 2 05:33:04 2007
@@ -0,0 +1,23 @@
+NAME
+ Mail::SpamAssassin::Message::Metadata - extract metadata from a message
+
+SYNOPSIS
+DESCRIPTION
+ This class is tasked with extracting "metadata" from messages for use as
+ Bayes tokens, fodder for eval tests, or other rules. Metadata is
+ supplemental data inferred from the message, like the examples below.
+
+ It is held in two forms:
+
+ 1. as name-value pairs of strings, presented in mail header format. For
+ example, "X-Language" => "en". This is the general form for simple
+ metadata that's useful as Bayes tokens, can be added to marked-up
+ messages using "add_header", etc., such as the trusted-relay inference
+ and language detection.
+
+ 2. as more complex data structures on the $msg->{metadata} object. This
+ is the form used for metadata like the HTML parse data, which is stored
+ there for access by eval rule code. Because it's not simple strings,
+ it's not added as a Bayes token by default (Bayes needs simple strings).
+
+PUBLIC METHODS
Added: spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message_Node.html
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message_Node.html?view=auto&rev=534420
==============================================================================
--- spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message_Node.html (added)
+++ spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message_Node.html Wed May 2 05:33:04 2007
@@ -0,0 +1,220 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Mail::SpamAssassin::Message::Node - decode, render, and make available MIME message parts</title>
+<link rev="made" href="mailto:jm@apache.org" />
+</head>
+
+<body style="background-color: white">
+
+<p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
+
+<ul>
+
+ <li><a href="#name">NAME</a></li>
+ <li><a href="#synopsis">SYNOPSIS</a></li>
+ <li><a href="#description">DESCRIPTION</a></li>
+ <li><a href="#public_methods">PUBLIC METHODS</a></li>
+</ul>
+<!-- INDEX END -->
+
+<hr />
+<p>
+</p>
+<h1><a name="name">NAME</a></h1>
+<p>Mail::SpamAssassin::Message::Node - decode, render, and make available MIME message parts</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+<p>This module will encapsulate an email message and allow access to
+the various MIME message parts.</p>
+<p>
+</p>
+<hr />
+<h1><a name="public_methods">PUBLIC METHODS</a></h1>
+<dl>
+<dt><strong><a name="item_new"><code>new()</code></a></strong><br />
+</dt>
+<dd>
+Generates an empty Node object and returns it. Typically only called
+by functions in Message.
+</dd>
+<p></p>
+<dt><strong><a name="item_find_parts"><code>find_parts()</code></a></strong><br />
+</dt>
+<dd>
+Used to search the tree for specific MIME parts. An array of matching
+Node objects (pointers into the tree) is returned. The parameters that
+can be passed in are (in order, all scalars):
+</dd>
+<dd>
+<p>Regexp - Used to match against each part's Content-Type header,
+specifically the type and not the rest of the header. ie: ``Content-type:
+text/html; encoding=quoted-printable'' has a type of ``text/html''. If no
+regexp is specified, <a href="#item_find_parts"><code>find_parts()</code></a> will return an empty array.</p>
+</dd>
+<dd>
+<p>Only_leaves - By default, <a href="#item_find_parts"><code>find_parts()</code></a> will return any part that matches
+the regexp, including multipart. If you only want to see leaves of the
+tree (ie: parts that aren't multipart), set this to true (1).</p>
+</dd>
+<dd>
+<p>Recursive - By default, when <a href="#item_find_parts"><code>find_parts()</code></a> finds a multipart which has
+parts underneath it, it will recurse through all sub-children. If set to 0,
+only look at the part and any direct children of the part.</p>
+</dd>
+<p></p>
+<dt><strong><a name="item_header"><code>header()</code></a></strong><br />
+</dt>
+<dd>
+Stores and retrieves headers from a specific MIME part. The first
+parameter is the header name. If there is no other parameter, the header
+is retrieved. If there is a second parameter, the header is stored.
+</dd>
+<dd>
+<p>Header names are case-insensitive and are stored in both raw and
+decoded form. Using header(), only the decoded form is retrievable.</p>
+</dd>
+<dd>
+<p>For retrieval, if <a href="#item_header"><code>header()</code></a> is called in an array context, an array will
+be returned with each header entry in a different element. In a scalar
+context, the last specific header is returned.</p>
+</dd>
+<dd>
+<p>ie: If 'Subject' is specified as the header, and there are 2 Subject
+headers in a message, the last/bottom one in the message is returned in
+scalar context or both are returned in array context.</p>
+</dd>
+<p></p>
+<dt><strong><a name="item_raw_header"><code>raw_header()</code></a></strong><br />
+</dt>
+<dd>
+Retrieves the raw version of headers from a specific MIME part. The only
+parameter is the header name. Header names are case-insensitive.
+</dd>
+<dd>
+<p>For retrieval, if <a href="#item_raw_header"><code>raw_header()</code></a> is called in an array context, an array
+will be returned with each header entry in a different element. In a
+scalar context, the last specific header is returned.</p>
+</dd>
+<dd>
+<p>ie: If 'Subject' is specified as the header, and there are 2 Subject
+headers in a message, the last/bottom one in the message is returned in
+scalar context or both are returned in array context.</p>
+</dd>
+<p></p>
+<dt><strong><a name="item_add_body_part"><code>add_body_part()</code></a></strong><br />
+</dt>
+<dd>
+Adds a Node child object to the current node object.
+</dd>
+<p></p>
+<dt><strong><a name="item_is_leaf"><code>is_leaf()</code></a></strong><br />
+</dt>
+<dd>
+Returns true if the tree node in question is a leaf of the tree (ie:
+has no children of its own). Note: This function may return odd results
+unless the message has been mime parsed via _do_parse()!
+</dd>
+<p></p>
+<dt><strong><a name="item_raw"><code>raw()</code></a></strong><br />
+</dt>
+<dd>
+Return a reference to the the raw array. Treat this as READ ONLY.
+</dd>
+<p></p>
+<dt><strong><a name="item_decode"><code>decode()</code></a></strong><br />
+</dt>
+<dd>
+If necessary, decode the part text as base64 or quoted-printable.
+The decoded text will be returned as a scalar string. An optional length
+parameter can be passed in which limits how much decoded data is returned.
+If the scalar isn't needed, call with ``0'' as a parameter.
+</dd>
+<p></p>
+<dt><strong><a name="item_rendered"><code>rendered()</code></a></strong><br />
+</dt>
+<dd>
+<code>render_text()</code> takes the given text/* type MIME part, and attempts to
+render it into a text scalar. It will always render text/html, and will
+use a heuristic to determine if other text/* parts should be considered
+text/html. Two scalars are returned: the rendered type (either text/html
+or whatever the original type was), and the rendered text.
+</dd>
+<p></p>
+<dt><strong><a name="item_set_rendered">set_rendered($text, $type)</a></strong><br />
+</dt>
+<dd>
+Set the rendered text and type for the given part. If type is not
+specified, and text is a defined value, a default of 'text/plain' is used.
+This can be used, for instance, to render non-text parts using plugins.
+</dd>
+<p></p>
+<dt><strong><a name="item_visible_rendered"><code>visible_rendered()</code></a></strong><br />
+</dt>
+<dd>
+Render and return the visible text in this part.
+</dd>
+<p></p>
+<dt><strong><a name="item_invisible_rendered"><code>invisible_rendered()</code></a></strong><br />
+</dt>
+<dd>
+Render and return the invisible text in this part.
+</dd>
+<p></p>
+<dt><strong><a name="item_content_summary"><code>content_summary()</code></a></strong><br />
+</dt>
+<dd>
+Returns an array of scalars describing the mime parts of the message.
+Note: This function requires that the message be parsed first!
+</dd>
+<p></p>
+<dt><strong><a name="item_delete_header"><code>delete_header()</code></a></strong><br />
+</dt>
+<dd>
+Delete the specified header (decoded and raw) from the Node information.
+</dd>
+<p></p>
+<dt><strong><a name="item_get_header"><code>get_header()</code></a></strong><br />
+</dt>
+<dd>
+Retrieve a specific header. Will have a newline at the end and will be
+unfolded. The first parameter is the header name (case-insensitive),
+and the second parameter (optional) is whether or not to return the
+raw header.
+</dd>
+<dd>
+<p>If <a href="#item_get_header"><code>get_header()</code></a> is called in an array context, an array will be returned
+with each header entry in a different element. In a scalar context,
+the last specific header is returned.</p>
+</dd>
+<dd>
+<p>ie: If 'Subject' is specified as the header, and there are 2 Subject
+headers in a message, the last/bottom one in the message is returned in
+scalar context or both are returned in array context.</p>
+</dd>
+<p></p>
+<dt><strong><a name="item_get_all_headers"><code>get_all_headers()</code></a></strong><br />
+</dt>
+<dd>
+Retrieve all headers. Each header will have a newline at the end and
+will be unfolded. The first parameter (optional) is whether or not to
+return the raw headers, and the second parameter (optional) is whether
+or not to include the mbox separator.
+</dd>
+<dd>
+<p>If <code>get_all_header()</code> is called in an array context, an array will be
+returned with each header entry in a different element. In a scalar
+context, the headers are returned in a single scalar.</p>
+</dd>
+</dl>
+
+</body>
+
+</html>
Added: spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message_Node.txt
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message_Node.txt?view=auto&rev=534420
==============================================================================
--- spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message_Node.txt (added)
+++ spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_Message_Node.txt Wed May 2 05:33:04 2007
@@ -0,0 +1,136 @@
+NAME
+ Mail::SpamAssassin::Message::Node - decode, render, and make available
+ MIME message parts
+
+SYNOPSIS
+DESCRIPTION
+ This module will encapsulate an email message and allow access to the
+ various MIME message parts.
+
+PUBLIC METHODS
+ new()
+ Generates an empty Node object and returns it. Typically only called
+ by functions in Message.
+
+ find_parts()
+ Used to search the tree for specific MIME parts. An array of
+ matching Node objects (pointers into the tree) is returned. The
+ parameters that can be passed in are (in order, all scalars):
+
+ Regexp - Used to match against each part's Content-Type header,
+ specifically the type and not the rest of the header. ie:
+ "Content-type: text/html; encoding=quoted-printable" has a type of
+ "text/html". If no regexp is specified, find_parts() will return an
+ empty array.
+
+ Only_leaves - By default, find_parts() will return any part that
+ matches the regexp, including multipart. If you only want to see
+ leaves of the tree (ie: parts that aren't multipart), set this to
+ true (1).
+
+ Recursive - By default, when find_parts() finds a multipart which
+ has parts underneath it, it will recurse through all sub-children.
+ If set to 0, only look at the part and any direct children of the
+ part.
+
+ header()
+ Stores and retrieves headers from a specific MIME part. The first
+ parameter is the header name. If there is no other parameter, the
+ header is retrieved. If there is a second parameter, the header is
+ stored.
+
+ Header names are case-insensitive and are stored in both raw and
+ decoded form. Using header(), only the decoded form is retrievable.
+
+ For retrieval, if header() is called in an array context, an array
+ will be returned with each header entry in a different element. In a
+ scalar context, the last specific header is returned.
+
+ ie: If 'Subject' is specified as the header, and there are 2 Subject
+ headers in a message, the last/bottom one in the message is returned
+ in scalar context or both are returned in array context.
+
+ raw_header()
+ Retrieves the raw version of headers from a specific MIME part. The
+ only parameter is the header name. Header names are
+ case-insensitive.
+
+ For retrieval, if raw_header() is called in an array context, an
+ array will be returned with each header entry in a different
+ element. In a scalar context, the last specific header is returned.
+
+ ie: If 'Subject' is specified as the header, and there are 2 Subject
+ headers in a message, the last/bottom one in the message is returned
+ in scalar context or both are returned in array context.
+
+ add_body_part()
+ Adds a Node child object to the current node object.
+
+ is_leaf()
+ Returns true if the tree node in question is a leaf of the tree (ie:
+ has no children of its own). Note: This function may return odd
+ results unless the message has been mime parsed via _do_parse()!
+
+ raw()
+ Return a reference to the the raw array. Treat this as READ ONLY.
+
+ decode()
+ If necessary, decode the part text as base64 or quoted-printable.
+ The decoded text will be returned as a scalar string. An optional
+ length parameter can be passed in which limits how much decoded data
+ is returned. If the scalar isn't needed, call with "0" as a
+ parameter.
+
+ rendered()
+ render_text() takes the given text/* type MIME part, and attempts to
+ render it into a text scalar. It will always render text/html, and
+ will use a heuristic to determine if other text/* parts should be
+ considered text/html. Two scalars are returned: the rendered type
+ (either text/html or whatever the original type was), and the
+ rendered text.
+
+ set_rendered($text, $type)
+ Set the rendered text and type for the given part. If type is not
+ specified, and text is a defined value, a default of 'text/plain' is
+ used. This can be used, for instance, to render non-text parts using
+ plugins.
+
+ visible_rendered()
+ Render and return the visible text in this part.
+
+ invisible_rendered()
+ Render and return the invisible text in this part.
+
+ content_summary()
+ Returns an array of scalars describing the mime parts of the
+ message. Note: This function requires that the message be parsed
+ first!
+
+ delete_header()
+ Delete the specified header (decoded and raw) from the Node
+ information.
+
+ get_header()
+ Retrieve a specific header. Will have a newline at the end and will
+ be unfolded. The first parameter is the header name
+ (case-insensitive), and the second parameter (optional) is whether
+ or not to return the raw header.
+
+ If get_header() is called in an array context, an array will be
+ returned with each header entry in a different element. In a scalar
+ context, the last specific header is returned.
+
+ ie: If 'Subject' is specified as the header, and there are 2 Subject
+ headers in a message, the last/bottom one in the message is returned
+ in scalar context or both are returned in array context.
+
+ get_all_headers()
+ Retrieve all headers. Each header will have a newline at the end and
+ will be unfolded. The first parameter (optional) is whether or not
+ to return the raw headers, and the second parameter (optional) is
+ whether or not to include the mbox separator.
+
+ If get_all_header() is called in an array context, an array will be
+ returned with each header entry in a different element. In a scalar
+ context, the headers are returned in a single scalar.
+
Added: spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_PerMsgLearner.html
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_PerMsgLearner.html?view=auto&rev=534420
==============================================================================
--- spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_PerMsgLearner.html (added)
+++ spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_PerMsgLearner.html Wed May 2 05:33:04 2007
@@ -0,0 +1,75 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Mail::SpamAssassin::PerMsgLearner - per-message status</title>
+<link rev="made" href="mailto:jm@apache.org" />
+</head>
+
+<body style="background-color: white">
+
+<p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
+
+<ul>
+
+ <li><a href="#name">NAME</a></li>
+ <li><a href="#synopsis">SYNOPSIS</a></li>
+ <li><a href="#description">DESCRIPTION</a></li>
+ <li><a href="#methods">METHODS</a></li>
+ <li><a href="#see_also">SEE ALSO</a></li>
+</ul>
+<!-- INDEX END -->
+
+<hr />
+<p>
+</p>
+<h1><a name="name">NAME</a></h1>
+<p>Mail::SpamAssassin::PerMsgLearner - per-message status (spam or not-spam)</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<pre>
+ my $spamtest = new Mail::SpamAssassin ({
+ 'rules_filename' => '/etc/spamassassin.rules',
+ 'userprefs_filename' => $ENV{HOME}.'/.spamassassin/user_prefs'
+ });
+ my $mail = $spamtest->parse();</pre>
+<pre>
+ my $status = $spamtest->learn($mail,$id,$isspam,$forget);
+ my $didlearn = $status->did_learn();
+ $status->finish();</pre>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+<p>The Mail::SpamAssassin <code>learn()</code> method returns an object of this
+class. This object encapsulates all the per-message state for
+the learning process.</p>
+<p>
+</p>
+<hr />
+<h1><a name="methods">METHODS</a></h1>
+<dl>
+<dt><strong><a name="item_did_learn">$didlearn = $status-><code>did_learn()</code></a></strong><br />
+</dt>
+<dd>
+Returns <code>1</code> if the message was learned from or forgotten succesfully.
+</dd>
+<p></p>
+<dt><strong><a name="item_finish">$status-><code>finish()</code></a></strong><br />
+</dt>
+<dd>
+Finish with the object.
+</dd>
+<p></p></dl>
+<p>
+</p>
+<hr />
+<h1><a name="see_also">SEE ALSO</a></h1>
+<p><code>Mail::SpamAssassin</code>
+<code>spamassassin</code></p>
+
+</body>
+
+</html>
Added: spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_PerMsgLearner.txt
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_PerMsgLearner.txt?view=auto&rev=534420
==============================================================================
--- spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_PerMsgLearner.txt (added)
+++ spamassassin/site/full/3.2.x/doc/Mail_SpamAssassin_PerMsgLearner.txt Wed May 2 05:33:04 2007
@@ -0,0 +1,30 @@
+NAME
+ Mail::SpamAssassin::PerMsgLearner - per-message status (spam or
+ not-spam)
+
+SYNOPSIS
+ my $spamtest = new Mail::SpamAssassin ({
+ 'rules_filename' => '/etc/spamassassin.rules',
+ 'userprefs_filename' => $ENV{HOME}.'/.spamassassin/user_prefs'
+ });
+ my $mail = $spamtest->parse();
+
+ my $status = $spamtest->learn($mail,$id,$isspam,$forget);
+ my $didlearn = $status->did_learn();
+ $status->finish();
+
+DESCRIPTION
+ The Mail::SpamAssassin "learn()" method returns an object of this class.
+ This object encapsulates all the per-message state for the learning
+ process.
+
+METHODS
+ $didlearn = $status->did_learn()
+ Returns 1 if the message was learned from or forgotten succesfully.
+
+ $status->finish()
+ Finish with the object.
+
+SEE ALSO
+ "Mail::SpamAssassin" "spamassassin"
+