You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Eric Charles <er...@apache.org> on 2014/08/03 09:47:19 UTC
Re: Matcher and Mailet could be invoked twice for a single mail
Hi Syin,
You don't bother us, on the contrary, you are helpful.
(Btw, text format is easier to work with on the mailing list).
I must admit I don't have an answer and I doubt about the behavior.
@Stefano Any idea on this (cfr your answer on
http://markmail.org/message/pyhd4wgyyheqmgbc)
@Norman Any input on this (as you wrote that code).
Please see the initial html mail on
https://issues.apache.org/jira/secure/attachment/12656845/2014-07-21_175109.png
Thx,
Eric
On 07/22/2014 02:29 AM, Yin, Shiwu wrote:
> Dear James Developers,
>
>
>
> Sorry to bother you, but I have a question. If a Matcher returns a
> partial match then the Matcher/Mailet will be invoked twice. Let me
> describe how it happened.
>
>
>
> 1. Configured a Matcher/Mailet pair in the “transport” processor
>
> 2. Sent a mail with multiple recipients, and assuming that the
> configured matcher will return a partial match
>
> 3. What happened?
>
> I attached a screenshot bellow that comes from the class
> org.apache.james.mailetcontainer.impl.camel.CamelMailetProcessor line
> 159~166.
>
>
>
>
>
>
>
> In the first round, there is no doubt that the state of
> the mail is “transport” and the state of the mailetProccessor is
> “transport”.
>
> Line 1, the mail is splitted and from that point we will have 2
> different mails, just let me call them matched mail and unmatched mail
> separately.
>
> Line 2, the matched mail is matched and processed, *the first call on
> Matcher/Mailet.*
>
> * *
>
> Will the matched mail be processed in*line 4? *
>
> First of all, let’s see how the matched mail be created. I attached a
> screenshot below that comes from the class
> org.apache.james.mailetcontainer.impl.camel.MatcherSplitter line 130~140.
>
> The matched mail is created from the original mail. But the matched mail
> don't inherit state from the original mail. So the state of the matched
> mail is default “root”. Obviously, this matched mail will be processed
> in line 4, which results in the matched mail be routed again and
> starting from the root processor. *It leads to the second call on
> Matcher/Mailet.*
>
>
>
> Is this a bug?
>
>
>
> Thanks
>
> Shiwu
>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org