Use -v in curl to see the results. the command to add a domain is rather:
curl -XPUT http://127.0.0.1:8000/domainMappings/destination.com -d 'source.com' -v -- Best regards, Benoit TELLIER General manager of Linagora VIETNAM. Product owner for Team-Mail product. Chairman of the Apache James project. Mail: btell...@linagora.com Tel: (0033) 6 77 26 04 58 (WhatsApp, Signal) On Feb 18, 2025 5:27 PM, from Søren Hjarlvig <s...@bluewhale.dk>Thanks – It seems the AddDomainMapping command is not available in James 3.8.2, but I managed to add the mapping using the REST API: curl http://127.0.0.1:8000/domainMappings/original.domain --upload-file another.domain.txt Curiously, domainMappings report an empty list even if the new maping is working fine. A bug perhaps? curl -XGET http://127.0.0.1:8000/domainMappings {} Btw. perhaps someone could consider removing the obsolete documentation? 😉 Best regards Soeren Fra: Benoit TELLIER <btell...@linagora.com> Sendt: 18. februar 2025 11:46 Til: server-user@james.apache.org; Søren Hjarlvig <s...@bluewhale.dk> Emne: Re: Recipient rewriting Have a look at domain mappings james.staged.apache.org/james-project/3.9.0/servers/distributed/operate/cli.html#_managing_mappings -- Best regards, Benoit TELLIER General manager of Linagora VIETNAM<linagora.vn>. Product owner for Team-Mail<github.com/linagora/tmail-flutter> product. Chairman of the Apache James project<james.apache.org/>. Mail: btell...@linagora.com<btell...@linagora.com> Tel: (0033) 6 77 26 04 58 (WhatsApp, Signal) On Feb 18, 2025 11:38 AM, from Søren Hjarlvig <s...@bluewhale.dk<s...@bluewhale.dk>> Hi all, I'm wondering about the simplest approach for doing recipient domain rewriting. I just need to change a single recipient domain to another domain. According to the documentation (james.apache.org/server/3/config-recipientrewritetable.html<james.apache.org/server/3/config-recipientrewritetable.html>) this could be accomplished by adding a mapping element and adding the class attribute to recipientrewritetable element (class="org.apache.james.rrt.xml.XMLRecipientRewriteTable"<org.apache.james.rrt.xml.XMLRecipientRewriteTable>) in the recipientwritetable.xml<recipientwritetable.xml> configurationfile. I'm guessing the class should be "org.apache.james.rrt.file.XMLRecipientRewriteTable"<org.apache.james.rrt.file.XMLRecipientRewriteTable> since there is no "org.apache.james.rrt.xml.XMLRecipientRewriteTable":<org.apache.james.rrt.xml.XMLRecipientRewriteTable> <recipientrewritetable class="org.apache.james.rrt.file.XMLRecipientRewriteTable"<org.apache.james.rrt.file.XMLRecipientRewriteTable>> <recursiveMapping>true</recursiveMapping> <mappingLimit>10</mappingLimit> <mapping>@original.domain=@another.domain</mapping> </recipientrewritetable> However, it does not to seem work. Am I missing something ? Best regards Soeren