You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Giulio Troccoli <gi...@troccoli.it> on 2006/10/29 12:10:15 UTC
Mailet order
Hi everybody,
Is there an order how the mailet are "executed"? Does James process the
email for the first mailet that "matches" or for all the mailets that
"matches"?
Here is an example.
<mailet match="SenderIs=webmaster@localhost"
class="CommandListservProcessor">
...
<mailet match="RecipientIs=testML@localhost"
class="CommandListservProcessor">
...
If webmaster sends an email to testML, will the first and only the first
mailet be processed? Or will both be?
Thanks
Giulio
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Mailet order
Posted by Stefano Bagnara <ap...@bago.org>.
Giulio Troccoli wrote:
> Thanks Stefano.
>
> However, the documentation hasn't got anything about
> CommandListservProcessor, which is the one I'm interested in.
CommandListservProcessor processes messages intended for the list serv
mailing list.
For command handling, see CommandListservManager
This class is based on the existing list serv processor shipped with James.
To configure the CommandListservProcessor place this configuratin in the
root processor:
<mailet match="RecipientIs=announce@localhost"
class="CommandListservProcessor">
<membersonly>false</membersonly>
<attachmentsallowed>true</attachmentsallowed>
<replytolist>true</replytolist>
<repositoryName>list-announce</repositoryName>
<subjectprefix>Announce</subjectprefix>
<autobracket>true</autobracket>
<listOwner>owner@localhost</listOwner>
<listName>announce</listName>
<addFooter>true</addFooter>
</mailet>
CommandListservManager info:
CommandListservManager is the default implementation of {@link
ICommandListservManager}.
It loads all the configured {@link IListServCommand}s and delegates to
them at runtime.
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...
Requests sent to the CommandListservManager take the form of:
<listName>-<commandName>@domain
If the command isn't recognized an error will be sent using onError.
The configuration for this mailet sould be in the 'root' processor block.
<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>
> There is another thing. I am using James 2.2.0 and from the
> documentation it looks like the CommandListserv stuff was introduced
> with James 2.3.0. So is it the documentation wrong, or did I somehow
> added some 2.3 functionality to 2.3?
It was added in 2.2.0: no improvements have been done in 2.3.0, but we
are slow updating docs, so in the docs it only appeared in 2.3.0, and it
is still incomplete.
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Mailet order
Posted by Giulio Troccoli <gi...@troccoli.it>.
Thanks Stefano.
It looks like I can't do exactly what I want to, but I will create a nother
thread about it, so that it will be easier for another James's user to
search for it.
Giulio
----- Original Message -----
From: "Stefano Bagnara" <ap...@bago.org>
To: "James Users List" <se...@james.apache.org>
Sent: Sunday, October 29, 2006 12:03 PM
Subject: Re: Mailet order
> Giulio Troccoli wrote:
>> Thanks Stefano.
>>
>> However, the documentation hasn't got anything about
>> CommandListservProcessor, which is the one I'm interested in.
>
> Maybe you can find further informations in our javadocs:
> http://james.apache.org/server/2.3.0/apidocs/org/apache/james/transport/mailets/package-tree.html
> http://james.apache.org/server/2.3.0/apidocs/org/apache/james/transport/matchers/package-tree.html
>
> Stefano
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Mailet order
Posted by Stefano Bagnara <ap...@bago.org>.
Giulio Troccoli wrote:
> Thanks Stefano.
>
> However, the documentation hasn't got anything about
> CommandListservProcessor, which is the one I'm interested in.
Maybe you can find further informations in our javadocs:
http://james.apache.org/server/2.3.0/apidocs/org/apache/james/transport/mailets/package-tree.html
http://james.apache.org/server/2.3.0/apidocs/org/apache/james/transport/matchers/package-tree.html
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Mailet order
Posted by Giulio Troccoli <gi...@troccoli.it>.
Thanks Stefano.
However, the documentation hasn't got anything about
CommandListservProcessor, which is the one I'm interested in.
There is another thing. I am using James 2.2.0 and from the documentation it
looks like the CommandListserv stuff was introduced with James 2.3.0. So is
it the documentation wrong, or did I somehow added some 2.3 functionality to
2.3?
----- Original Message -----
From: "Stefano Bagnara" <ap...@bago.org>
To: "James Users List" <se...@james.apache.org>
Sent: Sunday, October 29, 2006 11:26 AM
Subject: Re: Mailet order
> It is a pipeline.
>
> If the matcher matches the corresponding mailet is executed.
> The flow depends on what the Mailet does: the mailet could consume the
> mail (set state to GHOST), or it could move the mail to another processor
> (set state to the processor name), or it could let the mail to pass
> through (leave the state as is).
>
> So in case of no-match, or the mailet do not consume/move the mail the
> following matcher is tested.
>
> Some mailet have a <passThrough> option to decide wether the mail should
> be consumed or not, others have hardcoded behaviour that should be clear
> reading the docs:
> http://james.apache.org/server/2.3.0/provided_mailets.html
>
> Stefano
>
> Giulio Troccoli wrote:
>> Hi everybody,
>>
>> Is there an order how the mailet are "executed"? Does James process the
>> email for the first mailet that "matches" or for all the mailets that
>> "matches"?
>>
>> Here is an example.
>>
>> <mailet match="SenderIs=webmaster@localhost"
>> class="CommandListservProcessor">
>> ...
>>
>> <mailet match="RecipientIs=testML@localhost"
>> class="CommandListservProcessor">
>>
>> ...
>>
>> If webmaster sends an email to testML, will the first and only the first
>> mailet be processed? Or will both be?
>>
>> Thanks
>> Giulio
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Mailet order
Posted by Stefano Bagnara <ap...@bago.org>.
It is a pipeline.
If the matcher matches the corresponding mailet is executed.
The flow depends on what the Mailet does: the mailet could consume the
mail (set state to GHOST), or it could move the mail to another
processor (set state to the processor name), or it could let the mail to
pass through (leave the state as is).
So in case of no-match, or the mailet do not consume/move the mail the
following matcher is tested.
Some mailet have a <passThrough> option to decide wether the mail should
be consumed or not, others have hardcoded behaviour that should be clear
reading the docs:
http://james.apache.org/server/2.3.0/provided_mailets.html
Stefano
Giulio Troccoli wrote:
> Hi everybody,
>
> Is there an order how the mailet are "executed"? Does James process the
> email for the first mailet that "matches" or for all the mailets that
> "matches"?
>
> Here is an example.
>
> <mailet match="SenderIs=webmaster@localhost"
> class="CommandListservProcessor">
> ...
>
> <mailet match="RecipientIs=testML@localhost"
> class="CommandListservProcessor">
>
> ...
>
> If webmaster sends an email to testML, will the first and only the first
> mailet be processed? Or will both be?
>
> Thanks
> Giulio
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org