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 2006/10/16 17:57:59 UTC
svn commit: r464529 [8/11] - in /spamassassin/site/full/3.1.x: ./ doc/
Added: spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_TextCat.html
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_TextCat.html?view=auto&rev=464529
==============================================================================
--- spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_TextCat.html (added)
+++ spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_TextCat.html Mon Oct 16 08:57:50 2006
@@ -0,0 +1,271 @@
+<!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::Plugin::TextCat - TextCat language guesser</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="#user_options">USER OPTIONS</a></li>
+</ul>
+<!-- INDEX END -->
+
+<hr />
+<p>
+</p>
+<h1><a name="name">NAME</a></h1>
+<p>Mail::SpamAssassin::Plugin::TextCat - TextCat language guesser</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<pre>
+ loadplugin Mail::SpamAssassin::Plugin::TextCat</pre>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+<p>This plugin will try to guess the language used in the message text.</p>
+<p>You can then specify which languages are considered okay for incoming
+mail and if the guessed language is not okay, <code>UNWANTED_LANGUAGE_BODY</code>
+is triggered</p>
+<p>It will always add the results to a ``X-Language'' name-value pair in the
+message metadata data structure. This may be useful as Bayes tokens and
+can be added to marked-up messages using ``add_header''.</p>
+<p>Note: the language cannot always be recognized with sufficient
+confidence. In that case, <code>UNWANTED_LANGUAGE_BODY</code> will not trigger.</p>
+<p>
+</p>
+<hr />
+<h1><a name="user_options">USER OPTIONS</a></h1>
+<dl>
+<dt><strong><a name="item_ok_languages_xx__5b_yy_zz__2e_2e_2e__5d__28default">ok_languages xx [ yy zz ... ] (default: all)</a></strong><br />
+</dt>
+<dd>
+This option is used to specify which languages are considered okay for
+incoming mail. SpamAssassin will try to detect the language used in the
+message text.
+</dd>
+<dd>
+<p>Note that the language cannot always be recognized with sufficient
+confidence. In that case, no points will be assigned.</p>
+</dd>
+<dd>
+<p>The rule <code>UNWANTED_LANGUAGE_BODY</code> is triggered based on how this is set.</p>
+</dd>
+<dd>
+<p>In your configuration, you must use the two or three letter language
+specifier in lowercase, not the English name for the language. You may
+also specify <code>all</code> if a desired language is not listed, or if you want to
+allow any language. The default setting is <code>all</code>.</p>
+</dd>
+<dd>
+<p>Examples:</p>
+</dd>
+<dd>
+<pre>
+ ok_languages all (allow all languages)
+ ok_languages en (only allow English)
+ ok_languages en ja zh (allow English, Japanese, and Chinese)</pre>
+</dd>
+<dd>
+<p>Note: if there are multiple ok_languages lines, only the last one is used.</p>
+</dd>
+<dd>
+<p>Select the languages to allow from the list below:</p>
+</dd>
+<dl>
+<dt><strong><a name="item_af__2d_afrikaans">af - Afrikaans</a></strong><br />
+</dt>
+<dt><strong><a name="item_am__2d_amharic">am - Amharic</a></strong><br />
+</dt>
+<dt><strong><a name="item_ar__2d_arabic">ar - Arabic</a></strong><br />
+</dt>
+<dt><strong><a name="item_be__2d_byelorussian">be - Byelorussian</a></strong><br />
+</dt>
+<dt><strong><a name="item_bg__2d_bulgarian">bg - Bulgarian</a></strong><br />
+</dt>
+<dt><strong><a name="item_bs__2d_bosnian">bs - Bosnian</a></strong><br />
+</dt>
+<dt><strong><a name="item_ca__2d_catalan">ca - Catalan</a></strong><br />
+</dt>
+<dt><strong><a name="item_cs__2d_czech">cs - Czech</a></strong><br />
+</dt>
+<dt><strong><a name="item_cy__2d_welsh">cy - Welsh</a></strong><br />
+</dt>
+<dt><strong><a name="item_da__2d_danish">da - Danish</a></strong><br />
+</dt>
+<dt><strong><a name="item_de__2d_german">de - German</a></strong><br />
+</dt>
+<dt><strong><a name="item_el__2d_greek">el - Greek</a></strong><br />
+</dt>
+<dt><strong><a name="item_en__2d_english">en - English</a></strong><br />
+</dt>
+<dt><strong><a name="item_eo__2d_esperanto">eo - Esperanto</a></strong><br />
+</dt>
+<dt><strong><a name="item_es__2d_spanish">es - Spanish</a></strong><br />
+</dt>
+<dt><strong><a name="item_et__2d_estonian">et - Estonian</a></strong><br />
+</dt>
+<dt><strong><a name="item_eu__2d_basque">eu - Basque</a></strong><br />
+</dt>
+<dt><strong><a name="item_fa__2d_persian">fa - Persian</a></strong><br />
+</dt>
+<dt><strong><a name="item_fi__2d_finnish">fi - Finnish</a></strong><br />
+</dt>
+<dt><strong><a name="item_fr__2d_french">fr - French</a></strong><br />
+</dt>
+<dt><strong><a name="item_fy__2d_frisian">fy - Frisian</a></strong><br />
+</dt>
+<dt><strong><a name="item_ga__2d_irish_gaelic">ga - Irish Gaelic</a></strong><br />
+</dt>
+<dt><strong><a name="item_gd__2d_scottish_gaelic">gd - Scottish Gaelic</a></strong><br />
+</dt>
+<dt><strong><a name="item_he__2d_hebrew">he - Hebrew</a></strong><br />
+</dt>
+<dt><strong><a name="item_hi__2d_hindi">hi - Hindi</a></strong><br />
+</dt>
+<dt><strong><a name="item_hr__2d_croatian">hr - Croatian</a></strong><br />
+</dt>
+<dt><strong><a name="item_hu__2d_hungarian">hu - Hungarian</a></strong><br />
+</dt>
+<dt><strong><a name="item_hy__2d_armenian">hy - Armenian</a></strong><br />
+</dt>
+<dt><strong><a name="item_id__2d_indonesian">id - Indonesian</a></strong><br />
+</dt>
+<dt><strong><a name="item_is__2d_icelandic">is - Icelandic</a></strong><br />
+</dt>
+<dt><strong><a name="item_it__2d_italian">it - Italian</a></strong><br />
+</dt>
+<dt><strong><a name="item_ja__2d_japanese">ja - Japanese</a></strong><br />
+</dt>
+<dt><strong><a name="item_ka__2d_georgian">ka - Georgian</a></strong><br />
+</dt>
+<dt><strong><a name="item_ko__2d_korean">ko - Korean</a></strong><br />
+</dt>
+<dt><strong><a name="item_la__2d_latin">la - Latin</a></strong><br />
+</dt>
+<dt><strong><a name="item_lt__2d_lithuanian">lt - Lithuanian</a></strong><br />
+</dt>
+<dt><strong><a name="item_lv__2d_latvian">lv - Latvian</a></strong><br />
+</dt>
+<dt><strong><a name="item_mr__2d_marathi">mr - Marathi</a></strong><br />
+</dt>
+<dt><strong><a name="item_ms__2d_malay">ms - Malay</a></strong><br />
+</dt>
+<dt><strong><a name="item_ne__2d_nepali">ne - Nepali</a></strong><br />
+</dt>
+<dt><strong><a name="item_nl__2d_dutch">nl - Dutch</a></strong><br />
+</dt>
+<dt><strong><a name="item_no__2d_norwegian">no - Norwegian</a></strong><br />
+</dt>
+<dt><strong><a name="item_pl__2d_polish">pl - Polish</a></strong><br />
+</dt>
+<dt><strong><a name="item_pt__2d_portuguese">pt - Portuguese</a></strong><br />
+</dt>
+<dt><strong><a name="item_qu__2d_quechua">qu - Quechua</a></strong><br />
+</dt>
+<dt><strong><a name="item_rm__2d_rhaeto_2dromance">rm - Rhaeto-Romance</a></strong><br />
+</dt>
+<dt><strong><a name="item_ro__2d_romanian">ro - Romanian</a></strong><br />
+</dt>
+<dt><strong><a name="item_ru__2d_russian">ru - Russian</a></strong><br />
+</dt>
+<dt><strong><a name="item_sa__2d_sanskrit">sa - Sanskrit</a></strong><br />
+</dt>
+<dt><strong><a name="item_sco__2d_scots">sco - Scots</a></strong><br />
+</dt>
+<dt><strong><a name="item_sk__2d_slovak">sk - Slovak</a></strong><br />
+</dt>
+<dt><strong><a name="item_sl__2d_slovenian">sl - Slovenian</a></strong><br />
+</dt>
+<dt><strong><a name="item_sq__2d_albanian">sq - Albanian</a></strong><br />
+</dt>
+<dt><strong><a name="item_sr__2d_serbian">sr - Serbian</a></strong><br />
+</dt>
+<dt><strong><a name="item_sv__2d_swedish">sv - Swedish</a></strong><br />
+</dt>
+<dt><strong><a name="item_sw__2d_swahili">sw - Swahili</a></strong><br />
+</dt>
+<dt><strong><a name="item_ta__2d_tamil">ta - Tamil</a></strong><br />
+</dt>
+<dt><strong><a name="item_th__2d_thai">th - Thai</a></strong><br />
+</dt>
+<dt><strong><a name="item_tl__2d_tagalog">tl - Tagalog</a></strong><br />
+</dt>
+<dt><strong><a name="item_tr__2d_turkish">tr - Turkish</a></strong><br />
+</dt>
+<dt><strong><a name="item_uk__2d_ukrainian">uk - Ukrainian</a></strong><br />
+</dt>
+<dt><strong><a name="item_vi__2d_vietnamese">vi - Vietnamese</a></strong><br />
+</dt>
+<dt><strong><a name="item_yi__2d_yiddish">yi - Yiddish</a></strong><br />
+</dt>
+<dt><strong><a name="item_chinese">zh - Chinese (both Traditional and Simplified)</a></strong><br />
+</dt>
+<dt><strong>zh.big5 - Chinese (Traditional only)</strong><br />
+</dt>
+<dt><strong>zh.gb2312 - Chinese (Simplified only)</strong><br />
+</dt>
+</dl>
+<p></p>
+<dt><strong><a name="item_inactive_languages_xx__5b_yy_zz__2e_2e_2e__5d__28d">inactive_languages xx [ yy zz ... ] (default: see below)</a></strong><br />
+</dt>
+<dd>
+This option is used to specify which languages will not be considered
+when trying to guess the language. For performance reasons, supported
+languages that have fewer than about 5 million speakers are disabled by
+default. Note that listing a language in <code>ok_languages</code> automatically
+enables it for that user.
+</dd>
+<dd>
+<p>The default setting is:</p>
+</dd>
+<dl>
+<dt><strong><a name="item_bs_cy_eo_et_eu_fy_ga_gd_is_la_lt_lv_rm_sa_sco_sl_y">bs cy eo et eu fy ga gd is la lt lv rm sa sco sl yi</a></strong><br />
+</dt>
+</dl>
+<p>That list is Bosnian, Welsh, Esperanto, Estonian, Basque, Frisian, Irish
+Gaelic, Scottish Gaelic, Icelandic, Latin, Lithuanian, Latvian,
+Rhaeto-Romance, Sanskrit, Scots, Slovenian, and Yiddish.</p>
+<dt><strong><a name="item_n">textcat_max_languages N (default: 5)</a></strong><br />
+</dt>
+<dd>
+The maximum number of languages before the classification is considered unknown.
+</dd>
+<p></p>
+<dt><strong>textcat_optimal_ngrams N (default: 0)</strong><br />
+</dt>
+<dd>
+If the number of ngrams is lower than this number then they will be removed. This
+can be used to speed up the program for longer inputs. For shorter inputs, this
+should be set to 0.
+</dd>
+<p></p>
+<dt><strong>textcat_max_ngrams N (default: 400)</strong><br />
+</dt>
+<dd>
+The maximum number of ngrams that should be compared with each of the languages
+models (note that each of those models is used completely).
+</dd>
+<p></p>
+<dt><strong>textcat_acceptable_score N (default: 1.05)</strong><br />
+</dt>
+<dd>
+Include any language that scores at least <code>textcat_acceptable_score</code> in the
+returned list of languages
+</dd>
+<p></p></dl>
+
+</body>
+
+</html>
Added: spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_TextCat.txt
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_TextCat.txt?view=auto&rev=464529
==============================================================================
--- spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_TextCat.txt (added)
+++ spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_TextCat.txt Mon Oct 16 08:57:50 2006
@@ -0,0 +1,150 @@
+NAME
+ Mail::SpamAssassin::Plugin::TextCat - TextCat language guesser
+
+SYNOPSIS
+ loadplugin Mail::SpamAssassin::Plugin::TextCat
+
+DESCRIPTION
+ This plugin will try to guess the language used in the message text.
+
+ You can then specify which languages are considered okay for incoming
+ mail and if the guessed language is not okay, "UNWANTED_LANGUAGE_BODY"
+ is triggered
+
+ It will always add the results to a "X-Language" name-value pair in the
+ message metadata data structure. This may be useful as Bayes tokens and
+ can be added to marked-up messages using "add_header".
+
+ Note: the language cannot always be recognized with sufficient
+ confidence. In that case, "UNWANTED_LANGUAGE_BODY" will not trigger.
+
+USER OPTIONS
+ ok_languages xx [ yy zz ... ] (default: all)
+ This option is used to specify which languages are considered okay
+ for incoming mail. SpamAssassin will try to detect the language used
+ in the message text.
+
+ Note that the language cannot always be recognized with sufficient
+ confidence. In that case, no points will be assigned.
+
+ The rule "UNWANTED_LANGUAGE_BODY" is triggered based on how this is
+ set.
+
+ In your configuration, you must use the two or three letter language
+ specifier in lowercase, not the English name for the language. You
+ may also specify "all" if a desired language is not listed, or if
+ you want to allow any language. The default setting is "all".
+
+ Examples:
+
+ ok_languages all (allow all languages)
+ ok_languages en (only allow English)
+ ok_languages en ja zh (allow English, Japanese, and Chinese)
+
+ Note: if there are multiple ok_languages lines, only the last one is
+ used.
+
+ Select the languages to allow from the list below:
+
+ af - Afrikaans
+ am - Amharic
+ ar - Arabic
+ be - Byelorussian
+ bg - Bulgarian
+ bs - Bosnian
+ ca - Catalan
+ cs - Czech
+ cy - Welsh
+ da - Danish
+ de - German
+ el - Greek
+ en - English
+ eo - Esperanto
+ es - Spanish
+ et - Estonian
+ eu - Basque
+ fa - Persian
+ fi - Finnish
+ fr - French
+ fy - Frisian
+ ga - Irish Gaelic
+ gd - Scottish Gaelic
+ he - Hebrew
+ hi - Hindi
+ hr - Croatian
+ hu - Hungarian
+ hy - Armenian
+ id - Indonesian
+ is - Icelandic
+ it - Italian
+ ja - Japanese
+ ka - Georgian
+ ko - Korean
+ la - Latin
+ lt - Lithuanian
+ lv - Latvian
+ mr - Marathi
+ ms - Malay
+ ne - Nepali
+ nl - Dutch
+ no - Norwegian
+ pl - Polish
+ pt - Portuguese
+ qu - Quechua
+ rm - Rhaeto-Romance
+ ro - Romanian
+ ru - Russian
+ sa - Sanskrit
+ sco - Scots
+ sk - Slovak
+ sl - Slovenian
+ sq - Albanian
+ sr - Serbian
+ sv - Swedish
+ sw - Swahili
+ ta - Tamil
+ th - Thai
+ tl - Tagalog
+ tr - Turkish
+ uk - Ukrainian
+ vi - Vietnamese
+ yi - Yiddish
+ zh - Chinese (both Traditional and Simplified)
+ zh.big5 - Chinese (Traditional only)
+ zh.gb2312 - Chinese (Simplified only)
+
+
+
+ inactive_languages xx [ yy zz ... ] (default: see below)
+ This option is used to specify which languages will not be
+ considered when trying to guess the language. For performance
+ reasons, supported languages that have fewer than about 5 million
+ speakers are disabled by default. Note that listing a language in
+ "ok_languages" automatically enables it for that user.
+
+ The default setting is:
+
+ bs cy eo et eu fy ga gd is la lt lv rm sa sco sl yi
+
+ That list is Bosnian, Welsh, Esperanto, Estonian, Basque, Frisian,
+ Irish Gaelic, Scottish Gaelic, Icelandic, Latin, Lithuanian,
+ Latvian, Rhaeto-Romance, Sanskrit, Scots, Slovenian, and Yiddish.
+
+ textcat_max_languages N (default: 5)
+ The maximum number of languages before the classification is
+ considered unknown.
+
+ textcat_optimal_ngrams N (default: 0)
+ If the number of ngrams is lower than this number then they will be
+ removed. This can be used to speed up the program for longer inputs.
+ For shorter inputs, this should be set to 0.
+
+ textcat_max_ngrams N (default: 400)
+ The maximum number of ngrams that should be compared with each of
+ the languages models (note that each of those models is used
+ completely).
+
+ textcat_acceptable_score N (default: 1.05)
+ Include any language that scores at least "textcat_acceptable_score"
+ in the returned list of languages
+
Added: spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_URIDNSBL.html
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_URIDNSBL.html?view=auto&rev=464529
==============================================================================
--- spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_URIDNSBL.html (added)
+++ spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_URIDNSBL.html Mon Oct 16 08:57:50 2006
@@ -0,0 +1,144 @@
+<!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>URIDNSBL - look up URLs against DNS blocklists</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="#configuration">CONFIGURATION</a></li>
+</ul>
+<!-- INDEX END -->
+
+<hr />
+<p>
+</p>
+<h1><a name="name">NAME</a></h1>
+<p>URIDNSBL - look up URLs against DNS blocklists</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<pre>
+ loadplugin Mail::SpamAssassin::Plugin::URIDNSBL
+ uridnsbl URIBL_SBLXBL sbl-xbl.spamhaus.org. TXT</pre>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+<p>This works by analysing message text and HTML for URLs, extracting the
+domain names from those, querying their NS records in DNS, resolving
+the hostnames used therein, and querying various DNS blocklists for
+those IP addresses. This is quite effective.</p>
+<p>
+</p>
+<hr />
+<h1><a name="configuration">CONFIGURATION</a></h1>
+<dl>
+<dt><strong><a name="item_uridnsbl_name_of_rule_dnsbl_zone_lookuptype">uridnsbl NAME_OF_RULE dnsbl_zone lookuptype</a></strong><br />
+</dt>
+<dd>
+Specify a lookup. <code>NAME_OF_RULE</code> is the name of the rule to be
+used, <code>dnsbl_zone</code> is the zone to look up IPs in, and <code>lookuptype</code>
+is the type of lookup (<strong>TXT</strong> or <strong>A</strong>). Note that you must also
+define a body-eval rule calling <code>check_uridnsbl()</code> to use this.
+</dd>
+<dd>
+<p>Example:</p>
+</dd>
+<dd>
+<pre>
+ uridnsbl URIBL_SBLXBL sbl-xbl.spamhaus.org. TXT
+ body URIBL_SBLXBL eval:check_uridnsbl('URIBL_SBLXBL')
+ describe URIBL_SBLXBL Contains a URL listed in the SBL/XBL blocklist</pre>
+</dd>
+<p></p>
+<dt><strong><a name="item_urirhsbl_name_of_rule_rhsbl_zone_lookuptype">urirhsbl NAME_OF_RULE rhsbl_zone lookuptype</a></strong><br />
+</dt>
+<dd>
+Specify a RHSBL-style domain lookup. <code>NAME_OF_RULE</code> is the name of the rule
+to be used, <code>rhsbl_zone</code> is the zone to look up domain names in, and
+<code>lookuptype</code> is the type of lookup (<strong>TXT</strong> or <strong>A</strong>). Note that you must also
+define a body-eval rule calling <code>check_uridnsbl()</code> to use this.
+</dd>
+<dd>
+<p>An RHSBL zone is one where the domain name is looked up, as a string; e.g. a
+URI using the domain <code>foo.com</code> will cause a lookup of
+<code>foo.com.uriblzone.net</code>. Note that hostnames are stripped from the domain
+used in the URIBL lookup, so the domain <code>foo.bar.com</code> will look up
+<code>bar.com.uriblzone.net</code>, and <code>foo.bar.co.uk</code> will look up
+<code>bar.co.uk.uriblzone.net</code>.</p>
+</dd>
+<dd>
+<p>If a URI consists IP address instead of a hostname, the IP address is looked
+up (using the standard reversed quads method) in each <code>rhsbl_zone</code>.</p>
+</dd>
+<dd>
+<p>Example:</p>
+</dd>
+<dd>
+<pre>
+ urirhsbl URIBL_RHSBL rhsbl.example.org. TXT</pre>
+</dd>
+<p></p>
+<dt><strong><a name="item_urirhssub_name_of_rule_rhsbl_zone_lookuptype_subte">urirhssub NAME_OF_RULE rhsbl_zone lookuptype subtest</a></strong><br />
+</dt>
+<dd>
+Specify a RHSBL-style domain lookup with a sub-test. <code>NAME_OF_RULE</code> is the
+name of the rule to be used, <code>rhsbl_zone</code> is the zone to look up domain names
+in, and <code>lookuptype</code> is the type of lookup (<strong>TXT</strong> or <strong>A</strong>).
+</dd>
+<dd>
+<p><code>subtest</code> is the sub-test to run against the returned data. The sub-test may
+either be an IPv4 dotted address for RHSBLs that return multiple A records or a
+non-negative decimal number to specify a bitmask for RHSBLs that return a
+single A record containing a bitmask of results.</p>
+</dd>
+<dd>
+<p>Note that, as with <code>urirhsbl</code>, you must also define a body-eval rule calling
+<code>check_uridnsbl()</code> to use this.</p>
+</dd>
+<dd>
+<p>Example:</p>
+</dd>
+<dd>
+<pre>
+ urirhssub URIBL_RHSBL_4 rhsbl.example.org. A 127.0.0.4
+ urirhssub URIBL_RHSBL_8 rhsbl.example.org. A 8</pre>
+</dd>
+<p></p>
+<dt><strong><a name="item_n">uridnsbl_timeout N (default: 2)</a></strong><br />
+</dt>
+<dd>
+Specify the maximum number of seconds to wait for a result before
+giving up on the lookup. Note that this is in addition to the normal
+DNS timeout applied for DNSBL lookups on IPs found in the Received headers.
+</dd>
+<p></p>
+<dt><strong>uridnsbl_max_domains N (default: 20)</strong><br />
+</dt>
+<dd>
+The maximum number of domains to look up.
+</dd>
+<p></p>
+<dt><strong><a name="item_uridnsbl_skip_domain_domain1_domain2__2e_2e_2e">uridnsbl_skip_domain domain1 domain2 ...</a></strong><br />
+</dt>
+<dd>
+Specify a domain, or a number of domains, which should be skipped for the
+URIBL checks. This is very useful to specify very common domains which are
+not going to be listed in URIBLs.
+</dd>
+<p></p></dl>
+
+</body>
+
+</html>
Added: spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_URIDNSBL.txt
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_URIDNSBL.txt?view=auto&rev=464529
==============================================================================
--- spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_URIDNSBL.txt (added)
+++ spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_URIDNSBL.txt Mon Oct 16 08:57:50 2006
@@ -0,0 +1,82 @@
+NAME
+ URIDNSBL - look up URLs against DNS blocklists
+
+SYNOPSIS
+ loadplugin Mail::SpamAssassin::Plugin::URIDNSBL
+ uridnsbl URIBL_SBLXBL sbl-xbl.spamhaus.org. TXT
+
+DESCRIPTION
+ This works by analysing message text and HTML for URLs, extracting the
+ domain names from those, querying their NS records in DNS, resolving the
+ hostnames used therein, and querying various DNS blocklists for those IP
+ addresses. This is quite effective.
+
+CONFIGURATION
+ uridnsbl NAME_OF_RULE dnsbl_zone lookuptype
+ Specify a lookup. "NAME_OF_RULE" is the name of the rule to be used,
+ "dnsbl_zone" is the zone to look up IPs in, and "lookuptype" is the
+ type of lookup (TXT or A). Note that you must also define a
+ body-eval rule calling "check_uridnsbl()" to use this.
+
+ Example:
+
+ uridnsbl URIBL_SBLXBL sbl-xbl.spamhaus.org. TXT
+ body URIBL_SBLXBL eval:check_uridnsbl('URIBL_SBLXBL')
+ describe URIBL_SBLXBL Contains a URL listed in the SBL/XBL blocklist
+
+ urirhsbl NAME_OF_RULE rhsbl_zone lookuptype
+ Specify a RHSBL-style domain lookup. "NAME_OF_RULE" is the name of
+ the rule to be used, "rhsbl_zone" is the zone to look up domain
+ names in, and "lookuptype" is the type of lookup (TXT or A). Note
+ that you must also define a body-eval rule calling
+ "check_uridnsbl()" to use this.
+
+ An RHSBL zone is one where the domain name is looked up, as a
+ string; e.g. a URI using the domain "foo.com" will cause a lookup of
+ "foo.com.uriblzone.net". Note that hostnames are stripped from the
+ domain used in the URIBL lookup, so the domain "foo.bar.com" will
+ look up "bar.com.uriblzone.net", and "foo.bar.co.uk" will look up
+ "bar.co.uk.uriblzone.net".
+
+ If a URI consists IP address instead of a hostname, the IP address
+ is looked up (using the standard reversed quads method) in each
+ "rhsbl_zone".
+
+ Example:
+
+ urirhsbl URIBL_RHSBL rhsbl.example.org. TXT
+
+ urirhssub NAME_OF_RULE rhsbl_zone lookuptype subtest
+ Specify a RHSBL-style domain lookup with a sub-test. "NAME_OF_RULE"
+ is the name of the rule to be used, "rhsbl_zone" is the zone to look
+ up domain names in, and "lookuptype" is the type of lookup (TXT or
+ A).
+
+ "subtest" is the sub-test to run against the returned data. The
+ sub-test may either be an IPv4 dotted address for RHSBLs that return
+ multiple A records or a non-negative decimal number to specify a
+ bitmask for RHSBLs that return a single A record containing a
+ bitmask of results.
+
+ Note that, as with "urirhsbl", you must also define a body-eval rule
+ calling "check_uridnsbl()" to use this.
+
+ Example:
+
+ urirhssub URIBL_RHSBL_4 rhsbl.example.org. A 127.0.0.4
+ urirhssub URIBL_RHSBL_8 rhsbl.example.org. A 8
+
+ uridnsbl_timeout N (default: 2)
+ Specify the maximum number of seconds to wait for a result before
+ giving up on the lookup. Note that this is in addition to the normal
+ DNS timeout applied for DNSBL lookups on IPs found in the Received
+ headers.
+
+ uridnsbl_max_domains N (default: 20)
+ The maximum number of domains to look up.
+
+ uridnsbl_skip_domain domain1 domain2 ...
+ Specify a domain, or a number of domains, which should be skipped
+ for the URIBL checks. This is very useful to specify very common
+ domains which are not going to be listed in URIBLs.
+
Added: spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_WhiteListSubject.html
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_WhiteListSubject.html?view=auto&rev=464529
==============================================================================
--- spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_WhiteListSubject.html (added)
+++ spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_WhiteListSubject.html Mon Oct 16 08:57:50 2006
@@ -0,0 +1,52 @@
+<!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::Plugin::WhiteListSubject - whitelist by Subject header</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::Plugin::WhiteListSubject - whitelist by Subject header</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<pre>
+ loadplugin Mail::SpamAssassin::Plugin::WhiteListSubject</pre>
+<pre>
+ header SUBJECT_IN_WHITELIST eval:check_subject_in_whitelist()
+ header SUBJECT_IN_BLACKLIST eval:check_subject_in_blacklist()</pre>
+<pre>
+ score SUBJECT_IN_WHITELIST -100
+ score SUBJECT_IN_BLACKLIST 100</pre>
+<pre>
+ whitelist_subject [Bug *]
+ blacklist_subject Make Money Fast</pre>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+<p>This SpamAssassin plugin module provides eval tests for whitelisting and blacklisting
+particular strings in the Subject header. The value for whitelist_subject or
+blacklist_subject are strings which may contain file -glob -style patterns,
+similar to the other whitelist_* config options.</p>
+
+</body>
+
+</html>
Added: spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_WhiteListSubject.txt
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_WhiteListSubject.txt?view=auto&rev=464529
==============================================================================
--- spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_WhiteListSubject.txt (added)
+++ spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Plugin_WhiteListSubject.txt Mon Oct 16 08:57:50 2006
@@ -0,0 +1,23 @@
+NAME
+ Mail::SpamAssassin::Plugin::WhiteListSubject - whitelist by Subject
+ header
+
+SYNOPSIS
+ loadplugin Mail::SpamAssassin::Plugin::WhiteListSubject
+
+ header SUBJECT_IN_WHITELIST eval:check_subject_in_whitelist()
+ header SUBJECT_IN_BLACKLIST eval:check_subject_in_blacklist()
+
+ score SUBJECT_IN_WHITELIST -100
+ score SUBJECT_IN_BLACKLIST 100
+
+ whitelist_subject [Bug *]
+ blacklist_subject Make Money Fast
+
+DESCRIPTION
+ This SpamAssassin plugin module provides eval tests for whitelisting and
+ blacklisting particular strings in the Subject header. The value for
+ whitelist_subject or blacklist_subject are strings which may contain
+ file -glob -style patterns, similar to the other whitelist_* config
+ options.
+
Added: spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_SQLBasedAddrList.html
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_SQLBasedAddrList.html?view=auto&rev=464529
==============================================================================
--- spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_SQLBasedAddrList.html (added)
+++ spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_SQLBasedAddrList.html Mon Oct 16 08:57:50 2006
@@ -0,0 +1,137 @@
+<!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::SQLBasedAddrList - SpamAssassin SQL Based Auto Whitelist</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>
+
+ <li><a href="#new">new</a></li>
+ <li><a href="#new_checker">new_checker</a></li>
+ <li><a href="#get_addr_entry">get_addr_entry</a></li>
+ <li><a href="#add_score">add_score</a></li>
+ <li><a href="#remove_entry">remove_entry</a></li>
+ <li><a href="#finish">finish</a></li>
+ <li><a href="#_unpack_addr">_unpack_addr</a></li>
+ </ul>
+
+</ul>
+<!-- INDEX END -->
+
+<hr />
+<p>
+</p>
+<h1><a name="name">NAME</a></h1>
+<p>Mail::SpamAssassin::SQLBasedAddrList - SpamAssassin SQL Based Auto Whitelist</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<pre>
+ my $factory = Mail::SpamAssassin::SQLBasedAddrList->new()
+ $spamtest->set_persistent_addr_list_factory ($factory);
+ ... call into SpamAssassin classes...</pre>
+<p>SpamAssassin will call:</p>
+<pre>
+ my $addrlist = $factory->new_checker($spamtest);
+ $entry = $addrlist->get_addr_entry ($addr, $origip);
+ ...</pre>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+<p>A SQL based persistent address list implementation.</p>
+<p>See <code>Mail::SpamAssassin::PersistentAddrList</code> for more information.</p>
+<p>Uses DBI::DBD module access to your favorite database (tested with
+MySQL, SQLite and PostgreSQL) to store user auto-whitelists.</p>
+<p>The default table structure looks like this:
+CREATE TABLE awl (
+ username VARCHAR NOT NULL,
+ email VARCHAR NOT NULL,
+ ip VARCHAR NOT NULL,
+ count INT NOT NULL,
+ totscore FLOAT NOT NULL,
+ PRIMARY KEY (username, email, ip)
+)</p>
+<p>You're table definition may change depending on which database driver
+you choose. There is a config option to override the table name.</p>
+<p>This module introduces several new config variables:</p>
+<p>user_awl_dsn</p>
+<p>user_awl_sql_username</p>
+<p>user_awl_sql_password</p>
+<p>user_awl_sql_table</p>
+<p>user_awl_sql_override_username</p>
+<p>see <code>Mail::SpamAssassin::Conf</code> for more information.</p>
+<p>
+</p>
+<h2><a name="new">new</a></h2>
+<p>public class (Mail::SpamAssassin::SQLBasedAddrList) new ()</p>
+<p>Description:
+This method creates a new instance of the SQLBasedAddrList factory and calls
+the parent's (PersistentAddrList) new method.</p>
+<p>
+</p>
+<h2><a name="new_checker">new_checker</a></h2>
+<p>public instance (Mail::SpamAssassin::SQLBasedAddrList) new_checker (\% $main)</p>
+<p>Description:
+This method is called to setup a new checker interface and return a blessed
+copy of itself. Here is where we setup the SQL database connection based
+on the config values.</p>
+<p>
+</p>
+<h2><a name="get_addr_entry">get_addr_entry</a></h2>
+<p>public instance (\%) get_addr_entry (String $addr)</p>
+<p>Description:
+This method takes a given <code>$addr</code> and splits it between the email address
+component and the ip component and performs a lookup in the database. If
+nothing is found in the database then a blank entry hash is created and
+returned, otherwise an entry containing the found information is returned.</p>
+<p>A key, <code>exists_p</code>, is set to 1 if an entry already exists in the database,
+otherwise it is set to 0.</p>
+<p>
+</p>
+<h2><a name="add_score">add_score</a></h2>
+<p>public instance (\%) add_score (\% $entry, Integer $score)</p>
+<p>Description:
+This method adds a given <code>$score</code> to a given <code>$entry</code>. If the entry was
+marked as not existing in the database then an entry will be inserted,
+otherwise a simple update will be performed.</p>
+<p>NOTE: This code uses a self referential SQL call (ie set foo = foo + 1) which
+is supported by most modern database backends, but not everything calling
+itself a SQL database.</p>
+<p>
+</p>
+<h2><a name="remove_entry">remove_entry</a></h2>
+<p>public instance () remove_entry (\% $entry)</p>
+<p>Description:
+This method removes a given <code>$entry</code> from the database. If the
+ip portion of the entry address is equal to ``none'' then remove any
+perl-IP entries for this address as well.</p>
+<p>
+</p>
+<h2><a name="finish">finish</a></h2>
+<p>public instance () finish ()</p>
+<p>Description:
+This method provides the necessary cleanup for the address list.</p>
+<p>
+</p>
+<h2><a name="_unpack_addr">_unpack_addr</a></h2>
+<p>private instance (String, String) _unpack_addr(string $addr)</p>
+<p>Description:
+This method splits an autowhitelist address into it's two components,
+email and ip address.</p>
+
+</body>
+
+</html>
Added: spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_SQLBasedAddrList.txt
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_SQLBasedAddrList.txt?view=auto&rev=464529
==============================================================================
--- spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_SQLBasedAddrList.txt (added)
+++ spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_SQLBasedAddrList.txt Mon Oct 16 08:57:50 2006
@@ -0,0 +1,100 @@
+NAME
+ Mail::SpamAssassin::SQLBasedAddrList - SpamAssassin SQL Based Auto
+ Whitelist
+
+SYNOPSIS
+ my $factory = Mail::SpamAssassin::SQLBasedAddrList->new()
+ $spamtest->set_persistent_addr_list_factory ($factory);
+ ... call into SpamAssassin classes...
+
+ SpamAssassin will call:
+
+ my $addrlist = $factory->new_checker($spamtest);
+ $entry = $addrlist->get_addr_entry ($addr, $origip);
+ ...
+
+DESCRIPTION
+ A SQL based persistent address list implementation.
+
+ See "Mail::SpamAssassin::PersistentAddrList" for more information.
+
+ Uses DBI::DBD module access to your favorite database (tested with
+ MySQL, SQLite and PostgreSQL) to store user auto-whitelists.
+
+ The default table structure looks like this: CREATE TABLE awl ( username
+ VARCHAR NOT NULL, email VARCHAR NOT NULL, ip VARCHAR NOT NULL, count INT
+ NOT NULL, totscore FLOAT NOT NULL, PRIMARY KEY (username, email, ip) )
+
+ You're table definition may change depending on which database driver
+ you choose. There is a config option to override the table name.
+
+ This module introduces several new config variables:
+
+ user_awl_dsn
+
+ user_awl_sql_username
+
+ user_awl_sql_password
+
+ user_awl_sql_table
+
+ user_awl_sql_override_username
+
+ see "Mail::SpamAssassin::Conf" for more information.
+
+ new
+ public class (Mail::SpamAssassin::SQLBasedAddrList) new ()
+
+ Description: This method creates a new instance of the SQLBasedAddrList
+ factory and calls the parent's (PersistentAddrList) new method.
+
+ new_checker
+ public instance (Mail::SpamAssassin::SQLBasedAddrList) new_checker (\%
+ $main)
+
+ Description: This method is called to setup a new checker interface and
+ return a blessed copy of itself. Here is where we setup the SQL database
+ connection based on the config values.
+
+ get_addr_entry
+ public instance (\%) get_addr_entry (String $addr)
+
+ Description: This method takes a given $addr and splits it between the
+ email address component and the ip component and performs a lookup in
+ the database. If nothing is found in the database then a blank entry
+ hash is created and returned, otherwise an entry containing the found
+ information is returned.
+
+ A key, "exists_p", is set to 1 if an entry already exists in the
+ database, otherwise it is set to 0.
+
+ add_score
+ public instance (\%) add_score (\% $entry, Integer $score)
+
+ Description: This method adds a given $score to a given $entry. If the
+ entry was marked as not existing in the database then an entry will be
+ inserted, otherwise a simple update will be performed.
+
+ NOTE: This code uses a self referential SQL call (ie set foo = foo + 1)
+ which is supported by most modern database backends, but not everything
+ calling itself a SQL database.
+
+ remove_entry
+ public instance () remove_entry (\% $entry)
+
+ Description: This method removes a given $entry from the database. If
+ the ip portion of the entry address is equal to "none" then remove any
+ perl-IP entries for this address as well.
+
+ finish
+ public instance () finish ()
+
+ Description: This method provides the necessary cleanup for the address
+ list.
+
+ _unpack_addr
+ private instance (String, String) _unpack_addr(string $addr)
+
+ Description: This method splits an autowhitelist address into it's two
+ components, email and ip address.
+
Added: spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_SubProcBackChannel.html
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_SubProcBackChannel.html?view=auto&rev=464529
==============================================================================
--- spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_SubProcBackChannel.html (added)
+++ spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_SubProcBackChannel.html Mon Oct 16 08:57:50 2006
@@ -0,0 +1,43 @@
+<!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::SubProcBackChannel - back-channel for communication between a master and multiple slave processes</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="#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::SubProcBackChannel - back-channel for communication between a master and multiple slave processes</p>
+<p>
+</p>
+<hr />
+<h1><a name="methods">METHODS</a></h1>
+<p>
+</p>
+<hr />
+<h1><a name="see_also">SEE ALSO</a></h1>
+<p><code>Mail::SpamAssassin</code>
+<code>Mail::SpamAssassin::ArchiveIterator</code>
+<code>Mail::SpamAssassin::SpamdPreforkScaling</code>
+<code>spamassassin</code>
+<code>spamd</code>
+<code>mass-check</code></p>
+
+</body>
+
+</html>
Added: spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_SubProcBackChannel.txt
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_SubProcBackChannel.txt?view=auto&rev=464529
==============================================================================
--- spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_SubProcBackChannel.txt (added)
+++ spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_SubProcBackChannel.txt Mon Oct 16 08:57:50 2006
@@ -0,0 +1,10 @@
+NAME
+ Mail::SpamAssassin::SubProcBackChannel - back-channel for communication
+ between a master and multiple slave processes
+
+METHODS
+SEE ALSO
+ "Mail::SpamAssassin" "Mail::SpamAssassin::ArchiveIterator"
+ "Mail::SpamAssassin::SpamdPreforkScaling" "spamassassin" "spamd"
+ "mass-check"
+
Added: spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Timeout.html
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Timeout.html?view=auto&rev=464529
==============================================================================
--- spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Timeout.html (added)
+++ spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Timeout.html Mon Oct 16 08:57:50 2006
@@ -0,0 +1,116 @@
+<!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::Timeout - safe, reliable timeouts in perl</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::Timeout - safe, reliable timeouts in perl</p>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<pre>
+ # non-timeout code...</pre>
+<pre>
+ my $t = Mail::SpamAssassin::Timeout->new({ secs => 5 });
+
+ $t->run(sub {
+ # code to run with a 5-second timeout...
+ });</pre>
+<pre>
+ if ($t->timed_out()) {
+ # do something...
+ }</pre>
+<pre>
+ # more non-timeout code...</pre>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+<p>This module provides a safe, reliable and clean API to provide
+<code>alarm(2)</code>-based timeouts for perl code.</p>
+<p>Note that <code>$SIG{ALRM}</code> is used to provide the timeout, so this will not
+interrupt out-of-control regular expression matches.</p>
+<p>Nested timeouts are supported.</p>
+<p>
+</p>
+<hr />
+<h1><a name="public_methods">PUBLIC METHODS</a></h1>
+<dl>
+<dt><strong><a name="item_new">my $t = Mail::SpamAssassin::Timeout->new({ ... options ... });</a></strong><br />
+</dt>
+<dd>
+Constructor. Options include:
+</dd>
+<dl>
+<dt><strong><a name="item_secs__3d_3e__24seconds">secs => $seconds</a></strong><br />
+</dt>
+<dd>
+timeout, in seconds. Optional; if not specified, no timeouts will be applied.
+</dd>
+<p></p></dl>
+<dt><strong><a name="item_run">$t-><code>run($coderef)</code></a></strong><br />
+</dt>
+<dd>
+Run a code reference within the currently-defined timeout.
+</dd>
+<dd>
+<p>The timeout is as defined by the <strong>secs</strong> parameter to the constructor.</p>
+</dd>
+<dd>
+<p>Returns whatever the subroutine returns, or <code>undef</code> on timeout.
+If the timer times out, <code>$t-<gt</code>timed_out()> will return <code>1</code>.</p>
+</dd>
+<dd>
+<p>Time elapsed is not cumulative; multiple runs of <a href="#item_run"><code>run</code></a> will restart the
+timeout from scratch.</p>
+</dd>
+<p></p>
+<dt><strong><a name="item_run_and_catch">$t-><code>run_and_catch($coderef)</code></a></strong><br />
+</dt>
+<dd>
+Run a code reference, as per <code>$t-<gt</code>run()>, but also catching any
+<code>die()</code> calls within the code reference.
+</dd>
+<dd>
+<p>Returns <code>undef</code> if no <code>die()</code> call was executed and <code>$@</code> was unset, or the
+value of <code>$@</code> if it was set. (The timeout event doesn't count as a <code>die()</code>.)</p>
+</dd>
+<p></p>
+<dt><strong><a name="item_timed_out">$t-><code>timed_out()</code></a></strong><br />
+</dt>
+<dd>
+Returns <code>1</code> if the most recent code executed in <a href="#item_run"><code>run()</code></a> timed out, or
+<code>undef</code> if it did not.
+</dd>
+<p></p>
+<dt><strong><a name="item_reset">$t-><code>reset()</code></a></strong><br />
+</dt>
+<dd>
+If called within a <a href="#item_run"><code>run()</code></a> code reference, causes the current alarm timer to
+be reset to its starting value.
+</dd>
+</dl>
+
+</body>
+
+</html>
Added: spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Timeout.txt
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Timeout.txt?view=auto&rev=464529
==============================================================================
--- spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Timeout.txt (added)
+++ spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Timeout.txt Mon Oct 16 08:57:50 2006
@@ -0,0 +1,62 @@
+NAME
+ Mail::SpamAssassin::Timeout - safe, reliable timeouts in perl
+
+SYNOPSIS
+ # non-timeout code...
+
+ my $t = Mail::SpamAssassin::Timeout->new({ secs => 5 });
+
+ $t->run(sub {
+ # code to run with a 5-second timeout...
+ });
+
+ if ($t->timed_out()) {
+ # do something...
+ }
+
+ # more non-timeout code...
+
+DESCRIPTION
+ This module provides a safe, reliable and clean API to provide
+ alarm(2)-based timeouts for perl code.
+
+ Note that $SIG{ALRM} is used to provide the timeout, so this will not
+ interrupt out-of-control regular expression matches.
+
+ Nested timeouts are supported.
+
+PUBLIC METHODS
+ my $t = Mail::SpamAssassin::Timeout->new({ ... options ... });
+ Constructor. Options include:
+
+ secs => $seconds
+ timeout, in seconds. Optional; if not specified, no timeouts
+ will be applied.
+
+ $t->run($coderef)
+ Run a code reference within the currently-defined timeout.
+
+ The timeout is as defined by the secs parameter to the constructor.
+
+ Returns whatever the subroutine returns, or "undef" on timeout. If
+ the timer times out, "$t-<gt"timed_out()> will return 1.
+
+ Time elapsed is not cumulative; multiple runs of "run" will restart
+ the timeout from scratch.
+
+ $t->run_and_catch($coderef)
+ Run a code reference, as per "$t-<gt"run()>, but also catching any
+ "die()" calls within the code reference.
+
+ Returns "undef" if no "die()" call was executed and $@ was unset, or
+ the value of $@ if it was set. (The timeout event doesn't count as a
+ "die()".)
+
+ $t->timed_out()
+ Returns 1 if the most recent code executed in "run()" timed out, or
+ "undef" if it did not.
+
+ $t->reset()
+ If called within a "run()" code reference, causes the current alarm
+ timer to be reset to its starting value.
+
Added: spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Util.html
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Util.html?view=auto&rev=464529
==============================================================================
--- spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Util.html (added)
+++ spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Util.html Mon Oct 16 08:57:50 2006
@@ -0,0 +1,80 @@
+<!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::Util - utility functions</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>
+</ul>
+<!-- INDEX END -->
+
+<hr />
+<p>
+</p>
+<h1><a name="name">NAME</a></h1>
+<p>Mail::SpamAssassin::Util - utility functions</p>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+<p>A general class for utility functions. Please use this for functions that
+stand alone, without requiring a $self object, Portability functions
+especially.</p>
+<p>NOTE: The functions in this module are to be considered private. Their API may
+change at any point, and it's expected that they'll only be used by other
+Mail::SpamAssassin modules. (TODO: we should probably revisit this if
+it's useful for plugin development.)</p>
+<dl>
+<dt><strong><a name="item_first_available_module">$module = first_available_module (@module_list)</a></strong><br />
+</dt>
+<dd>
+Return the name of the first module that can be successfully loaded with
+<code>require</code> from the list. Returns <code>undef</code> if none are available.
+</dd>
+<dd>
+<p>This is used instead of <code>AnyDBM_File</code> as follows:</p>
+</dd>
+<dd>
+<pre>
+ my $module = Mail::SpamAssassin::Util::first_available_module
+ (qw(DB_File GDBM_File NDBM_File SDBM_File));
+ tie %hash, $module, $path, [... args];</pre>
+</dd>
+<dd>
+<p>Note that <code>SDBM_File</code> is guaranteed to be present, since it comes
+with Perl.</p>
+</dd>
+<p></p>
+<dt><strong><a name="item_my">my ($filepath, $filehandle) = secure_tmpfile();</a></strong><br />
+</dt>
+<dd>
+Generates a filename for a temporary file, opens it exclusively and
+securely, and returns a filehandle to the open file (opened O_RDWR).
+</dd>
+<dd>
+<p>If it cannot open a file after 20 tries, it returns <code>undef</code>.</p>
+</dd>
+<p></p>
+<dt><strong>my ($dirpath) = secure_tmpdir();</strong><br />
+</dt>
+<dd>
+Generates a directory for temporary files. Creates it securely and
+returns the path to the directory.
+</dd>
+<dd>
+<p>If it cannot create a directory after 20 tries, it returns <code>undef</code>.</p>
+</dd>
+<p></p></dl>
+
+</body>
+
+</html>
Added: spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Util.txt
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Util.txt?view=auto&rev=464529
==============================================================================
--- spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Util.txt (added)
+++ spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Util.txt Mon Oct 16 08:57:50 2006
@@ -0,0 +1,38 @@
+NAME
+ Mail::SpamAssassin::Util - utility functions
+
+DESCRIPTION
+ A general class for utility functions. Please use this for functions
+ that stand alone, without requiring a $self object, Portability
+ functions especially.
+
+ NOTE: The functions in this module are to be considered private. Their
+ API may change at any point, and it's expected that they'll only be used
+ by other Mail::SpamAssassin modules. (TODO: we should probably revisit
+ this if it's useful for plugin development.)
+
+ $module = first_available_module (@module_list)
+ Return the name of the first module that can be successfully loaded
+ with "require" from the list. Returns "undef" if none are available.
+
+ This is used instead of "AnyDBM_File" as follows:
+
+ my $module = Mail::SpamAssassin::Util::first_available_module
+ (qw(DB_File GDBM_File NDBM_File SDBM_File));
+ tie %hash, $module, $path, [... args];
+
+ Note that "SDBM_File" is guaranteed to be present, since it comes
+ with Perl.
+
+ my ($filepath, $filehandle) = secure_tmpfile();
+ Generates a filename for a temporary file, opens it exclusively and
+ securely, and returns a filehandle to the open file (opened O_RDWR).
+
+ If it cannot open a file after 20 tries, it returns "undef".
+
+ my ($dirpath) = secure_tmpdir();
+ Generates a directory for temporary files. Creates it securely and
+ returns the path to the directory.
+
+ If it cannot create a directory after 20 tries, it returns "undef".
+
Added: spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Util_Progress.html
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Util_Progress.html?view=auto&rev=464529
==============================================================================
--- spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Util_Progress.html (added)
+++ spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Util_Progress.html Mon Oct 16 08:57:50 2006
@@ -0,0 +1,112 @@
+<!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::Util::Progress - Progress bar support for SpamAssassin</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>
+
+ <li><a href="#new">new</a></li>
+ <li><a href="#init_bar">init_bar</a></li>
+ <li><a href="#update">update</a></li>
+ <li><a href="#final">final</a></li>
+ </ul>
+
+</ul>
+<!-- INDEX END -->
+
+<hr />
+<p>
+</p>
+<h1><a name="name">NAME</a></h1>
+<pre>
+ Mail::SpamAssassin::Util::Progress - Progress bar support for SpamAssassin</pre>
+<p>
+</p>
+<hr />
+<h1><a name="synopsis">SYNOPSIS</a></h1>
+<pre>
+ my $progress = Mail::SpamAssassin::Util::Progress->new({total => 100});</pre>
+<pre>
+ $msgcount = 0;
+ foreach my $message (@messages) {
+ # do something here
+ $msgcount++;
+ $progress->update($msgcount);
+ }</pre>
+<pre>
+ $progress->final();</pre>
+<p>
+</p>
+<hr />
+<h1><a name="description">DESCRIPTION</a></h1>
+<p>This module implements a progress bar for use in SpamAssassin scripts and
+modules. It allows you to create the progress bar, update it and print
+out the final results of a particular run.</p>
+<p>
+</p>
+<h2><a name="new">new</a></h2>
+<p>public class (Mail::SpamAssassin::Util::Progress) new (\% $args)</p>
+<p>Description:
+Creates a new Mail::SpamAssassin::Util::Progress object, valid values for
+the $args hashref are:</p>
+<dl>
+<dt><strong><a name="item_total">total (required)</a></strong><br />
+</dt>
+<dd>
+The total number of messages expected to be processed. This item is
+required.
+</dd>
+<p></p>
+<dt><strong><a name="item_fh__5boptional_5d">fh [optional]</a></strong><br />
+</dt>
+<dd>
+An optional filehandle may be passed in, otherwise STDERR will be used by
+default.
+</dd>
+<p></p>
+<dt><strong><a name="item_term__5boptional_5d">term [optional]</a></strong><br />
+</dt>
+<dd>
+The module will attempt to determine if a valid terminal exists on the
+filehandle. This item allows you to override that value.
+</dd>
+<p></p></dl>
+<p>
+</p>
+<h2><a name="init_bar">init_bar</a></h2>
+<p>public instance () <code>init_bar()</code></p>
+<p>Description:
+This method creates the initial progress bar and is called automatically from new. In addition
+you can call init_bar on an existing object to reset the bar to it's original state.</p>
+<p>
+</p>
+<h2><a name="update">update</a></h2>
+<p>public instance () update ([Integer $num_done])</p>
+<p>Description:
+This method is what gets called to update the progress bar. You may optionally pass in
+an integer value that indicates how many messages have been processed. If you do not pass
+anything in then the num_done value will be incremented by one.</p>
+<p>
+</p>
+<h2><a name="final">final</a></h2>
+<p>public instance () final ([Integer $num_done])</p>
+<p>Description:
+This method should be called once all processing has finished. It will print out the final msgs per sec
+calculation and the total time taken. You can optionally pass in a num_done value, otherwise it will use
+the value calculated from the last call to update.</p>
+
+</body>
+
+</html>
Added: spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Util_Progress.txt
URL: http://svn.apache.org/viewvc/spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Util_Progress.txt?view=auto&rev=464529
==============================================================================
--- spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Util_Progress.txt (added)
+++ spamassassin/site/full/3.1.x/doc/Mail_SpamAssassin_Util_Progress.txt Mon Oct 16 08:57:50 2006
@@ -0,0 +1,61 @@
+NAME
+ Mail::SpamAssassin::Util::Progress - Progress bar support for SpamAssassin
+
+SYNOPSIS
+ my $progress = Mail::SpamAssassin::Util::Progress->new({total => 100});
+
+ $msgcount = 0;
+ foreach my $message (@messages) {
+ # do something here
+ $msgcount++;
+ $progress->update($msgcount);
+ }
+
+ $progress->final();
+
+DESCRIPTION
+ This module implements a progress bar for use in SpamAssassin scripts
+ and modules. It allows you to create the progress bar, update it and
+ print out the final results of a particular run.
+
+ new
+ public class (Mail::SpamAssassin::Util::Progress) new (\% $args)
+
+ Description: Creates a new Mail::SpamAssassin::Util::Progress object,
+ valid values for the $args hashref are:
+
+ total (required)
+ The total number of messages expected to be processed. This item is
+ required.
+
+ fh [optional]
+ An optional filehandle may be passed in, otherwise STDERR will be
+ used by default.
+
+ term [optional]
+ The module will attempt to determine if a valid terminal exists on
+ the filehandle. This item allows you to override that value.
+
+ init_bar
+ public instance () init_bar()
+
+ Description: This method creates the initial progress bar and is called
+ automatically from new. In addition you can call init_bar on an existing
+ object to reset the bar to it's original state.
+
+ update
+ public instance () update ([Integer $num_done])
+
+ Description: This method is what gets called to update the progress bar.
+ You may optionally pass in an integer value that indicates how many
+ messages have been processed. If you do not pass anything in then the
+ num_done value will be incremented by one.
+
+ final
+ public instance () final ([Integer $num_done])
+
+ Description: This method should be called once all processing has
+ finished. It will print out the final msgs per sec calculation and the
+ total time taken. You can optionally pass in a num_done value, otherwise
+ it will use the value calculated from the last call to update.
+