Mailet is a good fit for this. You will have to implement your own 
mapping persistence.

On 16/07/2013 23:55, Stefan Pantke wrote:
> Hi list,
>
> for a small technical experiment, a few days ago I discovered Apache James as 
> a possibly platform.
>
> In general, my mailet should do this:
>
>       ? When sending an e-amil, map each <FORM:TO> tuple to a new unique 
> TO-addressF(<FORM:TO>) and replace FROM in the original e-amil by F(<FORM:TO>)
>       ? When receiving an e-mail, map the TO-address F(<FORM:TO>) back to the 
> original TO address and save it to its maildrop
>       ? Wehn receiving an e-mail, where F(<FORM:TO>) can't be mapped, save it 
> to a special maildrop
>
> F(.,.) is a one-to-one function between source and target values.
>
> Example: [email protected] sends an email
>
>       ? [email protected] sends an email to [email protected]
>       ? Mailet does this
>       ? ... Rewrites FROM to [email protected]
>       ? ... Associates <[email protected],[email protected]> with 
> [email protected]
>       ? ... Persists this mapping permanently
>
>
> Example: [email protected] sends an Email to John
>       ? [email protected] sends email to [email protected]
>       ? Mailet does this
>       ? ... Identifies [email protected] as valid TO address for FROM 
> address [email protected]
>       ? ... Delivers to [email protected]
>
> Example: [email protected] sends an Email to John's address assigned to 
> Allen
>       ? [email protected] sends email to [email protected]
>       ? Mailet does this
>       ? ... Fails to identify [email protected] as valid TO address for 
> FROM [email protected]
>       ? ... Rejects e-mail
>
> Does the mailet API is a good fit for this requirement? Or would such 
> operation doesn't fit (thus require code to access James' classes more or 
> less directly)?
>
> Just in case: I'm aware, that this wouldn't enforce strong security. Yet, it 
> might deflect certain email SPAM
>
>
> Kind regards
>

Reply via email to