Hi Jason,

Reading your 'mailetcontainer.xml' file, you trigger an infinite loop.
Every time you receive an email, you 'resend it to yourself and forward it'.

I'd try to:
 - Only forward it to the GMail address
 - Set the passthrough option to 'true': this enable the mail processing
to proceed and thus local deliver the mail.

----------------

Regarding RRT, this component is enabled by default. However CLI (only
way to configure RRT with James Spring App) does not allow setting
**Forward mappings** (allowing to forward while keeping a local copy).
Thus I do not think this could be a solution for your issue (this could
be a simpler solution for James Guice product).

Cheers,

Benoit

On 09/08/2019 18:40, Jason Tjankilisan wrote:
> Hiya,
> 
> I wanted to make some forwarding function, in example when my user email in 
> james received a mail, it will be also forwarded to my gmail account. I try 
> to experiment by trying the Resend, Forward mailet, but nothing seem to be 
> working. Still trying to figure out where to put it.
> MailetContainer.xml : 
> https://github.com/JasonTjankilisan/James-3.3.0-setup_tutorial/blob/Branch/debug/mailetcontainer.xml
> 
> I try creating a custom mailet to change the mail recipient forcefully, but 
> as I expected it create some kind of infinite loop error probably because 
> James detect something is changing in the middle of sending. I put this 
> mailet on the very top of the root process, probably that;s cause the 
> infinite loop, still trying to find where to put the mailet for it to take 
> changes (Basically it get the mail recipient, detecting a unique email 
> address in the recipient, adding the gmail recipient inside the collection 
> and setting it back to mail)
> https://github.com/JasonTjankilisan/James-3.3.0-setup_tutorial/blob/Branch/debug/ForwardMail.java
> 
> I also try using the mappings on james-cli.sh but it didn’t seem to forward 
> the mail to my gmail account.
> Link : https://james.apache.org/server/manage-cli.html#Managing_mappings
> The command I just should just be correct :
> sudo bash james-cli.sh AddUserMapping P1 sub.example.com te...@gmail.com
> 
> I try doing the recipientrewriteemail.xml also, but I have no idea how to use 
> it since if I uncomment the XML version, its seems to throw some error.
> https://svn.apache.org/repos/infra/websites/staging/james/trunk/content/server/3/config-recipientrewritetable.html
> 
> (sadly I would include the James log file error, but the list become so big 
> that that the scp download keep failing, its over 10000 line of error)
> 
> is there something im doing wrong, or is there other way to forward email?
> 
> Thank you.
> Sincerely, Jason
> 
> Sent from Mail for Windows 10
> 
> 

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