<p>To restrict API access to few IP addresses, please also add settings below in
iRedAdmin-Pro config file:</p>
<pre><code># Enable restriction
RESTRICT_API_ACCESS = True
# List all IP addresses of allowed client for API access.
RESTFUL_API_CLIENTS = ['172.16.244.1', ...]
</code></pre>
<p>Restarting Apache or uwsgi (if you're running Nginx) is required.</p>
<h2id="sample-code-to-interact-with-iredadmin-pro-restful-api">Sample code to interact with iRedAdmin-Pro RESTful API</h2>
<ul>
<li><ahref="./iredadmin-pro.restful.api.curl.html">iRedAdmin-Pro RESTful API (interact with <code>curl</code>)</a></li>
<li><ahref="./iredadmin-pro.restful.api.python.html">iRedAdmin-Pro RESTful API (interact with Python)</a></li>
</ul>
<h2id="apis">APIs</h2>
<p>Notes:</p>
<ul>
<li>Parameter name with a <code>*</code> mark means the parameter is required, otherwise is optional.</li>
<li><strong>Parameter names are cAsE-sensitive.</strong></li>
<li>replace <code><domain></code> in URL by the real domain name. e.g. <code>example.com</code></li>
<li>replace <code><mail></code> in URL by the real email address. e.g. <code>user@domain.com</code></li>
<li>replace <code><number></code> in URL by an integer number. e.g. <code>30</code>, <code>200</code></li>
</ul>
<p><buttontype="button"class="toggle_all">Expand/Collapse All API Parameters</button></p>
<h3class="toggle"id="login">Login</h3>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="post">POST</code><codeclass="url">/api/login</code><codeclass="comment">Login with an admin username (full email address) and password</code><codeclass="has_params">Parameters</code></p>
<divclass="params params_domain">
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>username</code></td>
<td>Admin username. Must be a full email address.</td>
<td><code>username=admin@mydomain.com</code></td>
</tr>
<tr>
<td><code>password</code></td>
<td>(Plain) admin password.</td>
<td><code>password=AsTr0ng@</code></td>
</tr>
</tbody>
</table>
</div>
</div>
<h3class="toggle"id="domain">Domain</h3>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/domain/<domain></code><codeclass="comment">Get profile of an existing domain</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="post">POST</code><codeclass="url">/api/domain/<domain></code><codeclass="comment">Create a new domain</code><codeclass="has_params">Parameters</code></p>
<divclass="params params_domain">
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>name</code></td>
<td>Short description of this domain name. e.g. company name</td>
<td><code>name=Google Inc</code></td>
</tr>
<tr>
<td><code>quota</code></td>
<td>Per-domain mailbox quota, in MB.</td>
<td><code>quota=2048</code></td>
</tr>
<tr>
<td><code>language</code></td>
<td>Default preferred language for newly created mail user</td>
<td><code>language=en_US</code></td>
</tr>
<tr>
<td><code>transport</code></td>
<td>Transport program</td>
<td><code>transport=dovecot</code></td>
</tr>
<tr>
<td><code>defaultQuota</code></td>
<td>Default per-user mailbox quota for newly created user, in MB.</td>
<td><code>defaultQuota=1024</code></td>
</tr>
<tr>
<td><code>maxUserQuota</code></td>
<td>Max mailbox quota of a mail user, in MB.</td>
<td><code>maxUserQuota=2048</code></td>
</tr>
<tr>
<td><code>numberOfUsers</code></td>
<td>Max number of mail user accounts</td>
<td><code>numberOfUsers=20</code></td>
</tr>
<tr>
<td><code>numberOfAliases</code></td>
<td>Max number of mail alias accounts</td>
<td><code>numberOfAliases=30</code></td>
</tr>
<tr>
<td><code>numberOfLists</code></td>
<td>Max number of mailing list accounts (Available in LDAP backends)</td>
<pclass="admonition-title"><codeclass="delete">DELETE</code><codeclass="url">/api/domain/<domain></code><codeclass="comment">Delete an existing domain (all mail messages will NOT be removed)</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="delete">DELETE</code><codeclass="url">/api/domain/<domain>/keep_mailbox_days/<number></code><codeclass="comment">Delete domain, and keep all mail messages for given days</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="put">PUT</code><codeclass="url">/api/domain/<domain></code><codeclass="comment">Update profile of an existing domain</code><codeclass="has_params">Parameters</code></p>
<divclass="params params_domain">
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>name</code></td>
<td>Short description of this domain name. e.g. company name</td>
<td><code>name=Google Inc</code></td>
</tr>
<tr>
<td><code>accountStatus</code></td>
<td>Enable or disable domain. Possible values: <code>active</code>, <code>disabled</code>.</td>
<td><code>accountStatus=active</code></td>
</tr>
<tr>
<td><code>quota</code></td>
<td>Mailbox quota for whole domain, in MB.</td>
<td><code>quota=2048</code></td>
</tr>
<tr>
<td><code>language</code></td>
<td>Default preferred language for newly created mail user</td>
<td><code>language=en_US</code></td>
</tr>
<tr>
<td><code>transport</code></td>
<td>Transport program</td>
<td><code>transport=dovecot</code></td>
</tr>
<tr>
<td><code>minPasswordLength</code></td>
<td>Minimal password length</td>
<td><code>minPasswordLength=8</code></td>
</tr>
<tr>
<td><code>maxPasswordLength</code></td>
<td>Maximum password length</td>
<td><code>minPasswordLength=20</code></td>
</tr>
<tr>
<td><code>defaultQuota</code></td>
<td>Default per-user mailbox quota for newly created user</td>
<td>Hostname or IP address of primary MX, smtp port number is optional. Must be used with parameter <code>is_backupmx</code>. Conflicts with parameter <code>transport</code>.</td>
<td>Per-domain catch-all account (a list of email addresses used to receive emails sent to non-existing addresses under same domain). Multiple addresses must be separated by comma. Set an empty value to disable catch-all support.</td>
<td><code>catchall=user@domain.com,user2@domain.com</code> or <code>catchall=</code> (disable catch-all)</td>
</tr>
<tr>
<td><code>outboundRelay</code></td>
<td>Per-domain outbound relay. Set an empty value to disable outbound relay.</td>
<td><code>outboundRelay=smtp:[192.168.1.2]:25</code> or <code>outboundRelay=</code> (disable outbound relay)</td>
</tr>
<tr>
<td><code>enableService</code></td>
<td>Enable new services. Multiple services must be separated by comma. Available services are listed below.</td>
<td><code>enableService=self-service</code></td>
</tr>
<tr>
<td><code>disableService</code></td>
<td>Disable existing services. Multiple services must be separated by comma. Available services are listed below.</td>
<td><code>disableService=self-service</code></td>
</tr>
<tr>
<td><code>removeAllServices</code></td>
<td>Disable all services (including mail service)</td>
<td>disable given domain profiles. Normal admin cannot view and update disabled profiles in domain profile page. Available domain profiles are listed below.</td>
<td>enable given domain profiles. Normal admin can view and update disabled profiles in domain profile page. Available domain profiles are listed below.</td>
<td>disable given user profiles. Normal admin cannot view and update disabled profiles in user profile page. Available user profiles are listed below.</td>
<td>enable given domain profiles. Normal admin can view and update disabled profiles in user profile page. Available user profiles are listed below.</td>
<td>disable given user preferences in self-service page. Normal mail user cannot view and update disabled preferences. Available user preferences are listed below.</td>
<td>disable given user preferences in self-service page. Normal mail user can view and update disabled preferences. Available user preferences are listed below.</td>
<td>Per-domain inbound relay and outbound relay</td>
</tr>
<tr>
<td>catchall</td>
<td>Per-domain catchall account</td>
</tr>
<tr>
<td>aliases</td>
<td>Alias domains</td>
</tr>
<tr>
<td>throttle</td>
<td>Per-domain inbound and outbound throttling</td>
</tr>
<tr>
<td>greylisting</td>
<td>Per-domain greylisting service</td>
</tr>
<tr>
<td>wblist</td>
<td>Per-domain whitelists and blacklists</td>
</tr>
<tr>
<td>spampolicy</td>
<td>Per-domain spam policy</td>
</tr>
<tr>
<td>backupmx</td>
<td>Backup MX</td>
</tr>
<tr>
<td>advanced</td>
<td>Some extra settings</td>
</tr>
</tbody>
</table>
<p>Available user profiles:</p>
<table>
<thead>
<tr>
<th>Profile</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>bcc</td>
<td>Per-user sender bcc and recipient bcc</td>
</tr>
<tr>
<td>forwarding</td>
<td>Per-user mail forwarding addresses</td>
</tr>
<tr>
<td>relay</td>
<td>Per-user inbound relay and outbound relay</td>
</tr>
<tr>
<td>aliases</td>
<td>Per-user alias addresses</td>
</tr>
<tr>
<td>throttle</td>
<td>Per-user inbound and outbound throttling</td>
</tr>
<tr>
<td>greylisting</td>
<td>Per-user greylisting service</td>
</tr>
<tr>
<td>wblist</td>
<td>Per-user whitelists and blacklists</td>
</tr>
<tr>
<td>spampolicy</td>
<td>Per-user spam policy</td>
</tr>
</tbody>
</table>
<p>Available user preferences (self-service):</p>
<table>
<thead>
<tr>
<th>Profile</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>personal_info</td>
<td>Name, time zone, preferred language of web UI</td>
</tr>
<tr>
<td>forwarding</td>
<td>Per-user mail forwarding addresses</td>
</tr>
<tr>
<td>wblist</td>
<td>Per-user whitelists and blacklists</td>
</tr>
<tr>
<td>quarantine</td>
<td>Manage quarantined mails</td>
</tr>
<tr>
<td>rcvd_mails</td>
<td>View basic info of received mails, and whitelist/blacklist mail sender directly.</td>
</tr>
<tr>
<td>spampolicy</td>
<td>Per-user spam policy</td>
</tr>
</tbody>
</table>
</div>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="put">PUT</code><codeclass="url">/api/domain/admins/<domain></code><codeclass="comment">Manage normal domain admins.</code><codeclass="has_params">Parameters</code></p>
<divclass="params params_domain_admins">
<divclass="admonition attention">
<pclass="admonition-title">Attention</p>
<p>Normal domain admin can only promote mail users under managed domains
to be a domain admin.</p>
</div>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>addAdmin</code></td>
<td>Add new domain admins. Multiple services must be separated by comma.</td>
<li>This is standalone domain admin account, not mail user with admin privileges.</li>
<li>Only global admin can access these APIs.</li>
</ul>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/admin/<mail></code><codeclass="comment">Get profile of an existing domain admin</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="post">POST</code><codeclass="url">/api/admin/<mail></code><codeclass="comment">Create a new domain admin</code><codeclass="has_params">Parameters</code></p>
<divclass="params params_admin">
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>name</code></td>
<td>Display name</td>
<td><code>name=My Admin Name</code></td>
</tr>
<tr>
<td><code>password</code></td>
<td>Password</td>
<td><code>password=AsTr0ng@</code></td>
</tr>
<tr>
<td><code>accountStatus</code></td>
<td>Enable or disable account. Possible values: <code>active</code>, <code>disabled</code>.</td>
<td><code>accountStatus=active</code></td>
</tr>
<tr>
<td><code>language</code></td>
<td>Preferred language of iRedAdmin web UI</td>
<td><code>language=en_US</code></td>
</tr>
<tr>
<td><code>isGlobalAdmin</code></td>
<td>Mark this admin as global admin</td>
<td><code>isGlobalAdmin=yes</code></td>
</tr>
</tbody>
</table>
<p>Below parameters are used by normal domain admin (<code>isGlobalAdmin=no</code>). With <code>isGlobalAdmin=yes</code>, these parameters will be discarded.</p>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>maxDomains</code></td>
<td>how many mail domains this admin can create</td>
<td><code>maxDomains=5</code></td>
</tr>
<tr>
<td><code>maxQuota</code></td>
<td>how much mailbox quota this admin can create. Quota is shared by all domains created/managed by this admin. Must be used with parameter <code>quotaUnit</code>. Sample: 10TB, 20GB, 100MB.</td>
<td><code>maxQuota=2</code></td>
</tr>
<tr>
<td><code>quotaUnit</code></td>
<td>Quota unit used by <code>maxQuota</code> parameter. Must be used with parameter <code>maxQuota</code>. Possible values: TB, GB, MB.</td>
<td><code>quotaUnit=TB</code></td>
</tr>
<tr>
<td><code>maxUsers</code></td>
<td>how many mail users this admin can create. It's shared by all domains created/managed by this admin.</td>
<td><code>maxUsers=100</code></td>
</tr>
<tr>
<td><code>maxAliases</code></td>
<td>how many mail aliases this admin can create. It's shared by all domains created/managed by this admin.</td>
<td><code>maxAliases=200</code></td>
</tr>
<tr>
<td><code>maxLists</code></td>
<td>how many mailing lists this admin can create. It's shared by all domains created/managed by this admin.</td>
<td><code>maxLists=300</code></td>
</tr>
</tbody>
</table>
</div>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="delete">DELETE</code><codeclass="url">/api/admin/<mail></code><codeclass="comment">Delete an existing domain admin</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="put">PUT</code><codeclass="url">/api/admin/<mail></code><codeclass="comment">Update profile of an existing domain admin</code><codeclass="has_params">Parameters</code></p>
<divclass="params params_admin">
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>name</code></td>
<td>Display name</td>
<td><code>name=My Admin Name</code></td>
</tr>
<tr>
<td><code>password</code></td>
<td>Password</td>
<td><code>password=AsTr0ng@</code></td>
</tr>
<tr>
<td><code>accountStatus</code></td>
<td>Enable or disable account. Possible values: <code>active</code>, <code>disabled</code>.</td>
<td><code>accountStatus=active</code></td>
</tr>
<tr>
<td><code>language</code></td>
<td>Preferred language of iRedAdmin web UI</td>
<td><code>language=en_US</code></td>
</tr>
<tr>
<td><code>isGlobalAdmin</code></td>
<td>Mark this admin as global admin</td>
<td><code>isGlobalAdmin=yes</code></td>
</tr>
</tbody>
</table>
<p>Below parameters are used by normal domain admin (<code>isGlobalAdmin=no</code>). With <code>isGlobalAdmin=yes</code>, these parameters will be discarded.</p>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>maxDomains</code></td>
<td>how many mail domains this admin can create</td>
<td><code>maxDomains=5</code></td>
</tr>
<tr>
<td><code>maxQuota</code></td>
<td>how much mailbox quota this admin can create. Quota is shared by all domains created/managed by this admin. Must be used with parameter <code>quotaUnit</code>. Sample: 10TB, 20GB, 100MB.</td>
<td><code>maxQuota=2</code></td>
</tr>
<tr>
<td><code>quotaUnit</code></td>
<td>Quota unit used by <code>maxQuota</code> parameter. Must be used with parameter <code>maxQuota</code>. Possible values: TB, GB, MB.</td>
<td><code>quotaUnit=TB</code></td>
</tr>
<tr>
<td><code>maxUsers</code></td>
<td>how many mail users this admin can create. It's shared by all domains created/managed by this admin.</td>
<td><code>maxUsers=100</code></td>
</tr>
<tr>
<td><code>maxAliases</code></td>
<td>how many mail aliases this admin can create. It's shared by all domains created/managed by this admin.</td>
<td><code>maxAliases=200</code></td>
</tr>
<tr>
<td><code>maxLists</code></td>
<td>how many mailing lists this admin can create. It's shared by all domains created/managed by this admin.</td>
<td><code>maxLists=300</code></td>
</tr>
</tbody>
</table>
</div>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="post">POST</code><codeclass="url">/api/verify_password/admin/<mail></code><codeclass="comment">Verify given (plain) password against the one stored in SQL/LDAP</code><codeclass="has_params">Parameters</code></p>
<divclass="params params_admin">
<divclass="admonition attention">
<pclass="admonition-title">Attention</p>
<p>Password verification is limited to global domain admin.</p>
</div>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>password</code></td>
<td>Plain password</td>
<td><code>password=u0tBF82cIV@vi8Gme</code></td>
</tr>
</tbody>
</table>
</div>
</div>
<h3class="toggle"id="mail-user">Mail User</h3>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/user/<mail></code><codeclass="comment">Get profile of an existing mail user</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="post">POST</code><codeclass="url">/api/user/<mail></code><codeclass="comment">Create a new mail user</code><codeclass="has_params">Parameters</code></p>
<divclass="params params_user">
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>name</code></td>
<td>Display name</td>
<td><code>name=My New Name</code></td>
</tr>
<tr>
<td><code>password</code></td>
<td>Password</td>
<td><code>password=AsTr0ng@</code></td>
</tr>
<tr>
<td><code>language</code></td>
<td>Preferred language of iRedAdmin web UI</td>
<td><code>language=en_US</code></td>
</tr>
<tr>
<td><code>quota</code></td>
<td>Mailbox quota (in MB)</td>
<td><code>quota=1024</code></td>
</tr>
</tbody>
</table>
</div>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="delete">DELETE</code><codeclass="url">/api/user/<mail></code><codeclass="comment">Delete an existing mail user</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="delete">DELETE</code><codeclass="url">/api/user/<mail>/keep_mailbox_days/<number></code><codeclass="comment">Delete an existing mail user, and keep the mailbox for given days. Defaults to 100 years.</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="put">PUT</code><codeclass="url">/api/user/<mail></code><codeclass="comment">Update profile of an existing mail user</code><codeclass="has_params">Parameters</code></p>
<divclass="params params_user">
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>name</code></td>
<td>Display name</td>
<td><code>name=My New Name</code></td>
</tr>
<tr>
<td><code>password</code></td>
<td>Password</td>
<td><code>password=u0tBF82cIV@vi8Gme</code></td>
</tr>
<tr>
<td><code>quota</code></td>
<td>Mailbox quota (in MB)</td>
<td><code>quota=1024</code></td>
</tr>
<tr>
<td><code>accountStatus</code></td>
<td>Enable or disable user. Possible values: <code>active</code>, <code>disabled</code>.</td>
<td><code>accountStatus=active</code></td>
</tr>
<tr>
<td><code>language</code></td>
<td>Preferred language of iRedAdmin web UI</td>
<td><code>language=en_US</code></td>
</tr>
<tr>
<td><code>employeeid</code></td>
<td>User ID (or Employee Number)</td>
<td><code>employeeid=My Employee ID</code></td>
</tr>
<tr>
<td><code>transport</code></td>
<td>Transport program</td>
<td><code>transport=dovecot</code></td>
</tr>
<tr>
<td><code>forwarding</code></td>
<td>Per-user mail forwarding. Multiple addresses must be separated by comma. To save an email copy in mailbox, add original email address as one of forwarding addresses.</td>
<td>Per-user alias addresses. Multiple addresses must be separated by comma. If empty, all per-user alias addresses owned by this user will be removed. <strong>If given addresses exist on system before this assignment, they won't be assigned to the user.</strong> Conflicts with parameter <code>addAlias</code> and <code>removeAlias</code>.</td>
<pclass="admonition-title"><codeclass="put">POST</code><codeclass="url">/api/user/<mail>/change_email/<new_mail></code><codeclass="comment">Change user's email address (from '<mail>' to '<new_mail>')</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="put">PUT</code><codeclass="url">/api/users/<domain></code><codeclass="comment">Update profiles of all users under domain</code><codeclass="has_params">Parameters</code></p>
<divclass="params">
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>accountStatus</code></td>
<td>Account status. Possible value is: active, disabled.</td>
</tr>
<tr>
<td><code>password</code></td>
<td>Password</td>
</tr>
<tr>
<td><code>language</code></td>
<td>Preferred language of iRedAdmin web UI</td>
</tr>
<tr>
<td><code>transport</code></td>
<td>Per-user transport</td>
</tr>
</tbody>
</table>
</div>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="post">POST</code><codeclass="url">/api/verify_password/user/<mail></code><codeclass="comment">Verify given (plain) password against the one stored in SQL/LDAP</code><codeclass="has_params">Parameters</code></p>
<divclass="params params_user">
<divclass="admonition attention">
<pclass="admonition-title">Attention</p>
<p>Password verification is limited to global domain admin.</p>
<p>Mailing list is only available in OpenLDAP backend. For SQL backends,
please use mail alias account as mailing list.</p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/maillist/<mail></code><codeclass="comment">Get profile of an existing mailing list account</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="post">POST</code><codeclass="url">/api/maillist/<mail></code><codeclass="comment">Create a new mailing list</code><codeclass="has_params">Parameters</code></p>
<divclass="params">
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>name</code></td>
<td>Display name</td>
<td><code>name=My List Name</code></td>
</tr>
<tr>
<td><code>accessPolicy</code></td>
<td>Defines who can send email to this mail alias account</td>
<td><code>accessPolicy=public</code></td>
</tr>
<tr>
<td><code>members</code></td>
<td>Members of mailing list. Multiple members must be separated by comma.</td>
<pclass="admonition-title"><codeclass="delete">DELETE</code><codeclass="url">/api/maillist/<mail></code><codeclass="comment">Delete an existing mailing list</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="put">PUT</code><codeclass="url">/api/maillist/<mail></code><codeclass="comment">Update profile of an existing mailing list</code><codeclass="has_params">Parameters</code></p>
<divclass="params">
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>name</code></td>
<td>display name</td>
<td><code>name=My List Name</code></td>
</tr>
<tr>
<td><code>accessPolicy</code></td>
<td>Defines who can send email to this mailing list</td>
<td><code>accessPolicy=public</code></td>
</tr>
<tr>
<td><code>members</code></td>
<td>Members of mailing list. Multiple members must be separated by comma. Conflict with parameter <code>addMember</code> and <code>removeMember</code>.</td>
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/alias/<mail></code><codeclass="comment">Get profile of an existing mail alias</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="post">POST</code><codeclass="url">/api/alias/<mail></code><codeclass="comment">Create a new mail alias</code><codeclass="has_params">Parameters</code></p>
<divclass="params">
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>name</code></td>
<td>Display name</td>
<td><code>name=My List Name</code></td>
</tr>
<tr>
<td><code>accessPolicy</code></td>
<td>Defines who can send email to this mail alias account</td>
<td><code>accessPolicy=public</code></td>
</tr>
<tr>
<td><code>members</code></td>
<td>Members of mail alias. Multiple members must be separated by comma.</td>
<p><code>accessPolicy</code> for mail alias account is only available for SQL backends.</p>
</div>
</div>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="delete">DELETE</code><codeclass="url">/api/alias/<mail></code><codeclass="comment">Delete an existing mail alias</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="put">PUT</code><codeclass="url">/api/alias/<mail></code><codeclass="comment">Update profile of an existing mail alias</code><codeclass="has_params">Parameters</code></p>
<divclass="params">
<divclass="admonition attention">
<pclass="admonition-title">Attention</p>
<p><code>accessPolicy</code> for mail alias account is only available for SQL backends.</p>
</div>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>name</code></td>
<td>Display name</td>
<td><code>name=My List Name</code></td>
</tr>
<tr>
<td><code>accessPolicy</code></td>
<td>Defines who can send email to this mail alias account</td>
<td><code>accessPolicy=public</code></td>
</tr>
<tr>
<td><code>members</code></td>
<td>Members of mail alias. Multiple members must be separated by comma. Conflict with parameter <code>addMember</code> and <code>removeMember</code>.</td>
<pclass="admonition-title"><codeclass="put">POST</code><codeclass="url">/api/alias/<mail>/change_email/<new_mail></code><codeclass="comment">Change email address of alias account (from '<mail>' to '<new_mail>')</code></p>
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/spampolicy/global</code><codeclass="comment">Get global spam policy</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="put">PUT</code><codeclass="url">/api/spampolicy/global</code><codeclass="comment">Set global spam policy</code><codeclass="has_params_spampolicy">Parameters</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="delete">DELETE</code><codeclass="url">/api/spampolicy/global</code><codeclass="comment">Delete global spam policy</code></p>
<td>Always insert <code>X-Spam-*</code> headers in email. It contains spam score and matched SpamAssassin rules. <strong>Don't enable this unless you want to debug spam checking.</strong></td>
<td><code>always_insert_x_spam_headers=yes</code> (default is <code>no</code>)</td>
</tr>
<tr>
<td><code>spam_score</code></td>
<td>Set a preferred spam score, if scanned email has higher score than this one, it will be marked as spam.</td>
<td><code>spam_score=4</code> (defaults to use system setting defined in Amavisd config file.)</td>
</tr>
</tbody>
</table>
</div>
</div>
<h3class="toggle"id="throttling">Throttling</h3>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/throttle/global/inbound</code><codeclass="comment">Get global inbound throttle settings</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="post">POST</code><codeclass="url">/api/throttle/global/inbound</code><codeclass="comment">Set global inbound throttle settings</code><codeclass="has_params_throttle">Parameters</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/throttle/global/outbound</code><codeclass="comment">Get global outbound throttle settings</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="post">POST</code><codeclass="url">/api/throttle/global/outbound</code><codeclass="comment">Set global inbound throttle settings</code><codeclass="has_params_throttle">Parameters</code></p>
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/throttle/<mail>/inbound</code><codeclass="comment">Get user inbound throttle settings</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="post">POST</code><codeclass="url">/api/throttle/<mail>/inbound</code><codeclass="comment">Set user inbound throttle settings</code><codeclass="has_params_throttle">Parameters</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/throttle/<mail>/outbound</code><codeclass="comment">Get user outbound throttle settings</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="post">POST</code><codeclass="url">/api/throttle/<mail>/outbound</code><codeclass="comment">Set user outbound throttle settings</code><codeclass="has_params_throttle">Parameters</code></p>
<divclass="params params_throttle">
<p>Parameters available for global, per-domain, per-user throttle settings.</p>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>period</code> *</td>
<td>Period of time, in seconds</td>
<td><code>period=3600</code> (one hour)</td>
</tr>
<tr>
<td><code>msg_size</code></td>
<td>Max size of single email, in bytes</td>
<td><code>msg_size=10485760</code> (10 MB)</td>
</tr>
<tr>
<td><code>max_msgs</code></td>
<td>Number of max inbound emails</td>
<td><code>max_msgs=20</code> (up to 20 messages)</td>
</tr>
<tr>
<td><code>max_quota</code></td>
<td>Cumulative size of inbound or outbound emails, in bytes</td>
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/ldif/domain/<domain></code><codeclass="comment">Export domain to LDIF</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/ldif/catchall/<domain></code><codeclass="comment">Export per-domain catch-all account to LDIF</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/ldif/admin/<mail></code><codeclass="comment">Export (separated) domain admin to LDIF</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/ldif/user/<mail></code><codeclass="comment">Export mail user to LDIF</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/ldif/maillist/<mail></code><codeclass="comment">Export mailing list account to LDIF</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/ldif/alias/<mail></code><codeclass="comment">Export mail alias account to LDIF</code></p>
<pstyle="text-align: center; color: grey;">All documents are available in <ahref="https://github.com/iredmail/docs/">BitBucket repository</a>, and published under <ahref="http://creativecommons.org/licenses/by-nd/3.0/us/"target="_blank">Creative Commons</a> license. You can <ahref="https://github.com/iredmail/docs/archive/master.zip">download the latest version</a> for offline reading. If you found something wrong, please do <ahref="https://www.iredmail.org/contact.html">contact us</a> to fix it.</p>