Hi gordon,

You can achieve this by a simple address rewrite:

 - Have the RecipientRewriteTable configured in mailetcontainer.xml
 - Use the CLI to rewrite mails for m...@yahoo.com to m...@hotmail.com

The default conbfiguration should do this out of the box, and you will
end up with a more dynamic and flexible solution.

We may need to write a tutorial about address redirection.

Cheers,

Benoit

On 29/10/2019 00:38, Mark Gordon wrote:
> I looked into this some more.  It appears that the Rewrite mailet may do
> what I need.  I am having some trouble figuring out how to make it work.
> 
> I have tried adding  the xml below in the root processor after the
> PostmasterAlias  and also i the transport processor before RemoteDelivery
> I added <debug>true</debug>  I see the mailet getting loaded showing my
> matcher..... but it does not seem to be running with the inbound email.
> Sorry I am such a noob.... what am I missing?
> 
> Thanks,
> Mark
> 
> <mailet match="RecipientIs=m...@yahoo.com" class="Redirect">
>     <debug>true</debug>
>     <recipients>m...@hotmail.com</recipients>
>     <sender>unaltered</sender>
>     <inline>unaltered</inline>
>     <passThrough>FALSE</passThrough>
>     <replyTo>unaltered</replyTo>
>     <static>FALSE</static>
>  </mailet>
> 
> 
> On Mon, Oct 28, 2019 at 8:32 AM Mark Gordon <m...@ordertech.com> wrote:
> 
>>
>> One of the reasons I choose Apache James was because of the mailet api.
>> Looks like a powerful way to process email.
>> With that said, I am wondering if there is an existing  maillet that will
>> do the first thing I am trying to do.
>>
>> If an email comes in for b...@mail.bob.com i would like to not relay to
>> b...@mail.bob.com but relay to b...@bob.com.   So basically change the
>> domain name of the to address.
>>
>> Thanks in advance for any assistance.
>>
>> -Mark
>>
>> --
>> Mark Gordon <m...@ordertech.com>
>>
>> OrderTech Corporation | 819 W Fairmont Dr Ste 2 | Tempe, AZ 85282
>>
>> *o:* (480) 285-1403 <4802851403> | *f:* (480) 464-5824 <4804645824> | *m:*
>>  (602) 549-0488 <6025490488>
>>
>> www.ordertech.com
>>
>> LinkedIn <http://www.linkedin.com/company/ordertech-corp> | Twitter
>> <https://twitter.com/OrderTech> | Facebook
>> <https://www.facebook.com/OrderTech>
>>
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org
For additional commands, e-mail: server-user-h...@james.apache.org

Reply via email to