<li>on OpenBSD, it's <code>/opt/www/iredadmin/settings.py</code> (in recent iRedMail
releases) or <code>/var/www/iredadmin/settings.py</code> (in old iRedMail releases).</li>
</ul>
</div>
<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>
<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>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/domains</code><codeclass="comment">Get profiles of all managed mail domains</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_only</code></td>
<td>Return only mail domain names</td>
<td><code>name_only=yes</code></td>
</tr>
<tr>
<td><code>disabled_only</code></td>
<td>Return only disabled mail domains</td>
<td><code>disabled_only=yes</code></td>
</tr>
</tbody>
</table>
</div>
</div>
<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. Defaults to 0 day which means keeping forever.</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>addAliasDomain</code></td>
<td>Add new alias domains. Multiple services must be separated by comma.</td>
<td>Reset all alias domains. If empty, all existing alias domains will be removed. Conflicts with parameter <code>addAliasDomain</code> and <code>removeAliasDomain</code>.</td>
<td>Enable new services. Multiple services must be separated by comma. Available services are listed below.</td>
<td><code>addService=self-service</code></td>
</tr>
<tr>
<td><code>removeService</code></td>
<td>Disable existing services. Multiple services must be separated by comma. Available services are listed below.</td>
<td><code>removeService=self-service</code></td>
</tr>
<tr>
<td><code>services</code></td>
<td>Reset all services. If empty, all existing services will be removed.</td>
<td><code>services=mail,self-service</code></td>
</tr>
<tr>
<td><code>disableDomainProfile</code></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>
<tr>
<td><code>disableViewingMailLog</code></td>
<td>Disallow this admin to view log of inbound/outbound mails.</td>
<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>
<tr>
<td><code>disableViewingMailLog</code></td>
<td>Disallow this admin to view log of inbound/outbound mails.</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>
<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>
<tr>
<td><code>mailboxFormat</code></td>
<td>Mailbox format. e.g. <code>maildir</code>, <code>mdbox</code>. Defaults to <code>maildir</code> if not present. For more details, please read Dovecot document: <ahref="https://wiki2.dovecot.org/MailboxFormat">https://wiki2.dovecot.org/MailboxFormat</a>. <strong>WARNING</strong>: Changing mailbox format does not migrate the mailbox on file system automatically, you have to migrate it manually. New email will be stored in new mailbox format immediately.</td>
<td><code>mailboxFormat=mdbox</code></td>
</tr>
<tr>
<td><code>mailboxFolder</code></td>
<td>Mailbox folder name (case sensitive) which will be appended to user's home path. Defaults to <code>Maildir</code>. It's useful if you need to migrate to different mailbox folder. <strong>WARNING</strong>: New email will be stored in new mailbox folder immediately.</td>
<td><code>mailboxFolder=Maildir</code></td>
</tr>
<tr>
<td><code>maildir</code></td>
<td>Absolute path of the mailbox. All characters will be converted to lower cases.</td>
<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 0 day which means keeping forever.</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=Michael Jordon</code></td>
</tr>
<tr>
<td><code>gn</code></td>
<td>Given name</td>
<td><code>gn=Jordon</code></td>
</tr>
<tr>
<td><code>sn</code></td>
<td>Surname</td>
<td><code>sn=Jeffery</code></td>
</tr>
<tr>
<td><code>password</code></td>
<td>Set user password to the given one.</td>
<td><code>password=u0tBF82cIV@vi8Gme</code></td>
</tr>
<tr>
<td><code>password_hash</code></td>
<td>Set user password to the given hashed password. Conflict with parameter <code>password</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>isGlobalAdmin</code></td>
<td>Promote user to be a global admin. Possible values: <code>yes</code>, <code>no</code></td>
<td><code>isGlobalAdmin=yes</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. 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>
<td>Mailbox format. e.g. <code>maildir</code>, <code>mdbox</code>. Defaults to <code>maildir</code> if not present. For more details, please read Dovecot document: <ahref="https://wiki2.dovecot.org/MailboxFormat">https://wiki2.dovecot.org/MailboxFormat</a>. <strong>WARNING</strong>: Changing mailbox format does not migrate the mailbox on file system automatically, you have to migrate it manually. New email will be stored in new mailbox format immediately.</td>
<td><code>mailboxFormat=mdbox</code></td>
</tr>
<tr>
<td><code>mailboxFolder</code></td>
<td>Mailbox folder name (case sensitive) which will be appended to user's home path. Defaults to <code>Maildir</code>. It's useful if you need to migrate to different mailbox folder. <strong>WARNING</strong>: New email will be stored in new mailbox folder immediately.</td>
<td><code>mailboxFolder=Maildir</code></td>
</tr>
<tr>
<td><code>maildir</code></td>
<td>Absolute path of the mailbox. All characters will be converted to lower cases.</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>
<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>
<li>Subscribable mailing list requires iRedMail-0.9.8 and later releases,
it's implemented with <ahref="http://mlmmj.org"><code>mlmmj</code></a> mailing list manager.</li>
<li>It's available for both SQL and LDAP backends.</li>
</ul>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/mls/<domain></code><codeclass="comment">Get profile of all mailing lists under given domain</code><codeclass="has_params">Parameters</code></p>
<divclass="params">
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Sample Usage</th>
<th>Default Value</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>email_only</code></td>
<td><code>email_only=yes</code></td>
<td><code>no</code></td>
<td>Return a list of mailing list email addresses instead of detailed profile.</td>
</tr>
</tbody>
</table>
</div>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="get">GET</code><codeclass="url">/api/ml/<mail></code><codeclass="comment">Get profile of an existing mailing list account</code><codeclass="has_params">Parameters</code></p>
<divclass="params">
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Sample Usage</th>
<th>Default Value</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>with_subscribers</code></td>
<td><code>with_subscribers=yes</code></td>
<td><code>no</code></td>
<td>Get subscribers of mailing list.</td>
</tr>
</tbody>
</table>
</div>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="post">POST</code><codeclass="url">/api/ml/<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>Sample Usage</th>
<th>Default Value</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>name</code></td>
<td><code>name=Sales Team</code></td>
<td></td>
<td>Display name of the mailing list.</td>
</tr>
<tr>
<td><code>accountStatus</code></td>
<td><code>accountStatus=active</code></td>
<td></td>
<td>Enable or disable account. Possible values: <code>active</code>, <code>disabled</code>.</td>
</tr>
<tr>
<td><code>maxMailSize</code></td>
<td><code>maxMailSize=1048576</code> (1M)</td>
<td></td>
<td>Max message size (in bytes).</td>
</tr>
<tr>
<td><code>accessPolicy</code></td>
<td><code>accessPolicy=membersonly</code></td>
<td></td>
<td>Defines who can send email to this mailing list. Possible values: <code>public</code>, <code>domain</code>, <code>subdomain</code>, <code>membersonly</code>, <code>moderatorsonly</code>.</td>
</tr>
<tr>
<td><code>is_newsletter</code></td>
<td><code>is_newsletter=yes</code></td>
<td><code>no</code></td>
<td>Mark this mailing list as a newsletter, to enable subscription/unsubscription from web site.</td>
<td>If set to <code>yes</code>, mlmmj won't send mail to subscriber to ask for confirmation to subscribe to the list. <strong>WARNING</strong>: This should in principle never ever be used, but there are times on local lists etc. where this is useful. HANDLE WITH CARE!</td>
<td>If set to <code>yes</code>, subscription to the digest version of the mailing list is disabled. Useful if you don't want to allow digests and notify users about it.</td>
</tr>
<tr>
<td><code>disable_digest_text</code></td>
<td><code>disable_digest_text=yes</code></td>
<td></td>
<td>If set to <code>yes</code>, digest mails won't have a text part with a thread summary.</td>
<td>If set to <code>yes</code>, subscription to the 'nomail' version of the mailing list is disabled. Useful if you don't want to allow 'nomail' and notify users about it.</td>
</tr>
<tr>
<td><code>moderated</code></td>
<td><code>moderated=yes</code></td>
<td><code>no</code></td>
<td>If set to <code>yes</code>. Parameter <code>owner</code><strong>or</strong><code>moderators</code> is required to specify the moderators. Note: <code>moderators</code> has higher priority (means only addresses specified by <code>moderators</code> are act as moderators).</td>
<td>If set to <code>yes</code>, all postings from people who are not allowed to post to the list will be moderated. Default (set to <code>no</code>) is denied.</td>
<td>If set to <code>yes</code>, (owner) retrieving subscribers by sending email to <code>LISTNAME+list@</code> is disabled. Note: only owner can send to such address.</td>
<td>Notify sender (based on the envelope from) when their post is being moderated.</td>
</tr>
<tr>
<td><code>disable_archive</code></td>
<td><code>disable_archive=yes</code></td>
<td><code>no</code></td>
<td>If set to <code>yes</code>, emails won't be saved in the archive but simply deleted.</td>
</tr>
<tr>
<td><code>moderate_subscription</code></td>
<td><code>moderate_subscription=yes</code></td>
<td><code>no</code></td>
<td>If set to <code>yes</code>, subscription will be moderated by owner(s) or moderators specified by <code>subscription_moderators</code>. Moderators specified by <code>subscription_moderators</code> has higher priority. If set to <code>no</code>, subscription is not moderated, also, all moderators which were specified by <code>subscription_moderators</code> will be removed.</td>
<td>Specify subscription moderators. Note: if <code>subscription_moderators</code> is given, <code>moderate_subscription</code> will be set to <code>yes</code> automatically. If no valid moderators are given, subscription will be moderated by owner(s).</td>
<td>Add custom headers to every mail coming through. Multiple headers must be separated by <code>\n</code>. Set empty value to remove it. Note: mlmmjadmin will always add <code>X-Mailing-List: <mail></code> and <code>Reply-To: <mail></code> for each mailing list account.</td>
<td>Remove given mail headers. NOTE: either <code>header:</code> or <code>header</code> (without <code>:</code>) is ok. Note: mlmmjadmin will always remove <code>DKIM-Signature:</code> and <code>Authentication-Results:</code>.</td>
</tr>
<tr>
<td><code>name</code></td>
<td><code>name=Short description of list</code></td>
<td></td>
<td>Set a short description of the mailing list account.</td>
</tr>
<tr>
<td><code>footer_text</code></td>
<td><code>footer_text=footer in plain text</code></td>
<td></td>
<td>Append footer (in plain text format) to every email sent to the list.</td>
</tr>
<tr>
<td><code>footer_html</code></td>
<td><code>footer_text=<p>footer in html</p></code></td>
<td></td>
<td>Append footer (in html format) to every email sent to the list.</td>
<td>Subscribe users to mailing list. Multiple subscribers must be separated by comma.</td>
</tr>
<tr>
<td><code>require_confirm</code></td>
<td><code>require_confirm=no</code></td>
<td><code>yes</code></td>
<td>Send email to subscribers and let subscribers confirm the subscription.</td>
</tr>
<tr>
<td><code>subscription</code></td>
<td><code>subscription=normal</code></td>
<td><code>normal</code></td>
<td>Subscribe to different subscription. Valid values are: <code>normal</code>, <code>digest</code>, <code>nomail</code>.</td>
</tr>
</tbody>
</table>
</div>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="delete">DELETE</code><codeclass="url">/api/ml/<mail></code><codeclass="comment">Delete 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>keep_archive</code></td>
<td>Archive account settings and messages before deleting the mailing list.</td>
<td><code>keep_archive=no</code></td>
</tr>
</tbody>
</table>
</div>
</div>
<divclass="admonition api">
<pclass="admonition-title"><codeclass="put">PUT</code><codeclass="url">/api/ml/<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>Sample Usage</th>
<th>Default Value</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>name</code></td>
<td><code>name=Sales Team</code></td>
<td></td>
<td>Display name of the mailing list.</td>
</tr>
<tr>
<td><code>accountStatus</code></td>
<td><code>accountStatus=active</code></td>
<td></td>
<td>Enable or disable account. Possible values: <code>active</code>, <code>disabled</code>.</td>
</tr>
<tr>
<td><code>maxMailSize</code></td>
<td><code>maxMailSize=1048576</code> (1M)</td>
<td></td>
<td>Max message size (in bytes).</td>
</tr>
<tr>
<td><code>accessPolicy</code></td>
<td><code>accessPolicy=membersonly</code></td>
<td></td>
<td>Defines who can send email to this mailing list. Possible values: <code>public</code>, <code>domain</code>, <code>subdomain</code>, <code>membersonly</code>, <code>moderatorsonly</code>.</td>
</tr>
<tr>
<td><code>is_newsletter</code></td>
<td><code>is_newsletter=yes</code></td>
<td><code>no</code></td>
<td>Mark this mailing list as a newsletter, to enable subscription/unsubscription from web site.</td>
<td>If set to <code>yes</code>, mlmmj won't send mail to subscriber to ask for confirmation to subscribe to the list. <strong>WARNING</strong>: This should in principle never ever be used, but there are times on local lists etc. where this is useful. HANDLE WITH CARE!</td>
<td>If set to <code>yes</code>, subscription to the digest version of the mailing list is disabled. Useful if you don't want to allow digests and notify users about it.</td>
</tr>
<tr>
<td><code>disable_digest_text</code></td>
<td><code>disable_digest_text=yes</code></td>
<td></td>
<td>If set to <code>yes</code>, digest mails won't have a text part with a thread summary.</td>
<td>If set to <code>yes</code>, subscription to the 'nomail' version of the mailing list is disabled. Useful if you don't want to allow 'nomail' and notify users about it.</td>
</tr>
<tr>
<td><code>moderated</code></td>
<td><code>moderated=yes</code></td>
<td><code>no</code></td>
<td>If set to <code>yes</code>. Parameter <code>owner</code><strong>or</strong><code>moderators</code> is required to specify the moderators. Note: <code>moderators</code> has higher priority (means only addresses specified by <code>moderators</code> are act as moderators).</td>
<td>If set to <code>yes</code>, all postings from people who are not allowed to post to the list will be moderated. Default (set to <code>no</code>) is denied.</td>
<td>If set to <code>yes</code>, (owner) retrieving subscribers by sending email to <code>LISTNAME+list@</code> is disabled. Note: only owner can send to such address.</td>
<td>Notify sender (based on the envelope from) when their post is being moderated.</td>
</tr>
<tr>
<td><code>disable_archive</code></td>
<td><code>disable_archive=yes</code></td>
<td><code>no</code></td>
<td>If set to <code>yes</code>, emails won't be saved in the archive but simply deleted.</td>
</tr>
<tr>
<td><code>moderate_subscription</code></td>
<td><code>moderate_subscription=yes</code></td>
<td><code>no</code></td>
<td>If set to <code>yes</code>, subscription will be moderated by owner(s) or moderators specified by <code>subscription_moderators</code>. Moderators specified by <code>subscription_moderators</code> has higher priority. If set to <code>no</code>, subscription is not moderated, also, all moderators which were specified by <code>subscription_moderators</code> will be removed.</td>
<td>Specify subscription moderators. Note: if <code>subscription_moderators</code> is given, <code>moderate_subscription</code> will be set to <code>yes</code> automatically. If no valid moderators are given, subscription will be moderated by owner(s).</td>
<td>Add custom headers to every mail coming through. Multiple headers must be separated by <code>\n</code>. Set empty value to remove it. Note: mlmmjadmin will always add <code>X-Mailing-List: <mail></code> and <code>Reply-To: <mail></code> for each mailing list account.</td>
<td>Remove given mail headers. NOTE: either <code>header:</code> or <code>header</code> (without <code>:</code>) is ok. Note: mlmmjadmin will always remove <code>DKIM-Signature:</code> and <code>Authentication-Results:</code>.</td>
</tr>
<tr>
<td><code>name</code></td>
<td><code>name=Short description of list</code></td>
<td></td>
<td>Set a short description of the mailing list account.</td>
</tr>
<tr>
<td><code>footer_text</code></td>
<td><code>footer_text=footer in plain text</code></td>
<td></td>
<td>Append footer (in plain text format) to every email sent to the list.</td>
</tr>
<tr>
<td><code>footer_html</code></td>
<td><code>footer_text=<p>footer in html</p></code></td>
<td></td>
<td>Append footer (in html format) to every email sent to the list.</td>
<td>Remove existing subscribers from mailing list. Multiple subscribers must be separated by comma.</td>
</tr>
</tbody>
</table>
</div>
</div>
<h3class="toggle"id="mailing-list-unsubscribable">Mailing List (Unsubscribable)</h3>
<divclass="admonition attention">
<pclass="admonition-title">Attention</p>
<ul>
<li>This unsubscribable mailing list is only available in <strong>LDAP</strong> backend.</li>
<li>It's recommended to use the Subscribable Mailing List instead, you're
free to disable public subscribable.</li>
</ul>
</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><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>archive</code></td>
<td>Archive subscribable mailing list before deleting the account. NOTE: This option is only applicable to the subscribable mailing list account.</td>
<td><code>archive=no</code></td>
</tr>
</tbody>
</table>
</div>
</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>
<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>
</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/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>
</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>