<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[iRedMail — RESTFUL API addAlias cross domain]]></title>
		<link>https://forum.iredmail.org/topic21237-restful-api-addalias-cross-domain.html</link>
		<atom:link href="https://forum.iredmail.org/feed-rss-topic21237.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in RESTFUL API addAlias cross domain.]]></description>
		<lastBuildDate>Wed, 28 Oct 2026 07:46:31 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: RESTFUL API addAlias cross domain]]></title>
			<link>https://forum.iredmail.org/post92308.html#p92308</link>
			<description><![CDATA[<div class="quotebox"><cite>ZhangHuangbin wrote:</cite><blockquote><p>Could you please show me your full API request code to reproduce the issue? Hide sensitive info before pasting please.</p></blockquote></div><p># 1. Login<br /></p><div class="codebox"><pre><code>curl -k -c /tmp/cookie.txt -X POST https://127.0.0.1/iredadmin/api/login \
  --data-urlencode &#039;username=postmaster@example.local&#039; \
  --data-urlencode &#039;password=******&#039;; echo
  
{&quot;_success&quot;: true}</code></pre></div><p># 2a. Create domain example.com<br /></p><div class="codebox"><pre><code>curl -k -b /tmp/cookie.txt -X POST https://127.0.0.1/iredadmin/api/domain/example.com \
  --data-urlencode &#039;name=example.com&#039; \
  --data-urlencode &#039;quota=0&#039;; echo
  
{&quot;_success&quot;: true}</code></pre></div><p># 2b. Create domain example.net<br /></p><div class="codebox"><pre><code>curl -k -b /tmp/cookie.txt -X POST https://127.0.0.1/iredadmin/api/domain/example.net \
  --data-urlencode &#039;name=example.net&#039; \
  --data-urlencode &#039;quota=0&#039;; echo
  
{&quot;_success&quot;: true}</code></pre></div><p># 3. Create user user@example.com<br /></p><div class="codebox"><pre><code>curl -k -b /tmp/cookie.txt -X POST https://127.0.0.1/iredadmin/api/user/user@example.com \
  --data-urlencode &#039;name=user&#039; \
  --data-urlencode &#039;password=Test@12345678&#039; \
  --data-urlencode &#039;quota=1024&#039;; echo
  
{&quot;_success&quot;: true}</code></pre></div><p># 4. Add cross-domain alias<br /></p><div class="codebox"><pre><code>curl -k -b /tmp/cookie.txt -X PUT https://127.0.0.1/iredadmin/api/user/user@example.com \
  --data-urlencode &#039;addAlias=cross@example.net&#039;; echo
  
{&quot;_success&quot;: true}</code></pre></div><p># 5. Get user details, show only username and aliases<br /></p><div class="codebox"><pre><code>curl -k -s -b /tmp/cookie.txt https://127.0.0.1/iredadmin/api/user/user@example.com | jq &#039;{username: ._data.username, aliases: ._data.aliases}&#039;; echo

{
  &quot;username&quot;: &quot;user@example.com&quot;,
  &quot;aliases&quot;: []
}</code></pre></div><p># 6a. add alias for user@example.com from the iredadmin web manually</p><p># 6b. Get user details, show only username and aliases, after adding manually from iredadmin<br /></p><div class="codebox"><pre><code>curl -k -s -b /tmp/cookie.txt https://127.0.0.1/iredadmin/api/user/user@example.com | jq &#039;{username: ._data.username, aliases: ._data.aliases}&#039;; echo

{
  &quot;username&quot;: &quot;user@example.com&quot;,
  &quot;aliases&quot;: [
    &quot;fromweb@example.net&quot;
  ]
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (beez)]]></author>
			<pubDate>Wed, 28 Oct 2026 07:46:31 +0000</pubDate>
			<guid>https://forum.iredmail.org/post92308.html#p92308</guid>
		</item>
		<item>
			<title><![CDATA[Re: RESTFUL API addAlias cross domain]]></title>
			<link>https://forum.iredmail.org/post92307.html#p92307</link>
			<description><![CDATA[<p>Could you please show me your full API request code to reproduce the issue? Hide sensitive info before pasting please.</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Wed, 28 Oct 2026 07:11:36 +0000</pubDate>
			<guid>https://forum.iredmail.org/post92307.html#p92307</guid>
		</item>
		<item>
			<title><![CDATA[RESTFUL API addAlias cross domain]]></title>
			<link>https://forum.iredmail.org/post92306.html#p92306</link>
			<description><![CDATA[<p>==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====<br />- iRedMail version (check /etc/iredmail-release): 1.8.4 mysql<br />- Deployed with iRedMail Easy or the downloadable installer? installer<br />- Linux/BSD distribution name and version: ubuntu 26.04<br />- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql<br />- Web server (Apache or Nginx): nginx<br />- Manage mail accounts with iRedAdmin-Pro? yes<br />- [IMPORTANT] Related original log or error message is required if you&#039;re experiencing an issue.<br />====</p><p>api : PUT /api/user/&lt;mail&gt;</p><p>Hello, seems the restful API to add mail alias is not following the setting USER_ALIAS_CROSS_ALL_DOMAINS = True</p><p>using the web admin we can add alias for mail account to different domain, but the API still dropping any different domain alias for user</p>]]></description>
			<author><![CDATA[null@example.com (beez)]]></author>
			<pubDate>Wed, 28 Oct 2026 07:07:22 +0000</pubDate>
			<guid>https://forum.iredmail.org/post92306.html#p92306</guid>
		</item>
	</channel>
</rss>
