http://git-wip-us.apache.org/repos/asf/james-site/blob/f81a00ef/content/server/dev-provided-mailets.html ---------------------------------------------------------------------- diff --git a/content/server/dev-provided-mailets.html b/content/server/dev-provided-mailets.html new file mode 100644 index 0000000..df7165e --- /dev/null +++ b/content/server/dev-provided-mailets.html @@ -0,0 +1,1281 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<!-- Generated by Apache Maven Doxia at 2016-12-06 --> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <title>Apache James Server 3.0 - + Apache James Server 3 - Provided Mailets</title> + <style type="text/css" media="all"> + @import url("./css/james.css"); + @import url("./css/maven-base.css"); + @import url("./css/maven-theme.css"); + @import url("./css/site.css"); + @import url("./js/jquery/css/custom-theme/jquery-ui-1.8.5.custom.css"); + @import url("./js/jquery/css/print.css"); + @import url("./js/fancybox/jquery.fancybox-1.3.4.css"); + </style> + <script type="text/javascript" src="./js/jquery/js/jquery-1.4.2.min.js"></script> + <script type="text/javascript" src="./js/jquery/js/jquery-ui-1.8.5.custom.min.js"></script> + <script type="text/javascript" src="./js/fancybox/jquery.fancybox-1.3.4.js"></script> + <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" /> + <meta name="Date-Revision-yyyymmdd" content="20161206" /> + <meta http-equiv="Content-Language" content="en" /> + +<link title="DOAP" rel="meta" type="application/rdf+xml" href="http://james.apache.org//doap_james-project.rdf"/> + + <!-- Google Analytics --> + <script type="text/javascript"> + + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-1384591-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script').item(0); s.parentNode.insertBefore(ga, s); + })(); + + </script> + </head> + <body class="composite"> + <div id="banner"> + <a href="../index.html" id="bannerLeft" title="james-logo.png"> + + + <img src="images/logos/james-logo.png" alt="Apache James Server 3.0" /> + </a> + <a href="http://www.apache.org/index.html" id="bannerRight"> + + + <img src="images/logos/asf_logo_small.png" alt="The Apache Software Foundation" /> + </a> + <div class="clear"> + <hr/> + </div> + </div> + <div id="breadcrumbs"> + + + <div class="xleft"> + <span id="publishDate">Last Published: 2016-12-06</span> + </div> + <div class="xright"> <a href="../../index.html" title="Home">Home</a> + | + <a href="../index.html" title="Server">Server</a> + | + <a href="../../hupa/index.html" title="Hupa">Hupa</a> + | + <a href="../../protocols/index.html" title="Protocols">Protocols</a> + | + <a href="../../mailet/index.html" title="Mailets">Mailets</a> + | + <a href="../../mailbox/index.html" title="Mailbox">Mailbox</a> + | + <a href="../../mime4j/index.html" title="Mime4J">Mime4J</a> + | + <a href="../../jsieve/index.html" title="jSieve">jSieve</a> + | + <a href="../../jspf/index.html" title="jSPF">jSPF</a> + | + <a href="../../jdkim/index.html" title="jDKIM">jDKIM</a> + | + <a href="../../mpt/index.html" title="MPT">MPT</a> + | + <a href="../../postage/index.html" title="Postage">Postage</a> + + + </div> + <div class="clear"> + <hr/> + </div> + </div> + <div id="leftColumn"> + <div id="navcolumn"> + + + <h5>Overview</h5> + <ul> + <li class="none"> + <a href="index.html" title="Introduction">Introduction</a> + </li> + <li class="none"> + <a href="release-notes.html" title="Release Notes">Release Notes</a> + </li> + </ul> + <h5>Features</h5> + <ul> + <li class="none"> + <a href="feature-mailetcontainer.html" title="Mailet Container">Mailet Container</a> + </li> + <li class="none"> + <a href="feature-queue-priority.html" title="Queue Priority">Queue Priority</a> + </li> + <li class="none"> + <a href="feature-persistence.html" title="Persistence">Persistence</a> + </li> + <li class="none"> + <a href="feature-protocols.html" title="Protocols">Protocols</a> + </li> + <li class="none"> + <a href="feature-smtp-hooks.html" title="SMTP Hooks">SMTP Hooks</a> + </li> + <li class="none"> + <a href="feature-performance.html" title="Performance">Performance</a> + </li> + <li class="none"> + <a href="feature-security.html" title="Security">Security</a> + </li> + </ul> + <h5>User Manual</h5> + <ul> + <li class="none"> + <a href="quick-start.html" title="1. Quick Start">1. Quick Start</a> + </li> + <li class="none"> + <a href="install.html" title="2. Install James">2. Install James</a> + </li> + <li class="collapsed"> + <a href="config.html" title="3. Configure James">3. Configure James</a> + </li> + <li class="collapsed"> + <a href="manage.html" title="4. Manage">4. Manage</a> + </li> + <li class="collapsed"> + <a href="monitor.html" title="5. Monitor">5. Monitor</a> + </li> + <li class="collapsed"> + <a href="upgrade.html" title="6. Upgrade">6. Upgrade</a> + </li> + </ul> + <h5>Developers Corner</h5> + <ul> + <li class="none"> + <a href="dev.html" title="Architecture">Architecture</a> + </li> + <li class="none"> + <a href="dev-build.html" title="Build from source">Build from source</a> + </li> + <li class="none"> + <a href="dev-database-schema.html" title="Database Schema">Database Schema</a> + </li> + <li class="collapsed"> + <a href="dev-extend.html" title="Develop Extensions">Develop Extensions</a> + </li> + <li class="expanded"> + <a href="dev-provided.html" title="Provided Extensions">Provided Extensions</a> + <ul> + <li class="none"> + <strong>Mailets</strong> + </li> + <li class="none"> + <a href="dev-provided-matchers.html" title="Matchers">Matchers</a> + </li> + <li class="none"> + <a href="dev-provided-smtp-hooks.html" title="SMTP Hooks">SMTP Hooks</a> + </li> + </ul> + </li> + </ul> + <h5>References</h5> + <ul> + <li class="none"> + <a href="apidocs/index.html" title="Javadoc">Javadoc</a> + </li> + <li class="none"> + <a href="https://issues.apache.org/jira/browse/JAMES" title="Issue Tracker">Issue Tracker</a> + </li> + </ul> + <h5>About James</h5> + <ul> + <li class="none"> + <a href="../../index.html" title="Overview">Overview</a> + </li> + <li class="none"> + <a href="../../newsarchive.html" title="News">News</a> + </li> + <li class="none"> + <a href="../../mail.html" title="Mailing Lists">Mailing Lists</a> + </li> + <li class="none"> + <a href="../../contribute.html" title="Contributing">Contributing</a> + </li> + <li class="none"> + <a href="../../guidelines.html" title="Guidelines">Guidelines</a> + </li> + <li class="none"> + <a href="http://wiki.apache.org/james" title="Wiki">Wiki</a> + </li> + <li class="none"> + <a href="../../team-list.html" title="Who We Are">Who We Are</a> + </li> + <li class="none"> + <a href="../../license.html" title="License">License</a> + </li> + <li class="none"> + <a href="../../thanks.html" title="Thanks">Thanks</a> + </li> + <li class="none"> + <a href="../../support.html" title="Professional support">Professional support</a> + </li> + </ul> + <h5>Download</h5> + <ul> + <li class="none"> + <a href="../../download.cgi" title="Releases">Releases</a> + </li> + </ul> + <h5>Apache Software Foundation</h5> + <ul> + <li> + <strong> + <a title="ASF" href="http://www.apache.org/">ASF</a> + </strong> + </li> + <li> + <a title="Get Involved" href="http://www.apache.org/foundation/getinvolved.html">Get Involved</a> + </li> + <li> + <a title="FAQ" href="http://www.apache.org/foundation/faq.html">FAQ</a> + </li> + <li> + <a title="License" href="http://www.apache.org/licenses/" >License</a> + </li> + <li> + <a title="Sponsorship" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a> + </li> + <li> + <a title="Thanks" href="http://www.apache.org/foundation/thanks.html">Thanks</a> + </li> + <li> + <a title="Security" href="http://www.apache.org/security/">Security</a> + </li> + </ul> + <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"> + <img class="poweredBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /> + </a> + + + </div> + </div> + <div id="bodyColumn"> + <div id="contentBox"> + <!-- Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. --> + + + +<div class="section"> +<h2>Mailets<a name="Mailets"></a></h2> + + +<p>James provides a number of implemented Mailets for use by James administrators in their +configurations. These are primarily mailets that members of the James developer or user +communities have found useful in their own configurations. A description of how to configure +Mailets and use them in the James SpoolManager can be found <a href="config-mailetcontainer.html">here</a>.</p> + + +<div class="section"> +<h3>AddFooter<a name="AddFooter"></a></h3> + +<p>Description: This mailet adds a text footer to the message.</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>text</b> (required) - the text that will be added as a footer to the message.</li> +</ul> + +</div> + + +<div class="section"> +<h3>AddHabeasWarrantMark<a name="AddHabeasWarrantMark"></a></h3> + +<p>Description: This mailet adds a Habeas warrant mark (see <a class="externalLink" href="http://habeas.com">http://habeas.com</a> for details) to the message.</p> + + +<p>Parameters: None.</p> +</div> + + +<div class="section"> +<h3>AddHeader<a name="AddHeader"></a></h3> + +<p>Description: This mailet is <b>deprecated</b> .Please use SetMimeHeader .</p> +</div> + + +<div class="section"> +<h3>AvalonListserv<a name="AvalonListserv"></a></h3> + +<p>Provides basic list server functionality. Implements basic filters for emails sent to the list, +including restriction of senders to members, diallowing attachments in list messages, and subject line +processing</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>repositoryName</b> (required) - the name of the user repository that contains the users +for this list.</li> + +<li><b>membersonly</b> (optional) - whether only members of the list can send messages to this +list. Defaults to false.</li> + +<li><b>attachmentsallowed</b> (optional) - whether attachments are allowed in messages sent to this +list. Defaults to true.</li> + +<li><b>replytolist</b> (optional) - whether the reply-to address for all messages sent to this +list is set to the list address. Defaults to true.</li> + +<li><b>subjectprefix</b> (optional) - a String value. If set, this value is prepended to the subject +line of all messages sent to the list.</li> + +<li><b>autobracket</b> (optional) - a boolean value. If a subjectprefix is set, this value determines +whether the prefix is bracketed before being prepended to the subject line. Defaults to true.</li> +</ul> + +</div> + + +<div class="section"> +<h3>AvalonListservManager<a name="AvalonListservManager"></a></h3> + +<p>Processes list management commands of the form <list-name>-on@<host> and +<list-name>-off@<host> where <list-name> and lt;host> are arbitrary. Note +that this should be used in tandem with a CommandForListserv matcher to ensure that only commands +intended for a specific list are processed.</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>repositoryName</b> (required) - the name of the user repository that contains the users +for this list.</li> +</ul> + +</div> + + +<div class="section"> +<h3>BayesianAnalysis<a name="BayesianAnalysis"></a></h3> + +<p>Description: Spam detection mailet using bayesian analysis techniques.</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>repositoryPath</b> (required) - The repositoryPath which is used.</li> + +<li><b>headerName</b> - The HeaderName which get adds to holds the Probalitity. Default is <i>X-MessageIsSpamProbability</i>.</li> + +<li><b>ignoreLocalSender</b> - Set to true if you want to ignore messages from local senders. By local sender we mean a return-path +with a local server part (server listed in <servernames> in mailetcontainer.xml). Default is <i>false</i>.</li> + +<li><b>maxSize</b> - Set this to the maximum message size (in bytes) after analysis will be skipped. Default is <i>100000</i>.</li> +</ul> + +</div> + + +<div class="section"> +<h3>BayesianAnalysisFeeder<a name="BayesianAnalysisFeeder"></a></h3> + +<p>Description: Feeds ham OR spam messages to train the BayesianAnalysis mailet.</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>repositoryPath</b> (required) - The repositoryPath which is used.</li> + +<li><b>feedType</b> (required) - The type of the message which is used to feed the mailet. Allowed values are <i>spam</i> and <i>ham</i>.</li> + +<li><b>maxSize</b> - Set this to the maximum message size (in bytes) after analysis will be skipped. Default is <i>100000</i>.</li> +</ul> + +</div> + + +<div class="section"> +<h3>Bounce<a name="Bounce"></a></h3> + +<p>Description: Generates a response to the reverse-path address.</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>sender</b> - The senderAddress which will be used for sending the bounce. Possible values: <i>address</i>, <i>postmaster</i> , <i>sender</i>, +<i>unaltered</i>. Default <i>postmaster</i>.</li> + +<li><b>attachError</b> - Attach error. Default is false.</li> + +<li><b>message</b> - Set the message which get included in the bounce.</li> + +<li><b>prefix</b> - Optional subject prefix prepended to the original message.</li> + +<li><b>inline</b> - Specify which mailpart will be included in the email body. Possible values: <i>unaltered</i>, <i>heads</i>, <i>body</i> , <i>all</i>, +"none". Default "none".</li> + +<li><b>attachment</b> - Specify which mailpart will be attached to the email. Possible values: <i>none</i>, <i>heads</i>, <i>body</i>, <i>all</i>, +<i>message</i>. Default <i>message</i>.</li> + +<li><b>passThrough</b> - If set to false the email will not processed after the bounce. Possible values: <i>true</i>, <i>false</i>. +Default <i>true</i>.</li> + +<li><b>fakeDomainCheck</b> - If set to false true will check if the sender domain is valid. Possible values: <i>true</i>, <i>false</i>. +Default <i>true</i>.</li> + +<li><b>debug</b> - If set true you can enable debugging. Possible values: <i>true</i>, <i>false</i>. +Default <i>false</i>.</li> +</ul> + +</div> + + +<div class="section"> +<h3>ClamAVScan<a name="ClamAVScan"></a></h3> + +<p>Description: Does an antivirus scan check using a ClamAV daemon (CLAMD).</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>host</b> - The host name of the server where CLAMD runs. The default is <i>localhost</i></li> + +<li><b>port</b> - The port on which CLAMD listens. The default is <i>3310</i>.</li> + +<li><b>maxPings</b> - The maximum number of connection retries during startup. If the value is <i>0</i> no startup +test will be done.</li> + +<li><b>pingIntervalMillis</b> (required) - The interval (in milliseconds) between each connection retry during startup. +The default is <i>30000</i> (30 seconds)</li> + +<li><b>streamBufferSize</b> - the BufferedOutputStream buffer size to use writing to the stream connection. The +default is <i>8192</i>.</li> + +<li><b>debug</b> - If set true you can enable debugging. Possible values: <i>true</i>, <i>false</i>. +Default <i>false</i>.</li> +</ul> + +</div> + + +<div class="section"> +<h3>CommandListservFooter<a name="CommandListservFooter"></a></h3> + +<p>Description: CommandListservFooter is based on the AddFooter mailet. It is used by the CommandListservProcessor to inject a footer into mailing list.</p> + + +<p>Parameters: None.</p> +</div> + + +<div class="section"> +<h3>CommandListservManager<a name="CommandListservManager"></a></h3> + +<p> Description: CommandListservManager is the default implementation of ICommandListservManager. +It loads all the configured IListServCommands and delegates to them at runtime. +<br /> +It isn't responsible for procesing messages sent to the main mailing list, but is responsible for +individual commands sent by users, such as: info, subscribe, etc... +<br /> +Requests sent to the CommandListservManager take the form of: +</p> +<div> +<pre> +<listName>-<commandName>@domain +</pre></div> + +If the command isn't recognized an error will be sent. +<br /> +<br /> +The configuration for this mailet sould be in the 'root' processor block. + + +<p>Parameters: +</p> +<ul> + +<li><b>listName</b> - The listname </li> + +<li><b>displayName</b> - The full listname</li> + +<li><b>listOwner</b> - An emailaddress which will be used as owneraddress.</li> + +<li><b>repositoryName</b> - the repository name </li> + +<li><b>listDomain</b> - The domain</li> +</ul> + +<br /> + +<p> Example configuration: +</p> +<div class="source"> +<pre> +<mailet match="CommandListservMatcher=announce@localhost" class="CommandListservManager"> + <listName>announce</listName> + <displayName>Announce mailing list</displayName> + <listOwner>owner@localhost</listOwner> + <repositoryName>list-announce</repositoryName> + <listDomain>localhost</listDomain> + + <commandpackages> + <commandpackage>org.apache.james.transport.mailets.listservcommands</commandpackage> + </commandpackages> + + <commands> + <command name="subscribe" class="Subscribe"/> + <command name="subscribe-confirm" class="SubscribeConfirm"/> + <command name="unsubscribe" class="UnSubscribe"/> + <command name="unsubscribe-confirm" class="UnSubscribeConfirm"/> + <command name="error" class="ErrorCommand"/> + <command name="owner" class="Owner"/> + <command name="info" class="Info"/> + </commands> + </mailet> +</pre></div> + +</div> + + + +<div class="section"> +<h3>DSNBounce<a name="DSNBounce"></a></h3> + +<p>Description: Generates a Delivery Status Notification (DSN). Note that this is different than a mail-client's +reply, which would use the Reply-To or From header.Bounced messages are attached in their entirety (headers and +content) and the resulting MIME part type is "message/rfc822". +The reverse-path and the Return-Path header of the response is set to <i>null</i> (<i><></i>), +meaning that no reply should be sent. +A sender of the notification message can optionally be specified. +If one is not specified, the postmaster's address will be used.</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>sender</b> - An address, postmaster,sender or unaltered. Default is <i>postmaster</i></li> + +<li><b>prefix</b> - Optional subject prefix prepended to the original message.</li> + +<li><b>attachment</b> - Values are message, heads or none. Default is <i>message</i>. +test will be done.</li> + +<li><b>messageString</b> - the message sent in the bounce, the first occurrence of the pattern [machine] is replaced with the name of the executing machine, default=Hi. This is the James mail server at [machine] .... </li> + +<li><b>passThrough</b> (optional) - a boolean value (true/false) indicating whether +processing should continue on the message is on. If false, the original message is GHOSTed. Defaults to false.</li> + +<li><b>debug</b> - If set true you can enable debugging. Possible values: <i>true</i>, <i>false</i>. +Default <i>false</i>.</li> +</ul> + +</div> + + +<div class="section"> +<h3>Forward<a name="Forward"></a></h3> + +<p>Description: This mailet forwards the message to a set of recipients.</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>forwardto</b> (required) - a comma delimited list of email addresses.</li> +</ul> + +</div> + + +<div class="section"> +<h3>FromRepository<a name="FromRepository"></a></h3> + +<p>Description: This mailet ee-spools mail found in the specified Repository.</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>repositoryPath</b> (required) - The repositoryPath which is used.</li> + +<li><b>processor</b> (required) - The target processor to move the mails to.</li> + +<li><b>delete</b> - If set to true the mails get deleted after re-spooling. Default is <i>false</i>.</li> +</ul> + +</div> + + +<div class="section"> +<h3>ICommandListservManager<a name="ICommandListservManager"></a></h3> + +<p>Description: ICommandListservManager is the interface that describes the functionality of any command based list serv managers.</p> + + +<p>Parameters: None.</p> +</div> + + +<div class="section"> +<h3>JDBCAlias<a name="JDBCAlias"></a></h3> + +<p>Description: This mailet does alias translation for email addresses stored in a database table.</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>mappings</b> (required) - a URL of the form db://<data-source>/<table>, where +<table> is the table in the database containing the alias info and <data-source> is the name +of the data-source in mailetcontainer.xml that is to be used.</li> + +<li><b>source-column</b> (required) - the column containing the aliases.</li> + +<li><b>target-column</b> (required) - the column containing the alias targets.</li> +</ul> + +</div> + + +<div class="section"> +<h3>JDBCRecipientRewriteTable<a name="JDBCRecipientRewriteTable"></a></h3> + +<p>Description: This mailet does complex alias translation for email addresses stored in a database table.</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>table</b> (required) - the URL describing the database table. This URL has the form +db://<data-source>/<table> where <data-source> and <table> are the names of +the data-source as defined in mailetcontainer.xml and the table in the database.</li> + +<li><b>sqlquery</b> (optional) - the text of the SQL query used by the mailet to do user +lookup. The default is "select RecipientRewriteTable.target-address from RecipientRewriteTable, RecipientRewriteTable as VUTDomains where (RecipientRewriteTable.user like ? or RecipientRewriteTable.user like '\\%') and (RecipientRewriteTable.domain like ? or (RecipientRewriteTable.domain like '\\%' and VUTDomains.domain like ?)) order by concat(RecipientRewriteTable.user,'@',RecipientRewriteTable.domain) desc limit 1"</li> +</ul> + +</div> + + +<div class="section"> +<h3>LocalDelivery<a name="LocalDelivery"></a></h3> + +<p>Description: This mailet delivers messages to local mailboxes.</p> + + +<p>Parameters: None.</p> +</div> + + +<div class="section"> +<h3>LogMessage<a name="LogMessage"></a></h3> + +<p>Description: Logs Message Headers and/or Body.</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>passThrough</b> (optional) - If the "passThrough" in confs is true the mail will be left untouched in +the pipe. If false will be destroyed. Default is true.</li> + +<li><b>headers</b> (optional) - If set to true the headers get logged. Default is true"</li> + +<li><b>body</b> (optional) - If set to true the body get logged. Default is true.</li> + +<li><b>bodyMax</b> (optional) - The max length wich should be logged. Default is log all.</li> + +<li><b>comment</b> (optional) - The comment which should be logged Default is none.</li> +</ul> + +</div> + + +<div class="section"> +<h3>NotifyPostmaster<a name="NotifyPostmaster"></a></h3> + +<p>Description: This mailet forwards the message as an attachment to the James postmaster.</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>sendingAddress</b> (optional) - the address from which the forwarded email will be +sent. Defaults to the postmaster address.</li> + +<li><b>notice</b> (optional) - the text message that will accompany the forwarded message. Defaults +to "We were unable to deliver the attached message because of an error in the mail server."</li> + +<li><b>attachStackTrace</b> (optional) - whether an error stack trace is attached to the forwarded message.</li> +</ul> + +</div> + + +<div class="section"> +<h3>NotifySender<a name="NotifySender"></a></h3> + +<p>Description: This mailet forwards the message as an attachment to the original sender.</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>sendingAddress</b> (optional) - the address from which the forwarded email will be +sent. Defaults to the postmaster address.</li> + +<li><b>notice</b> (optional) - the text message that will accompany the forwarded message. Defaults +to "We were unable to deliver the attached message because of an error in the mail server."</li> + +<li><b>attachStackTrace</b> (optional) - whether an error stack trace is attached to the forwarded message.</li> +</ul> + +</div> + + +<div class="section"> +<h3>Null<a name="Null"></a></h3> + +<p>Description: This mailet ends processing for this mail.</p> + + +<p>Parameters: None.</p> +</div> + + +<div class="section"> +<h3>PostmasterAlias<a name="PostmasterAlias"></a></h3> + +<p>Description: Intercepts all mails addressed to postmaster@<domain> where <domain> is one +of the domains managed by this James server and substitutes the configured James postmaster address for +the original recipient address. This mailet is inserted automatically by James at the head of the root +processor.</p> + + +<p>Parameters: None.</p> +</div> + + +<div class="section"> +<h3>Redirect<a name="Redirect"></a></h3> + +<p>Description: A mailet providing powerful, configurable redirection services.<br /> + This mailet can produce listserver, forward and notify behaviour, with the + original message intact, attached, appended or left out altogether.<br /> + This built in functionality is controlled by the configuration as described + <a href="apidocs/org/apache/james/transport/mailets/Redirect.html">here</a>.</p> + +<p>It is also intended to be easily subclassed to make providing bespoke redirection + mailets simple. <br /> + By extending it and overriding one or more of its methods new behaviour can + be quickly created without the author having to address any other issue than + the relevant one. For more information see the javadocs + <a href="apidocs/org/apache/james/transport/mailets/Redirect.html">here</a>.</p> + + +<p>Parameters: <a href="apidocs/org/apache/james/transport/mailets/Redirect.html">See javadocs.</a></p> +</div> + + +<div class="section"> +<h3>RemoteDelivery<a name="RemoteDelivery"></a></h3> + + +<p>Manages delivery of messages to recipients on remote SMTP hosts.</p> + + +<p>Parameters: + </p> +<ul> + +<li><b>outgoing</b> (required) - The name of the queue that will hold messages being processed + by the RemoteDelivery Mailet.</li> + +<li><b>delayTime</b> (optional) - a non-negative Long value that is the time in + milliseconds between redelivery attempts for a particular mail. Defaults to six hours.</li> + +<li><b>maxRetries</b> (optional) - a non-negative Integer value that is number of times + the Mailet will attempt to deliver a particular mail. Defaults to five.</li> + +<li><b>timeout</b> (optional) - The SMTP connection timeout for SMTP connections generated + by this Mailet. Defaults to 60 seconds.</li> + +<li><b>deliveryThreads</b> (optional) - The number of threads this Mailet will use to generate + SMTP connections.</li> + +<li><b>gateway</b> (optional) - The host name of the SMTP server + to be used as a gateway for this server. If this value is set, then all + messages will be delivered to the gateway server, regardless of recipient + address. To specify more than one gateway server, add multiple gateway tags, + each containing one value. If more than one server is specified, they will be + tried in order until one is successful. In addition the port may be specified + for each gateway in the format <host>:<port>. If this + value is unset, delivery will occur to SMTP servers resolved by MX lookup.</li> + +<li><b>gatewayPort</b> (optional) - The default port number of the + SMTP server to be used as a gateway for this server. This value will be + employed when a gateway is set <i>and</i> the gateway value does not specify + a port as described above.</li> + +<li><b>gatewayUsername</b> (optional) - The username to use when + authenticating to the defined gateway. This value will be + employed when a gateway is set.</li> + +<li><b>gatewayPassword</b> (optional) - The password to use when + authenticating to the defined gateway. This value will be + employed when a gateway is set.</li> + +<li><b>bind</b> (optional) - If present, this value is a string + describing the local IP address to which the mailet should be bound while + delivering emails. If the tag is absent then the service will bind to the + default local address of the machine. This tag is useful for multihomed machines.<br /> + Note: Currently you must use the same IP address for all of those RemoteDelivery + instances where you explicitly supply a bind address.</li> + +<li><b>startTLS</b> (optional) - a boolean value (true/false) indicating whether starTLS is + on. Defaults to false.</li> + +<li><b>sslEnable</b> (optional) - a boolean value (true/false) indicating whether starTLS is + on. Defaults to false.</li> + +<li><b>debug</b> (optional) - a boolean value (true/false) indicating whether debugging is + on. Defaults to false.</li> + </ul> + + +</div> + + +<div class="section"> +<h3>RemoveAllMailAttributes<a name="RemoveAllMailAttributes"></a></h3> + +<p>Description: Removes all attributes on the Mail instance.</p> + + +<p>Parameters: None.</p> +</div> + + +<div class="section"> +<h3>RemoveMailAttributes<a name="RemoveMailAttributes"></a></h3> + +<p>Description: Remove attributes on the Mail instance.</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>name</b> (required) - The name of the attribute to remove.</li> +</ul> + +</div> + + +<div class="section"> +<h3>Resend<a name="Resend"></a></h3> + +<p>Description:A mailet providing configurable redirection services. For more information see +the javadocs <a href="apidocs/org/apache/james/transport/mailets/Resend.html">here</a>.</p> + + +<p>Parameters: <a href="apidocs/org/apache/james/transport/mailets/Resend.html">See javadocs.</a></p> +</div> + + +<div class="section"> +<h3>ServerTime<a name="ServerTime"></a></h3> + +<p>Description: This mailet sends a message to the sender of the original mail message with a server timestamp.</p> + + +<p>Parameters: None.</p> +</div> + + +<div class="section"> +<h3>SetMailAttributes<a name="SetMailAttributes"></a></h3> + +<p>Description: Set attributes on the Mail instance.</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>name</b> (required) - The name of the attribute to set.</li> +</ul> + +</div> + + +<div class="section"> +<h3>SetMimeHeader<a name="SetMimeHeader"></a></h3> + +<p>Description: Set an MimeHeader on a MimeMessage.</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>name</b> (required) - the name of the header to be added to the message.</li> + +<li><b>value</b> (required) - the text that will be added as a header to the message.</li> +</ul> + +</div> + + +<div class="section"> +<h3>SMIMECheckSignature<a name="SMIMECheckSignature"></a></h3> + +<p>Description: Verifies the s/mime signature of a message. The s/mime signing ensure that +the private key owner is the real sender of the message. To be checked by +this mailet the s/mime signature must contain the actual signature, the +signer's certificate and optionally a set of certificate that can be used to +create a chain of trust that starts from the signer's certificate and leads +to a known trusted certificate. +</p> + +<p> +This check is composed by two steps: firstly it's ensured that the signature +is valid, then it's checked if a chain of trust starting from the signer +certificate and that leads to a trusted certificate can be created. The first +check verifies that the the message has not been modified after the signature +was put and that the signer's certificate was valid at the time of the +signing. The latter should ensure that the signer is who he declare to be. +</p> + + +<p>Parameters: <a href="apidocs/org/apache/james/transport/mailets/smime/SMIMECheckSignature.html">See javadocs.</a></p> +</div> + + +<div class="section"> +<h3>SMIMEDecrypt<a name="SMIMEDecrypt"></a></h3> + +<p>Description: This mailet decrypts a s/mime encrypted message. It takes as input an +encrypted message and it tries to dechiper it using the key specified in its +configuration. If the decryption is successful the mail will be changed and +it will contain the decrypted message. The mail attribute +<tt>org.apache.james.SMIMEDecrypt</tt> will contain the public +certificate of the key used in the process. </p> + + +<p>Parameters: <a href="apidocs/org/apache/james/transport/mailets/smime/SMIMEDecrypt.html">See javadocs.</a></p> +</div> + + +<div class="section"> +<h3>SMIMESign<a name="SMIMESign"></a></h3> + +<p>Description: Puts a <i>server-side</i> SMIME signature on a message. +It is a concrete subclass of SMIMEAbstractSign, with very few modifications to it.</p> + +<p>A text file with an explanation text is attached to the original message, +and the resulting message with all its attachments is signed. +The resulting appearence of the message is almost unchanged: only an extra attachment +and the signature are added.</p> + + +<p>Parameters: <a href="apidocs/org/apache/james/transport/mailets/smime/SMIMESign.html">See javadocs.</a></p> +</div> + + +<div class="section"> +<h3>ToProcessor<a name="ToProcessor"></a></h3> + +<p>Description: Redirects processing of the mail message to the specified processor.</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>processor</b> (required) - the name of the processor to which the message +is to be redirected.</li> + +<li><b>noticeText</b> (optional) - a String value that, if present, +is set as the error message of the redirected message. If this value is not +present, no error message is set.</li> +</ul> + +</div> + + +<div class="section"> +<h3>ToSenderFolder<a name="ToSenderFolder"></a></h3> + +<p> + Description: Place a copy of the mail message in a folder of the sender. It needs to be used in combination + with the SenderIsLocal matcher + </p> + + +<p>Parameters: + </p> +<ul> + +<li><b>folder</b> (required) - The folder name of the Sender mailbox in which the mail will be copied.</li> + +<li><b>consume</b> (optional) - flag tru or false: will tell is the mail will be further processed by the upcoming processor mailets, or not</li> + </ul> + + + +<div class="source"> +<pre> +<mailet match="SenderIsLocal" class="ToSenderFolder"> + <folder>Sent</folder> + <consume>false</consume> +</mailet> +</pre></div> + +</div> + + +<div class="section"> +<h3>ToMultiRepository<a name="ToMultiRepository"></a></h3> + +<p>Description: Receives a Mail from JamesSpoolManager and takes care of delivery of the +message to local inboxes or a specific repository. + +Differently from LocalDelivery this does not lookup the UserRepository This +simply store the message in a repository named like the local part of the +recipient address. + +If no repository is specified then this fallback to MailServer.getUserInbox. +Otherwise you can add your own configuration for the repository.</p> + +<p>Parameters: +</p> +<ul> + +<li><b>repositoryUrl</b> (required) - the URL of the repository to which the message +is to be added.</li> + +<li><b>addDeliveryHeader</b> (optional) - a String value which can be used specify a header which will add to the message. +Default is to not add a header.</li> +</ul> + +</div> + + +<div class="section"> +<h3>ToRecipientFolder<a name="ToRecipientFolder"></a></h3> + +<p> + Description: Place a copy of the mail message in a folder of the recipient. It receives a Mail from the Queue and + takes care to deliver the message to a defined folder of the recipient(s). + </p> + + +<p>Parameters: + </p> +<ul> + +<li><b>folder</b> (required) - The folder name of the Recipient mailbox in which the mail will be copied.</li> + +<li><b>consume</b> (optional) - flag true or false: will tell is the mail will be further processed by the upcoming processor mailets, or not</li> + </ul> + + + +<div class="source"> +<pre> +<mailet match="RecipientIsLocal" class="ToRecipientFolder"> + <folder>Junk</folder> + <consume>false</consume> +</mailet> +</pre></div> +</div> + + +<div class="section"> +<h3>ToRepository<a name="ToRepository"></a></h3> + +<p>Places a copy of the message in the specified repository.</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>repositoryPath</b> (required) - the URL of the repository to which the message +is to be added.</li> + +<li><b>passThrough</b> (optional) - a boolean value (true/false) indicating whether +processing should continue on the message is on. If false, the original message is GHOSTed. Defaults to false.</li> +</ul> + +</div> + + +<div class="section"> +<h3>UseHeaderRecipients<a name="UseHeaderRecipients"></a></h3> + +<p>Description: Ignores the recipients associated with the Mail interface. Instead, it regenerates the +mail recipients from the MimeMessage headers (To, Cc, Bcc) and inserts a new message at the queue root +these new recipients. The original message is GHOSTed.</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>debug</b> (optional) - a boolean value (true/false) indicating whether debugging is +on. Defaults to false.</li> +</ul> + +</div> + + +<div class="section"> +<h3>UsersRepositoryAliasingForwarding<a name="UsersRepositoryAliasingForwarding"></a></h3> + +<p>Receives a Mail from JamesSpoolManager and takes care of delivery of the +message to local inboxes.</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>enableAliases</b> (optional) - Specify wether the user aliases should +be looked up or not. Default is false.</li> + +<li><b>enableForwarding</b> (optional) -Enable the forwarding. Default to +false.</li> + +<li><b>usersRepository</b> (optional) - Specific users repository +name. Default to empty. If empty does lookup the default userRepository. +</li> +</ul> + +</div> + + +<div class="section"> +<h3>WhiteListManager<a name="WhiteListManager"></a></h3> + +<p>Manages for each local user a "white list" of remote addresses whose messages +should never be blocked as spam.</p> + +<p>The normal behaviour is to check, for a local sender, if a remote recipient +is already in the list: if not, it will be automatically inserted. +This is under the interpretation that if a local sender <i>X</i> sends a message to a +remote recipient <i>Y</i>, then later on if a message is sent by <i>Y</i> to <i>X</i> it should be +considered always valid and never blocked; hence <i>Y</i> should be in the white list +of <i>X</i>.</p> + +<p>Another mode of operations is when a local sender sends a message to <i>whitelistManagerAddress</i> +with one of three specific values in the subject, to +(i) send back a message displaying a list of the addresses in his own list; +(ii) insert some new addresses in his own list; +(iii) remove some addresses from his own list. +In all this cases the message will be ghosted and the postmaster will reply +to the sender.</p> + +<p> The sender name is always converted to its primary name (handling aliases).</p> + + +<p>Parameters: +</p> +<ul> + +<li><b>repositoryPath</b> - The repository path.</li> + +<li><b>automaticInsert</b> (optional) - If true automatically inserts the local sender to remote +recipients entries in the whitelist. Default is false.</li> + +<li><b>whitelistManagerAddress</b> (optional) - Set this to an email address of the "whitelist manager" to send +commands to (default is null).</li> + +<li><b>displayFlag</b> (optional) - Set this to a unique text that you can use (by sending a +message to the "whitelist manager" above) to tell the mailet to send back the contents of the white list. Default is null.</li> + +<li><b>insertFlag</b> (optional) - Set this to a unique text that you can use (by sending a message to the "whitelist manager" above) +to tell the mailet to insert some new remote recipients to the white list. Default is null.</li> + +<li><b>removeFlag</b> (optional) - Set this to a unique text that you can use (by sending a message to the "whitelist manager" above) +to tell the mailet to remove some remote recipients from the white list. Default is null.</li> +</ul> + +</div> +</div> + + + </div> + </div> + <div class="clear"> + <hr/> + </div> + <div id="footer"> + <div class="xright">Copyright © 2002-2016 + <a href="https://www.apache.org/">The Apache Software Foundation</a>. + All Rights Reserved. + + </div> + <div class="clear"> + <hr/> + </div> + </div> + </body> +</html>
http://git-wip-us.apache.org/repos/asf/james-site/blob/f81a00ef/content/server/dev-provided-matchers.html ---------------------------------------------------------------------- diff --git a/content/server/dev-provided-matchers.html b/content/server/dev-provided-matchers.html new file mode 100644 index 0000000..053892b --- /dev/null +++ b/content/server/dev-provided-matchers.html @@ -0,0 +1,899 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<!-- Generated by Apache Maven Doxia at 2016-12-06 --> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <title>Apache James Server 3.0 - + Apache James Server 3 - Provided Matchers</title> + <style type="text/css" media="all"> + @import url("./css/james.css"); + @import url("./css/maven-base.css"); + @import url("./css/maven-theme.css"); + @import url("./css/site.css"); + @import url("./js/jquery/css/custom-theme/jquery-ui-1.8.5.custom.css"); + @import url("./js/jquery/css/print.css"); + @import url("./js/fancybox/jquery.fancybox-1.3.4.css"); + </style> + <script type="text/javascript" src="./js/jquery/js/jquery-1.4.2.min.js"></script> + <script type="text/javascript" src="./js/jquery/js/jquery-ui-1.8.5.custom.min.js"></script> + <script type="text/javascript" src="./js/fancybox/jquery.fancybox-1.3.4.js"></script> + <link rel="stylesheet" href="./css/print.css" type="text/css" media="print" /> + <meta name="Date-Revision-yyyymmdd" content="20161206" /> + <meta http-equiv="Content-Language" content="en" /> + +<link title="DOAP" rel="meta" type="application/rdf+xml" href="http://james.apache.org//doap_james-project.rdf"/> + + <!-- Google Analytics --> + <script type="text/javascript"> + + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-1384591-1']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script').item(0); s.parentNode.insertBefore(ga, s); + })(); + + </script> + </head> + <body class="composite"> + <div id="banner"> + <a href="../index.html" id="bannerLeft" title="james-logo.png"> + + + <img src="images/logos/james-logo.png" alt="Apache James Server 3.0" /> + </a> + <a href="http://www.apache.org/index.html" id="bannerRight"> + + + <img src="images/logos/asf_logo_small.png" alt="The Apache Software Foundation" /> + </a> + <div class="clear"> + <hr/> + </div> + </div> + <div id="breadcrumbs"> + + + <div class="xleft"> + <span id="publishDate">Last Published: 2016-12-06</span> + </div> + <div class="xright"> <a href="../../index.html" title="Home">Home</a> + | + <a href="../index.html" title="Server">Server</a> + | + <a href="../../hupa/index.html" title="Hupa">Hupa</a> + | + <a href="../../protocols/index.html" title="Protocols">Protocols</a> + | + <a href="../../mailet/index.html" title="Mailets">Mailets</a> + | + <a href="../../mailbox/index.html" title="Mailbox">Mailbox</a> + | + <a href="../../mime4j/index.html" title="Mime4J">Mime4J</a> + | + <a href="../../jsieve/index.html" title="jSieve">jSieve</a> + | + <a href="../../jspf/index.html" title="jSPF">jSPF</a> + | + <a href="../../jdkim/index.html" title="jDKIM">jDKIM</a> + | + <a href="../../mpt/index.html" title="MPT">MPT</a> + | + <a href="../../postage/index.html" title="Postage">Postage</a> + + + </div> + <div class="clear"> + <hr/> + </div> + </div> + <div id="leftColumn"> + <div id="navcolumn"> + + + <h5>Overview</h5> + <ul> + <li class="none"> + <a href="index.html" title="Introduction">Introduction</a> + </li> + <li class="none"> + <a href="release-notes.html" title="Release Notes">Release Notes</a> + </li> + </ul> + <h5>Features</h5> + <ul> + <li class="none"> + <a href="feature-mailetcontainer.html" title="Mailet Container">Mailet Container</a> + </li> + <li class="none"> + <a href="feature-queue-priority.html" title="Queue Priority">Queue Priority</a> + </li> + <li class="none"> + <a href="feature-persistence.html" title="Persistence">Persistence</a> + </li> + <li class="none"> + <a href="feature-protocols.html" title="Protocols">Protocols</a> + </li> + <li class="none"> + <a href="feature-smtp-hooks.html" title="SMTP Hooks">SMTP Hooks</a> + </li> + <li class="none"> + <a href="feature-performance.html" title="Performance">Performance</a> + </li> + <li class="none"> + <a href="feature-security.html" title="Security">Security</a> + </li> + </ul> + <h5>User Manual</h5> + <ul> + <li class="none"> + <a href="quick-start.html" title="1. Quick Start">1. Quick Start</a> + </li> + <li class="none"> + <a href="install.html" title="2. Install James">2. Install James</a> + </li> + <li class="collapsed"> + <a href="config.html" title="3. Configure James">3. Configure James</a> + </li> + <li class="collapsed"> + <a href="manage.html" title="4. Manage">4. Manage</a> + </li> + <li class="collapsed"> + <a href="monitor.html" title="5. Monitor">5. Monitor</a> + </li> + <li class="collapsed"> + <a href="upgrade.html" title="6. Upgrade">6. Upgrade</a> + </li> + </ul> + <h5>Developers Corner</h5> + <ul> + <li class="none"> + <a href="dev.html" title="Architecture">Architecture</a> + </li> + <li class="none"> + <a href="dev-build.html" title="Build from source">Build from source</a> + </li> + <li class="none"> + <a href="dev-database-schema.html" title="Database Schema">Database Schema</a> + </li> + <li class="collapsed"> + <a href="dev-extend.html" title="Develop Extensions">Develop Extensions</a> + </li> + <li class="expanded"> + <a href="dev-provided.html" title="Provided Extensions">Provided Extensions</a> + <ul> + <li class="none"> + <a href="dev-provided-mailets.html" title="Mailets">Mailets</a> + </li> + <li class="none"> + <strong>Matchers</strong> + </li> + <li class="none"> + <a href="dev-provided-smtp-hooks.html" title="SMTP Hooks">SMTP Hooks</a> + </li> + </ul> + </li> + </ul> + <h5>References</h5> + <ul> + <li class="none"> + <a href="apidocs/index.html" title="Javadoc">Javadoc</a> + </li> + <li class="none"> + <a href="https://issues.apache.org/jira/browse/JAMES" title="Issue Tracker">Issue Tracker</a> + </li> + </ul> + <h5>About James</h5> + <ul> + <li class="none"> + <a href="../../index.html" title="Overview">Overview</a> + </li> + <li class="none"> + <a href="../../newsarchive.html" title="News">News</a> + </li> + <li class="none"> + <a href="../../mail.html" title="Mailing Lists">Mailing Lists</a> + </li> + <li class="none"> + <a href="../../contribute.html" title="Contributing">Contributing</a> + </li> + <li class="none"> + <a href="../../guidelines.html" title="Guidelines">Guidelines</a> + </li> + <li class="none"> + <a href="http://wiki.apache.org/james" title="Wiki">Wiki</a> + </li> + <li class="none"> + <a href="../../team-list.html" title="Who We Are">Who We Are</a> + </li> + <li class="none"> + <a href="../../license.html" title="License">License</a> + </li> + <li class="none"> + <a href="../../thanks.html" title="Thanks">Thanks</a> + </li> + <li class="none"> + <a href="../../support.html" title="Professional support">Professional support</a> + </li> + </ul> + <h5>Download</h5> + <ul> + <li class="none"> + <a href="../../download.cgi" title="Releases">Releases</a> + </li> + </ul> + <h5>Apache Software Foundation</h5> + <ul> + <li> + <strong> + <a title="ASF" href="http://www.apache.org/">ASF</a> + </strong> + </li> + <li> + <a title="Get Involved" href="http://www.apache.org/foundation/getinvolved.html">Get Involved</a> + </li> + <li> + <a title="FAQ" href="http://www.apache.org/foundation/faq.html">FAQ</a> + </li> + <li> + <a title="License" href="http://www.apache.org/licenses/" >License</a> + </li> + <li> + <a title="Sponsorship" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a> + </li> + <li> + <a title="Thanks" href="http://www.apache.org/foundation/thanks.html">Thanks</a> + </li> + <li> + <a title="Security" href="http://www.apache.org/security/">Security</a> + </li> + </ul> + <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"> + <img class="poweredBy" alt="Built by Maven" src="./images/logos/maven-feather.png" /> + </a> + + + </div> + </div> + <div id="bodyColumn"> + <div id="contentBox"> + <!-- Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. --> + + + + <div class="section"> +<h2>Matchers<a name="Matchers"></a></h2> + + +<p>James provides a number of implemented Matchers for use by James administrators in their + configurations. These are primarily matchers that members of the James developer or user + communities have found useful in their own configurations. A description of how to configure + Matchers and use them in the James SpoolManager can be found <a href="config-mailetcontainer.html">here</a>.</p> + + +<div class="section"> +<h3>All<a name="All"></a></h3> + +<p>Description: This matcher is the trivial one - it matches all mails being processed. All recipients are returned.</p> + +<p>Configuration string: None.</p> + </div> + + +<div class="section"> +<h3>AttachmentFileNameIs<a name="AttachmentFileNameIs"></a></h3> + +<p>Description: It can be used to refuse emails with SCR, PIF, EXE etc. attachments. + It matches mails that has a file attachment with a file name meeting one of the supplied filters. + All recipients are returned.</p> + +<p>Configuration string: A comma or space delimited list of file names. + File names may start with a wildcard '*'. Example: *.scr,*.bat,*.pif,*.pi,*.com,*.exe + </p> +<div> +<pre><tt> + <mailet match="AttachmentFileNameIs=value, value, .." class="<any-class>"> + </tt></pre></div> + + </div> + + +<div class="section"> +<h3>CommandForListserv<a name="CommandForListserv"></a></h3> + +<p>Description: The CommandForListserv matcher is used as a simple filter to recognize emails that are list server + commands. It will match any email addressed to the list server host, as well as any email that is addressed + to a user named <prefix>-on or <prefix>-off on any host. Only those matching recipients will be returned.</p> + +<p>Configuration string: An email address of the form <prefix>@<host>, where host is the hostname used for the listserver and prefix is the command prefix. + </p> +<div> +<pre><tt> + <mailet match="[email protected]" class="<any-class>"> + </tt></pre></div> + + </div> + + +<div class="section"> +<h3>CommandForListservManager<a name="CommandForListservManager"></a></h3> + +<p>Description: CommandListservMatcher is the matcher that pairs with the CommandListservManager mailet. It checks to see if the request is + intended for the ListservManager, but doesn't guarantee that it is a valid command. Only those matching recipients will be returned.</p> + +<p>Configuration string: An email address. + </p> +<div> +<pre><tt> + <mailet match="CommandForListservManager=announce@localhost" class="<any-class>"> + </tt></pre></div> + + </div> + + +<div class="section"> +<h3>CompareNumericHeaderValue<a name="CompareNumericHeaderValue"></a></h3> + +<p>Description: Matches mails containing a header with a numeric value whose comparison with the specified value is true. + If the header is missing in the message, there will be <i>no match</i>. All recipients are returned.</p> + +<p>Configuration string: The headerName, a comparison operator and the numeric headerValue + to compare with, <i>space or tab delimited</i>. + </p> +<div> +<pre><tt> + <mailet match="CompareNumericHeaderValue= X-MessageIsSpamProbability > 0.9" class="<any-class>"> + </tt></pre></div> + + </div> + + +<div class="section"> +<h3>FetchedFrom<a name="FetchedFrom"></a></h3> + +<p>Description: A matcher intended for use with the FetchMail server. It matches a custom header (X-fetched-from) that is + set by the FetchMail server. FetchMail sets this header to the name of the FetchPOP task which originally fetched + the message. All recipients are returned.</p> + +<p>Configuration string: The name of the FetchMail task which originally fetched the message. + </p> +<div> +<pre><tt> + <mailet match="FetchedFrom=value" class="<any-class>"> + </tt></pre></div> + + </div> + + +<div class="section"> +<h3>FileRegexMatcher<a name="FileRegexMatcher"></a></h3> + +<p>Description: A matcher which can be used to match on a attachment when the given regex match. All recipients are returned.</p> + +<p>Configuration string: A regex for match attachmentname. + </p> +<div> +<pre><tt> + <mailet match="FileRegexMatcher=value" class="<any-class>"> + </tt></pre></div> + + </div> + + +<div class="section"> +<h3>HasAttachment<a name="HasAttachment"></a></h3> + +<p>Description: Matches those messages with at list a body part with an attachment. Content disposition + is used to detect attachment, as specified by RFC-2183. All recipients are returned.</p> + +<p>Configuration string: None.</p> + </div> + + +<div class="section"> +<h3>HasHabeasWarrantMark<a name="HasHabeasWarrantMark"></a></h3> + +<p>Description: Matches mails that have the Habeas Warrant (see http://www.habeas.com for details). All recipients are returned.</p> + +<p>Configuration string: None.</p> + </div> + + +<div class="section"> +<h3>HasHeader<a name="HasHeader"></a></h3> + +<p>Description: Matches mails that have the specified header. All recipients are returned.</p> + +<p> + Configuration string: The name of the header whose presence determines the match. + </p> +<div> +<pre><tt> + <mailet match="HasHeader=headerName" class="<any-class>"> + </tt></pre></div> + + +<p> + One can additionally specify a header value associated with the header name. You can do something like : + </p> +<div> +<pre><tt> + <mailet match="HasHeader=headerName=headerValue" class="<any-class>"> + </tt></pre></div> + + +<p> + You can verify several headers at once. They should all be matching. To do so, separate your conditions using "+" : + </p> +<div> +<pre><tt> + <mailet match="HasHeader=headerName1+headerName2=value" class="<any-class>"> + </tt></pre></div> + + +<p> + Note: If the header you are matching against is present several time in the received mail, then it is + considered as matching if the specified value is present on one line. + </p> + </div> + + +<div class="section"> +<h3>HasMailAttribute<a name="HasMailAttribute"></a></h3> + +<p>Description: Matches mails that have the specified Mail Attribute. All + recipients are returned.</p> + +<p>Configuration string: The name of the Mail Attribute to match. For example:<br /> + </p> +<div> +<pre><tt> + <mailet match="HasMailAttribute=name" class="<any-class>"> + </tt></pre></div> + + </div> + + +<div class="section"> +<h3>HasMailAttributeWithValue<a name="HasMailAttributeWithValue"></a></h3> + +<p>Description: Matches mails that have the specified Mail Attribute and the + specified MailAttribute value. All recipients are returned.</p> + +<p>MailAttributes are types of Object whereas the value specified in the Matcher + condition is of type String. The toString() method is used to obtain a String + representation of the Mail Attribute value for matching. The + String.equals(String) method tests for a match.</p> + +<p>Configuration string: The name of the Mail Attribute to be matched, a comma + and then the String value to be matched. For example:<br /> + </p> +<div> +<pre><tt> + <mailet match="HasMailAttributeWithValue=name, value" class="<any-class>"> + </tt></pre></div> + + </div> + + +<div class="section"> +<h3>HasMailAttributeWithValueRegex<a name="HasMailAttributeWithValueRegex"></a></h3> + +<p>Description: Matches mails that have the specified Mail Attribute and + a MailAttribute value that matches the specified regular expression. + All recipients are returned.</p> + +<p>MailAttributes are types of Object whereas the value specified in the Matcher + condition is of type String. The toString() method is used to obtain a String + representation of the Mail Attribute value for matching. The regular + expression must follow Perl5 syntax.</p> + +<p>Configuration string: The name of the Mail Attribute to be matched, a comma + and then the regular expression used to match the value against. For example:<br /> + </p> +<div> +<pre><tt> + <mailet match="HasMailAttributeWithValueRegex=name, regex" class="<any-class>"> + </tt></pre></div> + + </div> + + +<div class="section"> +<h3>HostIs<a name="HostIs"></a></h3> + +<p>Description: Matches mails that are sent to email addresses on hosts that are in the configuration list. Only + recipients that are on one of the hosts are returned.</p> + +<p>Configuration string: A list of host names, comma or space delimited. + </p> +<div> +<pre><tt> + <mailet match="HostIs=value, value, .." class="<any-class>"> + </tt></pre></div> + + </div> + + +<div class="section"> +<h3>HostIsLocal<a name="HostIsLocal"></a></h3> + +<p>Description: Matches mails that are sent to email addresses on local hosts. Only + recipients that are on one of the local hosts are returned.</p> + +<p>Configuration string: None.</p> + </div> + + +<div class="section"> +<h3>InSpammerBlacklist<a name="InSpammerBlacklist"></a></h3> + +<p>Description: Checks the mail against one of a number of mail-abuse.org IP lists. All recipients are returned</p> + +<p>Configuration string: One of three strings - "blackholes.mail-abuse.org", "relays.mail-abuse.org", or "dialups.mail-abuse.org".</p> + </div> + + +<div class="section"> +<h3>IsInWhiteList<a name="IsInWhiteList"></a></h3> + +<p>Description: Matches recipients having the mail sender in the recipient's private whitelist. + The recipient name is always converted to its primary name (handling aliases).</p> + +<p>Configuration string: The database name containing the white list table.</p> + +<div> +<pre><tt> + <mailet match="IsInWhiteList=db://maildb" class="ToProcessor"> + <processor> transport </processor> + </mailet> + </tt></pre></div> + </div> + + +<div class="section"> +<h3>IsSingleRecipient<a name="IsSingleRecipient"></a></h3> + +<p>Description: Matches those messages sent to only a single recipient. The single recipient is returned.</p> + +<p>Configuration string: None.</p> + </div> + + +<div class="section"> +<h3>NESSpamCheck<a name="NESSpamCheck"></a></h3> + +<p>Description: A matcher derived from a Netscape Mail Server spam filter. If the matcher detects headers that + indicate spam, the message is matched. All recipients are returned.</p> + +<p>Configuration string: None.</p> + </div> + + +<div class="section"> +<h3>RecipientIs<a name="RecipientIs"></a></h3> + +<p>Description: Matches mails that are sent to one of the recipients on a specified list. Only + matching recipients are returned.</p> + +<p>Configuration string: A list of recipient addresses, comma, tab, or space delimited. + </p> +<div> +<pre><tt> + <mailet match="RecipientIs=value, value, .." class="<any-class>"> + </tt></pre></div> + + </div> + + +<div class="section"> +<h3>RecipientIsLocal<a name="RecipientIsLocal"></a></h3> + +<p>Description: Matches mails that are sent to email addresses on local hosts with users that have local accounts. Only + matching recipients are returned.</p> + +<p>Configuration string: None.</p> + </div> + + +<div class="section"> +<h3>RecipientIsOverFixedQuota<a name="RecipientIsOverFixedQuota"></a></h3> + +<p>Description: Matches mails that are send to email addresses which are over the given quota. Only + matching recipients are returned.</p> + +<p>Configuration string: The quota + </p> +<div> +<pre><tt> + <mailet match="RecipientIsOverFixedQuota=10m" class="<any-class>"> + </tt></pre></div> + + </div> + + +<div class="section"> +<h3>RecipientIsRegex<a name="RecipientIsRegex"></a></h3> + +<p>Description: Matches mails that are send to email addresses which are matched given regex. Only + matching recipients are returned.</p> + +<p>Configuration string: The quota + </p> +<div> +<pre><tt> + <mailet match="RecipientIsRegex=value" class="<any-class>"> + </tt></pre></div> + + </div> + + + +<div class="section"> +<h3>RelayLimit<a name="RelayLimit"></a></h3> + +<p>Description: Counts the number of Received headers in the mail (each of which represents a server + in the relay chain). If the number equals or exceeds the specified limit, the mail is + matched. All recipients are returned.</p> + +<p>Configuration string: a positive integer that is the limit on the number of relays. + </p> +<div> +<pre><tt> + <mailet match="RelayLimit=value" class="<any-class>"> + </tt></pre></div> + + </div> + + +<div class="section"> +<h3>RemoteAddrInNetwork<a name="RemoteAddrInNetwork"></a></h3> + +<p>Description: Checks the remote address from which the mail was received against the configured list. If the address matches one on the list, the matcher considers it a match. + All recipients are returned.</p> + +<p>Configuration string: A list of domain names, IP addresses, or wildcarded IP subnets of any class. The + list may be comma or space delimited. + </p> +<div> +<pre><tt> + <mailet match="RemoteAddrInNetwork=value, value, .." class="<any-class>"> + </tt></pre></div> + + </div> + + +<div class="section"> +<h3>RemoteAddrNotInNetwork<a name="RemoteAddrNotInNetwork"></a></h3> + +<p>Description: Checks the remote address from which the mail was received against the configured list. If the address doesn't match one on the list, the matcher considers it a match. + All recipients are returned.</p> + +<p>Configuration string: A list of domain names, IP addresses, or wildcarded IP subnets of any class. The + list may be comma or space delimited. + </p> +<div> +<pre><tt> + <mailet match="RemoteAddrNotInNetwork=value, value, .." class="<any-class>"> + </tt></pre></div> + + </div> + + +<div class="section"> +<h3>SenderHostIs<a name="SenderHostIs"></a></h3> + +<p>Description: Matches mails where the host name in the address of the sender cannot be resolved. All + recipients are returned.</p> + +<p>Configuration string: None.</p> + </div> + + +<div class="section"> +<h3>SenderInFakeDomain<a name="SenderInFakeDomain"></a></h3> + +<p>Description: Matches mails where the host name in the address of the sender cannot be resolved. All + recipients are returned.</p> + +<p>Configuration string: None.</p> + </div> + + +<div class="section"> +<h3>SenderIs<a name="SenderIs"></a></h3> + +<p>Description: Matches mails that are sent by one of the senders on a specified list. All + recipients are returned.</p> + +<p>Configuration string: A list of sender addresses, comma, tab, or space delimited. + </p> +<div> +<pre><tt> + <mailet match="SenderIs=value, value, .." class="<any-class>"> + </tt></pre></div> + + </div> + + +<div class="section"> +<h3>SenderIsNull<a name="SenderIsNull"></a></h3> + +<p>Description: Matches mails that are sent by a null sender.</p> + +<p>Configuration string: none. + </p> +<div> +<pre><tt> + <mailet match="SenderIsNull" class="<any-class>"> + </tt></pre></div> + + </div> + + +<div class="section"> +<h3>SenderIsRegex<a name="SenderIsRegex"></a></h3> + +<p>Description: Matches mails that are sent by one of the senders matched the given regex. + All recipients are returned.</p> + +<p>Configuration string: A regex. + </p> +<div> +<pre><tt> + <mailet match="SenderIsRegex=value" class="<any-class>"> + </tt></pre></div> + + </div> + + +<div class="section"> +<h3>SizeGreaterThan<a name="SizeGreaterThan"></a></h3> + +<p>Description: Matches emails with a total message size (headers and body) greater than the specified limit. + All recipients are returned. Specified limit should be strictly positive.</p> + +<p>Configuration string: a positive integer followed by an 'm' or a 'k'. This is the maximum message size permitted + specified in megabytes or kilobytes respectively. + </p> +<div> +<pre><tt> + <mailet match="SizeGreaterThan=1m" class="<any-class>"> + </tt></pre></div> + + </div> + + +<div class="section"> +<h3>SMTPAuthSuccessful<a name="SMTPAuthSuccessful"></a></h3> + +<p>Description: Matches mails that are send from an authorized sender. All recipients are returned.</p> + +<p>Configuration string: none. + </p> +<div> +<pre><tt> + <mailet match="SMTPAuthSuccessful" class="<any-class>"> + </tt></pre></div> + + </div> + + +<div class="section"> +<h3>SMTPAuthUserIs<a name="SMTPAuthUserIs"></a></h3> + +<p>Description: Matches mails that are send from one of the given authorized senders. All recipients are returned.</p> + +<p>Configuration string: none. + </p> +<div> +<pre><tt> + <mailet match="SMTPAuthUserIs=value, value, .." class="<any-class>"> + </tt></pre></div> + + </div> + + + +<div class="section"> +<h3>SubjectIs<a name="SubjectIs"></a></h3> + +<p>Description: Matches emails with the specified subject. All recipients are returned.</p> + +<p>Configuration string: The string against which mail subject headers are matched. + </p> +<div> +<pre><tt> + <mailet match="SubjectIs=value" class="<any-class>"> + </tt></pre></div> + + </div> + + +<div class="section"> +<h3>SubjectStartsWith<a name="SubjectStartsWith"></a></h3> + +<p>Description: Matches emails whose subject header starts with the specified string. All recipients are returned.</p> + +<p>Configuration string: The string against which mail subject headers are matched. + </p> +<div> +<pre><tt> + <mailet match="SubjectStartsWith=value" class="<any-class>"> + </tt></pre></div> + + </div> + + +<div class="section"> +<h3>UserIs<a name="UserIs"></a></h3> + +<p>Description: Matches mails that are sent to email addresses that have userids that are in the configuration list. Only + matching recipients are returned.</p> + +<p>Configuration string: A list of user names, comma or space delimited. + </p> +<div> +<pre><tt> + <mailet match="UserIs=value, value, .." class="<any-class>"> + </tt></pre></div> + + </div> + + </div> + + + </div> + </div> + <div class="clear"> + <hr/> + </div> + <div id="footer"> + <div class="xright">Copyright © 2002-2016 + <a href="https://www.apache.org/">The Apache Software Foundation</a>. + All Rights Reserved. + + </div> + <div class="clear"> + <hr/> + </div> + </div> + </body> +</html> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
