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 Eike Kettner <ei...@gmail.com> on 2012/12/13 22:33:42 UTC

Recipient Rewrite for Local and Remote

Hi,

I'm experimenting with James 3.0-beta4 to integrate it in my app. I created a
mapping from a address like "list@local.domain" to two other addresses, where
one is a local user and the other one is a remote address.
The result is, that any mail going to list@local.domain is delivered
to the remote
address but not to the local user. If I instead use only local users
(or only remote
user), the mails are all delivered locally (or remotely) as expected.
It only does not
work if there is a mix of local and remote users.

Debugging leads me to the "handleMappings" Method in
AbstractRecipientRewriteTableMailet
(about line 150). There the recipients are sorted into two lists:
remoteRecipients and localRecipients.
If there are some remote users, the mail is sent (l. 152) and the
method exits in line 160. Therefore
the local recipients are not returned. At first thought I would return
the local recipient list in l.160, too?
But I may have very well missed something and/or completely misused
the recipient-rewrite stuff
altogether.

Thanks for any advice.

Regards,
Eike

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


Re: Recipient Rewrite for Local and Remote

Posted by Eike Kettner <ei...@gmail.com>.
Hi Eric,

thanks for your answer. I created a jira issue
(https://issues.apache.org/jira/browse/JAMES-1443) and will upload a
patch soon.

Regards,
Eike

2012/12/15 Eric Charles <er...@apache.org>:
> Hi Eike,
>
> I never used RRT with mixed local and rewrite recipients, but what you
> describe makes sense.
>
> It would be great if you could provide a patch (with unit tests). You need
> to open a JIRA and upload you file on
> https://issues.apache.org/jira/browse/JAMES
>
> Thx, Eric
>
>
> On 13/12/2012 21:33, Eike Kettner wrote:
>>
>> Hi,
>>
>> I'm experimenting with James 3.0-beta4 to integrate it in my app. I
>> created a
>> mapping from a address like "list@local.domain" to two other addresses,
>> where
>> one is a local user and the other one is a remote address.
>> The result is, that any mail going to list@local.domain is delivered
>> to the remote
>> address but not to the local user. If I instead use only local users
>> (or only remote
>> user), the mails are all delivered locally (or remotely) as expected.
>> It only does not
>> work if there is a mix of local and remote users.
>>
>> Debugging leads me to the "handleMappings" Method in
>> AbstractRecipientRewriteTableMailet
>> (about line 150). There the recipients are sorted into two lists:
>> remoteRecipients and localRecipients.
>> If there are some remote users, the mail is sent (l. 152) and the
>> method exits in line 160. Therefore
>> the local recipients are not returned. At first thought I would return
>> the local recipient list in l.160, too?
>> But I may have very well missed something and/or completely misused
>> the recipient-rewrite stuff
>> altogether.
>>
>> Thanks for any advice.
>>
>> Regards,
>> Eike
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>

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


Re: Recipient Rewrite for Local and Remote

Posted by Eric Charles <er...@apache.org>.
Hi Eike,

I never used RRT with mixed local and rewrite recipients, but what you 
describe makes sense.

It would be great if you could provide a patch (with unit tests). You 
need to open a JIRA and upload you file on 
https://issues.apache.org/jira/browse/JAMES

Thx, Eric

On 13/12/2012 21:33, Eike Kettner wrote:
> Hi,
>
> I'm experimenting with James 3.0-beta4 to integrate it in my app. I created a
> mapping from a address like "list@local.domain" to two other addresses, where
> one is a local user and the other one is a remote address.
> The result is, that any mail going to list@local.domain is delivered
> to the remote
> address but not to the local user. If I instead use only local users
> (or only remote
> user), the mails are all delivered locally (or remotely) as expected.
> It only does not
> work if there is a mix of local and remote users.
>
> Debugging leads me to the "handleMappings" Method in
> AbstractRecipientRewriteTableMailet
> (about line 150). There the recipients are sorted into two lists:
> remoteRecipients and localRecipients.
> If there are some remote users, the mail is sent (l. 152) and the
> method exits in line 160. Therefore
> the local recipients are not returned. At first thought I would return
> the local recipient list in l.160, too?
> But I may have very well missed something and/or completely misused
> the recipient-rewrite stuff
> altogether.
>
> Thanks for any advice.
>
> Regards,
> Eike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>

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