<li>on Debian/Ubuntu, it's <code>/opt/www/iredadmin/settings.py</code> (in recent iRedMail releases) or <code>/usr/share/apache2/iredadmin/settings.py</code> (in old iRedMail releases).</li>
<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>
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/domains</code><codeclass="comment">Get profiles of all managed mail domains</code><codeclass="has_params">Parameters</code></p>
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/domain/<domain></code><codeclass="comment">Get profile of an existing domain</code></p>
<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>
<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>
<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. Defaults to keep forever.</code></p>
<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>
<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>
<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>
<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>
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/admin/<mail></code><codeclass="comment">Get profile of an existing domain admin</code></p>
<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>
<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>
<pclass="admonition-title"><codeclass="delete">DELETE</code><codeclass="url">/api/admin/<mail></code><codeclass="comment">Delete an existing domain admin</code></p>
<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>
<p>Below parameters are used by normal domain admin (<code>isGlobalAdmin=no</code>). With <code>isGlobalAdmin=yes</code>, these parameters will be discarded.</p>
<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>
<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>
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/user/<mail></code><codeclass="comment">Get profile of an existing mail user</code></p>
<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>
<pclass="admonition-title"><codeclass="delete">DELETE</code><codeclass="url">/api/user/<mail></code><codeclass="comment">Delete an existing mail user</code></p>
<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 keep forever.</code></p>
<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>
<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. Conflicts with parameter <code>addAlias</code> and <code>removeAlias</code>.</td>
<td>Reset per-user enabled mail services to given values. Conflicts with parameter <code>addService</code> and <code>removeService</code>. See additional notes below.</td>
<td>Add new per-user enabled mail service(s). Multiple values must be separated by comma. Conflicts with parameter <code>services</code>. See additional notes below.</td>
<td><code>addService=vpn,owncloud</code></td>
</tr>
<tr>
<td><code>removeService</code></td>
<td>Add new per-user enabled mail service(s). Multiple values must be separated by comma. Conflicts with parameter <code>services</code>. See additional notes below.</td>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<pclass="admonition-title"><codeclass="delete">DELETE</code><codeclass="url">/api/spampolicy/global</code><codeclass="comment">Delete global spam policy</code></p>
<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>
<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>
<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>
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/greylisting/all</code><codeclass="comment">Get all existing greylisting settings</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/greylisting/global</code><codeclass="comment">Get global greylisting setting</code></p>
<pclass="admonition-title"><codeclass="post">POST</code><codeclass="url">/api/greylisting/global</code><codeclass="comment">Set global greylisting setting</code><codeclass="has_params_greylisting">Parameters</code></p>
<pclass="admonition-title"><codeclass="delete">DELETE</code><codeclass="url">/api/greylisting/global</code><codeclass="comment">Delete global greylisting setting</code></p>
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/greylisting/global/whitelists</code><codeclass="comment">Get globally whitelisted senders for greylisting service</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/greylisting/<domain>/whitelists</code><codeclass="comment">Get whitelisted senders for greylisting service for specified domain</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/greylisting/<mail>/whitelists</code><codeclass="comment">Get whitelisted senders for greylisting service for specified user</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="post">POST</code><codeclass="url">/api/greylisting/global/whitelists</code><codeclass="comment">Whitelist senders for greylisting service globally</code><codeclass="has_params_greylisting_whitelists">Parameters</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="post">POST</code><codeclass="url">/api/greylisting/<domain>/whitelists</code><codeclass="comment">Whitelist senders for greylisting service for specified domain</code><codeclass="has_params_greylisting_whitelists">Parameters</code></p>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="post">POST</code><codeclass="url">/api/greylisting/<mail>/whitelists</code><codeclass="comment">Whitelist senders for greylisting services for specified user</code><codeclass="has_params_greylisting_whitelists">Parameters</code></p>
<divclass="params params_greylisting_whitelists">
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>senders</code></td>
<td>Reset whitelisted senders for global greylisting service to given senders. Multiple addresses must be separated by comma. Conflicts with parameter <code>addSenders</code> and <code>removeSenders</code>.</td>
<td>Whitelist new senders for greylisting service globally. Multiple addresses must be separated by comma. Conflicts with parameter <code>senders</code>.</td>
<td>Remove existing whitelisted senders for greylisting service globally. Multiple addresses must be separated by comma. Conflicts with parameter <code>senders</code>.</td>
<pclass="admonition-title"><codeclass="post">POST</code><codeclass="url">/api/greylisting/whitelist_spf_domains</code><codeclass="comment">Whitelist IP addresses and networks listed in SPF/MX DNS record of given sender domains for greylisting service globally</code><codeclass="has_params">Parameters</code></p>
<divclass="params">
<p>Given sender domain names are not used directly while checking whitelisting, instead, there's a cron job to query SPF and MX DNS records of given sender domains, then whitelist the IP addresses/networks listed in DNS records.</p>
<p>Multiple domains must be separated by comma.</p>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Summary</th>
<th>Sample Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>domains</code></td>
<td>Reset whitelisted sender domains for global greylisting service to given sender domains. Conflicts with parameters <code>addDomains</code> and <code>removeDomains</code>.</td>
<code>query_dns_immediately</code> | Query SPF/MX/A DNS records of given sender domains immediately, and whitelist returned IP/networks | <code>query_dns_immediately=yes</code>
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/ldif/domain/<domain></code><codeclass="comment">Export domain to LDIF</code></p>
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/ldif/user/<mail></code><codeclass="comment">Export mail user to LDIF</code></p>
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/ldif/maillist/<mail></code><codeclass="comment">Export mailing list account to LDIF</code></p>
<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://bitbucket.org/zhb/iredmail-docs/src">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://bitbucket.org/zhb/iredmail-docs/get/tip.tar.bz2">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>