Hi Bernd, thanks for the reply.

I used Thunderbird to send the mail. as for your concern about splitting email, I've acquired SMTP log of Thunderbird so I can check it.

I've confirmed that it sent two "RCPT TO" message to James sequentially, in one SMTP session. I've pasted the log to gist (actual email addresses or domains are replaced):

https://gist.github.com/lbtc-xxx/b6f2b94fe90ee187df9c

And relevant part of James log:

https://gist.github.com/lbtc-xxx/ab19bb22c2071086d7c0

Still I'm not sure why it hasn't arrived to k...@example.org as well as kyle-c...@example.org. Note that it works as I expected in other cases where recipient of mail is only k...@example.org.

How can I turn verbose logging mail recipients before and after mailet on?

Kohei

On 2/11/16 16:51, Bernd Waibel wrote:
Hello Kohei,

I am not sure how you are "sending" mails, do you do this with a mail client like 
outlook, or using "telnet?".

I am asking because your sending mail server or mail client may split mails, if 
they go to different recipients. Also james may do this.
If you send one mail to "a...@firstdomain.de" and "a...@seconddomain.de", this two domains could be 
handled by two different mailservers. So the sending server may clone the mail, and send the first to the mailserver 
handling "firstdomain.de" and the second to "seconddomain.de". So two mails may exist (with nearly 
same body, but different envelopes).

Both mails will have different mail envelopes:
The "to" header inside the mail body does list both recipients.
The "to" header inside the mail envelope does only list one of the two 
recipients.

If you configured james to handle both mails, and have set up the mx records 
also, there may arrive two mails.
It is possible, depending on sending, that one mail will arrive which has to be 
split. Not sure.

Also consider the following:
If you forward a mail, a new "mail object" is created. This new mail will 
completely be handled again by your matchers.
It will arrive as new mail in james.

Try logging the mail recipients of every handled mail before and after the 
mailet.


Greetings,
Bernd

-----Ursprüngliche Nachricht-----
Von: Kohei Nozaki [mailto:k...@bridge9.sakura.ne.jp]
Gesendet: Donnerstag, 11. Februar 2016 06:47
An: James Users List <server-user@james.apache.org>
Betreff: Re: How to forward email, but left a copy in original address?

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=k...@example.org" class="Forward">
   <forwardTo>kyle-c...@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
   - k...@example.org
   - kyle-c...@example.org
* example.jp: NOT managed by James
   - k...@example.jp

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

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

Anyone know why the email hasn't arrived to k...@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,

* f...@example.com
* b...@example.com

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

How can I configure James to achieve this?

Thanks.

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


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


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



---------------------------------------------------------------------
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