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 Kohei Nozaki <ky...@bridge9.sakura.ne.jp> on 2016/02/07 08:00:22 UTC

How to forward email, but left a copy in original address?

Hello, I'm using James3 SNAPSHOT.

I want to configure James to forward copy of emails to another address
(these two addresses live in same James instance), but keep emails being
sent in original address as well.

For example, I have two following addresses in a James instance,

* foo@example.com
* bar@example.com

When someone send an email to foo@example.com, it should be arrived to
both addresses (foo@example.com and bar@example.com).

How can I configure James to achieve this?

Thanks.

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


Re: How to forward email, but left a copy in original address?

Posted by Kohei Nozaki <ky...@bridge9.sakura.ne.jp>.
I've put something like following definition to mailetcontainer.xml,
where near of commented definition of XMLRecipientRewriteTable exists,
and it works as I nearly expected:

<mailet match="RecipientIs=kyle@example.org" class="Forward">
  <forwardTo>kyle-copy@example.org</forwardTo>
  <passThrough>true</passThrough>
</mailet>

But I have an odd thing in this setup, and a question about it. my
situation:

Consider the following are my domains and holding addresses:

* example.org: managed by James
  - kyle@example.org
  - kyle-copy@example.org
* example.jp: NOT managed by James
  - kyle@example.jp

When I sent an email through James SMTP server, from kyle@example.org to
kyle@example.org (same to from), the email has been arrived to both
kyle@example.org and kyle-copy@example.org, as I expected.

But when I sent an email from kyle@example.org to two addresses
kyle@example.org and kyle@example.jp, the email has been arrived at
kyle-copy@example.org, but not to kyle@example.org.

Anyone know why the email hasn't arrived to kyle@example.org if the two
addresses are specified?

Thanks.

On 2/7/16 16:00, Kohei Nozaki wrote:
> Hello, I'm using James3 SNAPSHOT.
> 
> I want to configure James to forward copy of emails to another address
> (these two addresses live in same James instance), but keep emails being
> sent in original address as well.
> 
> For example, I have two following addresses in a James instance,
> 
> * foo@example.com
> * bar@example.com
> 
> When someone send an email to foo@example.com, it should be arrived to
> both addresses (foo@example.com and bar@example.com).
> 
> How can I configure James to achieve this?
> 
> Thanks.
> 
> ---------------------------------------------------------------------
> 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