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 Mark Gordon <ma...@ordertech.com> on 2019/10/28 15:32:54 UTC
rewriting hostname when relaying email.
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 bob@mail.bob.com i would like to not relay to
bob@mail.bob.com but relay to bob@bob.com. So basically change the domain
name of the to address.
Thanks in advance for any assistance.
-Mark
--
Mark Gordon <ma...@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>
Re: rewriting hostname when relaying email.
Posted by Tellier Benoit <bt...@apache.org>.
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 mark@yahoo.com to mark@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=mark@yahoo.com" class="Redirect">
> <debug>true</debug>
> <recipients>mark@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 <ma...@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 bob@mail.bob.com i would like to not relay to
>> bob@mail.bob.com but relay to bob@bob.com. So basically change the
>> domain name of the to address.
>>
>> Thanks in advance for any assistance.
>>
>> -Mark
>>
>> --
>> Mark Gordon <ma...@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-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: rewriting hostname when relaying email.
Posted by Mark Gordon <ma...@ordertech.com>.
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=mark@yahoo.com" class="Redirect">
<debug>true</debug>
<recipients>mark@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 <ma...@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 bob@mail.bob.com i would like to not relay to
> bob@mail.bob.com but relay to bob@bob.com. So basically change the
> domain name of the to address.
>
> Thanks in advance for any assistance.
>
> -Mark
>
> --
> Mark Gordon <ma...@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>
>
--
Mark Gordon <ma...@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>