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 Stefano Bagnara <ap...@bago.org> on 2007/06/05 10:43:00 UTC
Re: FromRepository mailet takes over server?
Kent Butler ha scritto:
> I am going to attempt to answer my own questions - if someone could
> sanity check me I'd appreciate it:
>
>> * Emails sent during that period of time never showed up in
>> /var/mail/spool or in any other repository. I suppose those messages
>> are lost, yes?
>
> The service() method in
> org.apache.james.transport.mailets.FromRepository intially sets the
> incoming Mail's state to GHOST. The Bounce class does the same thing. I
> don't recall exactly but I think I saw this in the code before and it is
> a way (maybe THE way) of sending mail to /dev/null.
right.
>> * Can anyone explain why the FromRepository mailet affected normal mail
>> activity? Or was it not to blame?
>
> Based on the previous it looks like ANY incoming Mail is used merely as
> a trigger for the FromRepository class to execute. The triggering Mail
> is sacrificial and sent immediately to slaughter.
>
> While effective, this is obviously not an ideal solution and should be
> labelled appropriately. I hope this will serve as a warning to someone.
right.
> Would anyone agree that this Mailet should really be implemented as
> either a one-time initialization task only or a Command? I could see
> this being very handy as a Command since the server could remain up. I'm
> fairly new to the server so I'm just assuming these concepts exist in
> its architecture. Also I'm not set up as a developer yet.
>
>
> Please correct me if I'm wrong! Thanks -
> Kent
You should configure your processors/matcher/mailets so that this mailet
is invoked only when a specific message is sent to a specific address.
This way it would be a command. You should not place this mailet in the
mail processing chain.
e.g:
<mailet match="RecipientIs=runqueue@localhost" class="FromRepository">
...
</mailet>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org