Save a copy of old API document.

This commit is contained in:
Zhang Huangbin 2017-05-25 10:59:02 +08:00
parent ecbd763576
commit cec0e07626
7 changed files with 2074 additions and 99 deletions

View File

@ -4,38 +4,12 @@
!!! attention
* This document is applicable to `iRedAdmin-Pro-SQL-2.7.0` and
`iRedAdmin-Pro-LDAP-2.9.0`. If you're running an old release, please
upgrade iRedAdmin-Pro to the latest release, or check
[document for old releases](./iredadmin-pro.releases.html).
* If you need an API which has not yet been implemented, don't hesitate to
[contact us](../contact.html).
* This document is applicable to:
* iRedAdmin-Pro-SQL-2.7.0 (SQL edition)
* iRedAdmin-Pro-LDAP-2.9.0 (LDAP edition)
* If you're looking for API document for old iRedAdmin-Pro releases, please
check [this document](./iredadmin-pro.releases.html).
## ChangeLog
### iRedAdmin-Pro-SQL-2.7.0, iRedAdmin-Pro-LDAP-2.9.0
* New: Able to manage global, per-domain and per-user greylisting settings,
whitelist senders, and global whitelisted SPF domains.
* iRedAdmin-Pro-SQL-2.7.0:
* Variable names changed in returned JSON data of user profile (`GET /api/user/<mail>`):
* name `forwarding` is replaced by `forwardings`, and it's now a list
object of user forwarding email addresses (was a string, multiple
addresses were separated by comma).
* Variable names in returned JSON data of mail alias profile (`GET /api/alias/<mail>`):
* name `islist` is gone.
* name `goto` is replaced by `members`, and it's now a list object of
member email addresses (was a string, multiple addresses were separated
by comma).
* Variable names in returned JSON data of domain profile (`GET /api/domain/<domain>`):
* name `catchall` always presents, and it's now a list object of catch-all
email address (was a string, multiple addresses were separated by comma).
* Fixed bugs:
* Cannot set per-user alias addresses while creating new mail user.
* Cannot add or remove per-user alias addresses while updating user profile.
* User mailbox quota was removed while updating user profile.
* Not use default transport setting while creating new domain.
## Summary
@ -46,12 +20,6 @@ iRedAdmin-Pro RESTful API will return message in JSON format.
* For http `GET` method, it returns JSON data: `{'_success': true, '_data': <program_output>}`.
* If operation failed, it returns JSON data: `{'_success': false, '_msg': '<error_reason>'}`.
## Requirements
This document is applicable to the latest iRedAdmin-Pro-LDAP-2.7.0 and iRedAdmin-Pro-SQL-2.5.0.
* [RESTful API document for iRedAdmin-Pro-LDAP-2.7.0 or iRedAdmin-Pro-SQL-2.5.0](./iredadmin-pro.restful.api-20170123.html), released on Jan 23, 2017.
## Enable RESTful API
RESTful API is disabled by default, to enable it, please add setting below in
@ -589,7 +557,39 @@ Notes:
## ChangeLog
### iRedAdmin-Pro-SQL-2.7.0, iRedAdmin-Pro-LDAP-2.9.0
* New: Able to manage global, per-domain and per-user greylisting settings,
whitelist senders, and global whitelisted SPF domains.
* iRedAdmin-Pro-SQL-2.7.0:
* Variable names changed in returned JSON data of user profile (`GET /api/user/<mail>`):
* name `forwarding` is replaced by `forwardings`, and it's now a list
object of user forwarding email addresses (was a string, multiple
addresses were separated by comma).
* Variable names in returned JSON data of mail alias profile (`GET /api/alias/<mail>`):
* name `islist` is gone.
* name `goto` is replaced by `members`, and it's now a list object of
member email addresses (was a string, multiple addresses were separated
by comma).
* Variable names in returned JSON data of domain profile (`GET /api/domain/<domain>`):
* name `catchall` always presents, and it's now a list object of catch-all
email address (was a string, multiple addresses were separated by comma).
* Fixed bugs:
* Cannot set per-user alias addresses while creating new mail user.
* Cannot add or remove per-user alias addresses while updating user profile.
* User mailbox quota was removed while updating user profile.
* Not use default transport setting while creating new domain.
### iRedAdmin-Pro-SQL-2.6.0, iRedAdmin-Pro-LDAP-2.8.0
* Variable names in returned JSON data has been changed to:
`{'_success': ..., '_msg': ...}` (was `{'success': ..., 'msg': ...}`).
* Some variable names have been renamed:
* `cn` -> `name`.
* `mailQuota` -> `quota`
* `preferredLanguage` -> `language`

View File

@ -0,0 +1,534 @@
# iRedAdmin-Pro: RESTful API
[TOC]
!!! attention
* If you need an API which has not yet been implemented, don't hesitate to
[contact us](../contact.html).
* This document is applicable to
* iRedAdmin-Pro-SQL-2.5.0, 2.6.0
* iRedAdmin-Pro-LDAP-2.7.0, 2.8.0
## ChangeLog
### iRedAdmin-Pro-SQL-2.6.0, iRedAdmin-Pro-LDAP-2.8.0
* Variable names in returned JSON data has been changed to:
`{'_success': ..., '_msg': ...}` (was `{'success': ..., 'msg': ...}`).
* Some variable names have been renamed:
* `cn` -> `name`.
* `mailQuota` -> `quota`
* `preferredLanguage` -> `language`
## Summary
iRedAdmin-Pro RESTful API will return message in JSON format.
* If operation succeed:
* For http `POST`, `DELETE`, `PUT` methods, it returns JSON data: `{'_success': true}`.
* For http `GET` method, it returns JSON data: `{'_success': true, '_data': <program_output>}`.
* If operation failed, it returns JSON data: `{'_success': false, '_msg': '<error_reason>'}`.
## Requirements
This document is applicable to iRedAdmin-Pro-LDAP-2.7.0 and iRedAdmin-Pro-SQL-2.5.0.
## Enable RESTful API
RESTful API is disabled by default, to enable it, please add setting below in
iRedAdmin-Pro config file `settings.py`:
```
ENABLE_RESTFUL_API = True
```
To restrict API access to few IP addresses, please also add settings below in
iRedAdmin-Pro config file:
```
# Enable restriction
RESTRICT_API_ACCESS = True
# List all IP addresses of allowed client for API access.
RESTFUL_API_CLIENTS = ['172.16.244.1', ...]
```
Restarting Apache or uwsgi (if you're running Nginx) is required.
## Sample code to interact with iRedAdmin-Pro RESTful API
* [iRedAdmin-Pro RESTful API (interact with `curl`)](./iredadmin-pro.restful.api.curl.html)
* [iRedAdmin-Pro RESTful API (interact with Python)](./iredadmin-pro.restful.api.python.html)
## APIs
Notes:
* Parameter name with a `*` mark means the parameter is required, otherwise is optional.
* __Parameter names are cAsE-sensitive.__
* replace `<domain>` in URL by the real domain name. e.g. `example.com`
* replace `<mail>` in URL by the real email address. e.g. `user@domain.com`
* replace `<number>` in URL by an integer number. e.g. `30`, `200`
<button type="button" class="toggle_all">Expand/Collapse All API Parameters</button>
### Login {: .toggle }
!!! api "`POST`{: .post } `/api/login`{: .url } `Login with an admin username (full email address) and password`{: .comment } `Parameters`{: .has_params }"
<div class="params params_domain">
Parameter | Summary | Sample Usage
--- |--- |---
`username` | Admin username. Must be a full email address. | `username=admin@mydomain.com`
`password` | (Plain) admin password. | `password=AsTr0ng@`
</div>
### Domain {: .toggle }
!!! api "`GET`{: .get } `/api/domain/<domain>`{: .url } `Get profile of an existing domain`{: .comment }"
!!! api "`POST`{: .post } `/api/domain/<domain>`{: .url } `Create a new domain`{: .comment } `Parameters`{: .has_params }"
<div class="params params_domain">
Parameter | Summary | Sample Usage
--- |--- |---
`name` | Short description of this domain name. e.g. company name | `name=Google Inc`
`quota` | Per-domain mailbox quota, in MB. | `quota=2048`
`language` | Default preferred language for newly created mail user | `language=en_US`
`transport` | Transport program | `transport=dovecot`
`defaultQuota` | Default per-user mailbox quota for newly created user, in MB. | `defaultQuota=1024`
`maxUserQuota` | Max mailbox quota of a mail user, in MB. | `maxUserQuota=2048`
`numberOfUsers` | Max number of mail user accounts | `numberOfUsers=20`
`numberOfAliases` | Max number of mail alias accounts | `numberOfAliases=30`
`numberOfLists` | Max number of mailing list accounts (Available in LDAP backends)| `numberOfLists=40`
`senderBcc` | Per-domain sender bcc | `senderBcc=user@domain.com`
`recipientBcc` | Per-domain recipient bcc | `recipientBcc=user@domain.com`
</div>
!!! api "`DELETE`{: .delete } `/api/domain/<domain>`{: .url } `Delete an existing domain (all mail messages will NOT be removed)`{: .comment }"
!!! api "`DELETE`{: .delete } `/api/domain/<domain>/keep_mailbox_days/<number>`{: .url } `Delete domain, and keep all mail messages for given days`{: .comment }"
!!! api "`PUT`{: .put } `/api/domain/<domain>`{: .url } `Update profile of an existing domain`{: .comment } `Parameters`{: .has_params }"
<div class="params params_domain">
Parameter | Summary | Sample Usage
--- |--- |---
`name` | Short description of this domain name. e.g. company name | `name=Google Inc`
`accountStatus` | Enable or disable domain. Possible values: `active`, `disabled`. | `accountStatus=active`
`quota` | Mailbox quota for whole domain, in MB. | `quota=2048`
`language` | Default preferred language for newly created mail user | `language=en_US`
`transport` | Transport program | `transport=dovecot`
`minPasswordLength` | Minimal password length | `minPasswordLength=8`
`maxPasswordLength` | Maximum password length | `minPasswordLength=20`
`defaultQuota` | Default per-user mailbox quota for newly created user | `defaultQuota=1024`
`maxUserQuota` | Max mailbox quota of a mail user | `maxUserQuota=2048`
`numberOfUsers` | Max number of mail user accounts | `numberOfUsers=20`
`numberOfAliases` | Max number of mail alias accounts | `numberOfAliases=30`
`senderBcc` | Per-domain sender bcc address | `senderBcc=user@domain.com`
`recipientBcc` | Per-domain recipient bcc address | `recipientBcc=user@domain.com`
`is_backupmx` | Mark domain as Backup MX. Must be used with parameter `primarymx`. Conflicts with parameter `transport`. | `is_backupmx=yes` (or `no`)
`primarymx` | Hostname or IP address of primary MX, smtp port number is optional. Must be used with parameter `is_backupmx`. Conflicts with parameter `transport`. | `primarymx=202.96.134.133`, `primarymx=[mail.iredmail.org]:25`
`catchall` | 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. | `catchall=user@domain.com,user2@domain.com` or `catchall=` (disable catch-all)
`outboundRelay` | Per-domain outbound relay. Set an empty value to disable outbound relay. | `outboundRelay=smtp:[192.168.1.2]:25` or `outboundRelay=` (disable outbound relay)
`enableService` | Enable new services. Multiple services must be separated by comma. Available services are listed below. | `enableService=self-service`
`disableService` | Disable existing services. Multiple services must be separated by comma. Available services are listed below. | `disableService=self-service`
`removeAllServices` | Disable all services (including mail service) | `removeAllServices=` (empty value)
`disableDomainProfile` | disable given domain profiles. Normal admin cannot view and update disabled profiles in domain profile page. Available domain profiles are listed below. | `disableDomainProfile=bcc,relay,aliases`
`enableDomainProfile` | enable given domain profiles. Normal admin can view and update disabled profiles in domain profile page. Available domain profiles are listed below. | `enableDomainProfile=bcc,relay,aliases`
`disableUserProfile` | disable given user profiles. Normal admin cannot view and update disabled profiles in user profile page. Available user profiles are listed below. | `disableUserProfile=bcc,relay,aliases`
`enableUserProfile` | enable given domain profiles. Normal admin can view and update disabled profiles in user profile page. Available user profiles are listed below. | `enableUserProfile=bcc,relay,aliases`
`disableUserPreference` | disable given user preferences in self-service page. Normal mail user cannot view and update disabled preferences. Available user preferences are listed below. | `disableUserPreference=forwarding,wblist`
`enableUserPreference` | disable given user preferences in self-service page. Normal mail user can view and update disabled preferences. Available user preferences are listed below. | `enableUserProfile=forwarding,wblist`
Available mail services:
Profile | Comment
--- |---
self-service | Enable self-service for the mail domain.
mail | All mail services. (LDAP backends only)
domainalias | Alias domain support. (LDAP backends only)
senderbcc | Per-domain sender bcc. (LDAP backends only)
recipientbcc | Per-domain recipient bcc. (LDAP backends only)
Available domain profiles:
Profile | Comment
--- |---
bcc | Per-domain sender bcc and recipient bcc
relay | Per-domain inbound relay and outbound relay
catchall | Per-domain catchall account
aliases | Alias domains
throttle | Per-domain inbound and outbound throttling
greylisting | Per-domain greylisting service
wblist | Per-domain whitelists and blacklists
spampolicy | Per-domain spam policy
backupmx | Backup MX
advanced | Some extra settings
Available user profiles:
Profile | Comment
--- |---
bcc | Per-user sender bcc and recipient bcc
forwarding | Per-user mail forwarding addresses
relay | Per-user inbound relay and outbound relay
aliases | Per-user alias addresses
throttle | Per-user inbound and outbound throttling
greylisting | Per-user greylisting service
wblist | Per-user whitelists and blacklists
spampolicy | Per-user spam policy
Available user preferences (self-service):
Profile | Comment
--- |---
personal_info | Name, time zone, preferred language of web UI
forwarding | Per-user mail forwarding addresses
wblist | Per-user whitelists and blacklists
quarantine | Manage quarantined mails
rcvd_mails | View basic info of received mails, and whitelist/blacklist mail sender directly.
spampolicy | Per-user spam policy
</div>
!!! api "`PUT`{: .put } `/api/domain/admins/<domain>`{: .url } `Manage normal domain admins.`{: .comment } `Parameters`{: .has_params }"
<div class="params params_domain_admins">
!!! attention
Normal domain admin can only promote mail users under managed domains
to be a domain admin.
Parameter | Summary | Sample Usage
--- |--- |---
`addAdmin` | Add new domain admins. Multiple services must be separated by comma. | `addAdmin=one@domain.com,two@domain.com`
`removeAdmin` | Remove existing domain admins. Multiple services must be separated by comma. | `removeAdmin=one@domain.com,two@domain.com`
`removeAllAdmins` | Remove all existing domain admins. | `removeAllAdmins=` (empty value)
</div>
### Domain Admin {: .toggle }
!!! attention
* This is standalone domain admin account, not mail user with admin privileges.
* Only global admin can access these APIs.
!!! api "`GET`{: .get } `/api/admin/<mail>`{: .url } `Get profile of an existing domain admin`{: .comment }"
!!! api "`POST`{: .post } `/api/admin/<mail>`{: .url } `Create a new domain admin`{: .comment } `Parameters`{: .has_params }"
<div class="params params_admin">
Parameter | Summary | Sample Usage
--- |--- |---
`name` | Display name | `name=My Admin Name`
`password` | Password| `password=AsTr0ng@`
`accountStatus` | Enable or disable account. Possible values: `active`, `disabled`. | `accountStatus=active`
`language` | Preferred language of iRedAdmin web UI | `language=en_US`
`isGlobalAdmin` | Mark this admin as global admin | `isGlobalAdmin=yes`
Below parameters are used by normal domain admin (`isGlobalAdmin=no`). With `isGlobalAdmin=yes`, these parameters will be discarded.
Parameter | Summary | Sample Usage
--- |--- |---
`maxDomains` | how many mail domains this admin can create | `maxDomains=5`
`maxQuota` | how much mailbox quota this admin can create. Quota is shared by all domains created/managed by this admin. Must be used with parameter `quotaUnit`. Sample: 10TB, 20GB, 100MB.| `maxQuota=2`
`quotaUnit` | Quota unit used by `maxQuota` parameter. Must be used with parameter `maxQuota`. Possible values: TB, GB, MB. | `quotaUnit=TB`
`maxUsers` | how many mail users this admin can create. It's shared by all domains created/managed by this admin. | `maxUsers=100`
`maxAliases` | how many mail aliases this admin can create. It's shared by all domains created/managed by this admin. | `maxAliases=200`
`maxLists` | how many mailing lists this admin can create. It's shared by all domains created/managed by this admin. | `maxLists=300`
</div>
!!! api "`DELETE`{: .delete } `/api/admin/<mail>`{: .url } `Delete an existing domain admin`{: .comment }"
!!! api "`PUT`{: .put } `/api/admin/<mail>`{: .url } `Update profile of an existing domain admin`{: .comment } `Parameters`{: .has_params }"
<div class="params params_admin">
Parameter | Summary | Sample Usage
--- |--- |---
`name` | Display name | `name=My Admin Name`
`password` | Password| `password=AsTr0ng@`
`accountStatus` | Enable or disable account. Possible values: `active`, `disabled`. | `accountStatus=active`
`language` | Preferred language of iRedAdmin web UI | `language=en_US`
`isGlobalAdmin` | Mark this admin as global admin | `isGlobalAdmin=yes`
Below parameters are used by normal domain admin (`isGlobalAdmin=no`). With `isGlobalAdmin=yes`, these parameters will be discarded.
Parameter | Summary | Sample Usage
--- |--- |---
`maxDomains` | how many mail domains this admin can create | `maxDomains=5`
`maxQuota` | how much mailbox quota this admin can create. Quota is shared by all domains created/managed by this admin. Must be used with parameter `quotaUnit`. Sample: 10TB, 20GB, 100MB.| `maxQuota=2`
`quotaUnit` | Quota unit used by `maxQuota` parameter. Must be used with parameter `maxQuota`. Possible values: TB, GB, MB. | `quotaUnit=TB`
`maxUsers` | how many mail users this admin can create. It's shared by all domains created/managed by this admin. | `maxUsers=100`
`maxAliases` | how many mail aliases this admin can create. It's shared by all domains created/managed by this admin. | `maxAliases=200`
`maxLists` | how many mailing lists this admin can create. It's shared by all domains created/managed by this admin. | `maxLists=300`
</div>
!!! api "`POST`{: .post } `/api/verify_password/admin/<mail>`{: .url } `Verify given (plain) password against the one stored in SQL/LDAP`{: .comment } `Parameters`{: .has_params} "
<div class="params params_admin">
!!! attention
Password verification is limited to global domain admin.
Parameter | Summary | Sample Usage
--- |--- |---
`password` | Plain password | `password=u0tBF82cIV@vi8Gme`
</div>
### Mail User {: .toggle }
!!! api "`GET`{: .get } `/api/user/<mail>`{: .url } `Get profile of an existing mail user`{: .comment }"
!!! api "`POST`{: .post } `/api/user/<mail>`{: .url } `Create a new mail user`{: .comment } `Parameters`{: .has_params }"
<div class="params params_user">
Parameter | Summary | Sample Usage
--- |--- |---
`name` | Display name | `name=My New Name`
`password` | Password| `password=AsTr0ng@`
`language` | Preferred language of iRedAdmin web UI | `language=en_US`
`quota` | Mailbox quota (in MB) | `quota=1024`
</div>
!!! api "`DELETE`{: .delete } `/api/user/<mail>`{: .url } `Delete an existing mail user`{: .comment }"
!!! api "`DELETE`{: .delete } `/api/user/<mail>/keep_mailbox_days/<number>`{: .url } `Delete an existing mail user, and keep the mailbox for given days. Defaults to 100 years.`{: .comment }"
!!! api "`PUT`{: .put } `/api/user/<mail>`{: .url } `Update profile of an existing mail user`{: .comment } `Parameters`{: .has_params} "
<div class="params params_user">
Parameter | Summary | Sample Usage
--- |--- |---
`name` | Display name | `name=My New Name`
`password` | Password | `password=u0tBF82cIV@vi8Gme`
`quota` | Mailbox quota (in MB) | `quota=1024`
`accountStatus` | Enable or disable user. Possible values: `active`, `disabled`. | `accountStatus=active`
`language` | Preferred language of iRedAdmin web UI | `language=en_US`
`employeeid` | User ID (or Employee Number) | `employeeid=My Employee ID`
`transport` | Transport program | `transport=dovecot`
`forwarding` | 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. | `forwarding=user1@domain.com,user2@domain.com,user3@domain.com`
`aliases` | 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. __If given addresses exist on system before this assignment, they won't be assigned to the user.__ Conflicts with parameter `addAlias` and `removeAlias`. | `aliases=user1@domain.com,user2@domain.com,user3@domain.com`
`addAlias` | Add new per-user alias addresses. Multiple addresses must be separated by comma. Conflicts with parameter `aliases`. | `aliases=user1@domain.com,user2@domain.com,user3@domain.com`
`removeAlias` | Remove existing per-user alias addresses. Multiple addresses must be separated by comma. Conflicts with parameter `aliases`. | `aliases=user1@domain.com,user2@domain.com,user3@domain.com`
</div>
!!! api "`POST`{: .put } `/api/user/<mail>/change_email/<new_mail>`{: .url } `Change user's email address (from '<mail>' to '<new_mail>')`{: .comment }"
!!! api "`PUT`{: .put } `/api/users/<domain>`{: .url } `Update profiles of all users under domain`{: .comment } `Parameters`{: .has_params }"
<div class="params">
Parameter | Comment
--- |---
`accountStatus` | Account status. Possible value is: active, disabled.
`password` | Password
`language` | Preferred language of iRedAdmin web UI
`transport` | Per-user transport
</div>
!!! api "`POST`{: .post } `/api/verify_password/user/<mail>`{: .url } `Verify given (plain) password against the one stored in SQL/LDAP`{: .comment } `Parameters`{: .has_params} "
<div class="params params_user">
!!! attention
Password verification is limited to global domain admin.
Parameter | Summary | Sample Usage
--- |--- |---
`password` | Plain password | `password=u0tBF82cIV@vi8Gme`
</div>
### Mailing List {: .toggle }
!!! attention
Mailing list is only available in OpenLDAP backend. For SQL backends,
please use mail alias account as mailing list.
!!! api "`GET`{: .get } `/api/maillist/<mail>`{: .url } `Get profile of an existing mailing list account`{: .comment }"
!!! api "`POST`{: .post } `/api/maillist/<mail>`{: .url } `Create a new mailing list`{: .comment } `Parameters`{: .has_params }"
<div class="params">
Parameter | Summary | Sample Usage
--- |--- |---
`name` | Display name | `name=My List Name`
`accessPolicy` | Defines who can send email to this mail alias account | `accessPolicy=public`
`members` | Members of mailing list. Multiple members must be separated by comma. | `members=user1@domain.com,user2@domain.com`
</div>
!!! api "`DELETE`{: .delete } `/api/maillist/<mail>`{: .url } `Delete an existing mailing list`{: .comment }"
!!! api "`PUT`{: .put } `/api/maillist/<mail>`{: .url } `Update profile of an existing mailing list`{: .comment } `Parameters`{: .has_params }"
<div class="params">
Parameter | Summary | Sample Usage
--- |--- |---
`name` | display name | `name=My List Name`
`accessPolicy` | Defines who can send email to this mailing list | `accessPolicy=public`
`members` | Members of mailing list. Multiple members must be separated by comma. Conflict with parameter `addMember` and `removeMember`. | `members=user1@domain.com,user2@domain.com`
`addMember` | Add new members of mailing list. Multiple members must be separated by comma. Conflict with parameter `members`. | `addMember=user1@domain.com,user2@domain.com`
`removeMember` | Remove existing members of mailing list. Multiple members must be separated by comma. Conflict with parameter `members`. | `removeMember=user1@domain.com,user2@domain.com`
</div>
### Mail Alias {: .toggle }
!!! api "`GET`{: .get } `/api/alias/<mail>`{: .url } `Get profile of an existing mail alias`{: .comment }"
!!! api "`POST`{: .post } `/api/alias/<mail>`{: .url } `Create a new mail alias`{: .comment } `Parameters`{: .has_params}"
<div class="params">
Parameter | Summary | Sample Usage
--- |--- |---
`name` | Display name | `name=My List Name`
`accessPolicy` | Defines who can send email to this mail alias account | `accessPolicy=public`
`members` | Members of mail alias. Multiple members must be separated by comma. | `members=user1@domain.com,user2@domain.com`
!!! attention
`accessPolicy` for mail alias account is only available for SQL backends.
</div>
!!! api "`DELETE`{: .delete } `/api/alias/<mail>`{: .url } `Delete an existing mail alias`{: .comment }"
!!! api "`PUT`{: .put } `/api/alias/<mail>`{: .url } `Update profile of an existing mail alias`{: .comment } `Parameters`{: .has_params }"
<div class="params">
!!! attention
`accessPolicy` for mail alias account is only available for SQL backends.
Parameter | Summary | Sample Usage
--- |--- |---
`name` | Display name | `name=My List Name`
`accessPolicy` | Defines who can send email to this mail alias account | `accessPolicy=public`
`members` | Members of mail alias. Multiple members must be separated by comma. Conflict with parameter `addMember` and `removeMember`. | `members=user1@domain.com,user2@domain.com`
`addMember` | Add new members of mail alias. Multiple members must be separated by comma. Conflict with parameter `members`. | `addMember=user1@domain.com,user2@domain.com`
`removeMember` | Remove existing members of mail alias. Multiple members must be separated by comma. Conflict with parameter `members`. | `removeMember=user1@domain.com,user2@domain.com`
</div>
!!! api "`POST`{: .put } `/api/alias/<mail>/change_email/<new_mail>`{: .url } `Change email address of alias account (from '<mail>' to '<new_mail>')`{: .comment }"
### Spam Policy {: .toggle }
!!! api "`GET`{: .get } `/api/spampolicy/global`{: .url } `Get global spam policy`{: .comment }"
!!! api "`PUT`{: .put } `/api/spampolicy/global`{: .url } `Set global spam policy`{: .comment } `Parameters`{: .has_params_spampolicy }"
!!! api "`DELETE`{: .delete } `/api/spampolicy/global`{: .url } `Delete global spam policy`{: .comment }"
!!! api "`GET`{: .get } `/api/spampolicy/domain/<domain>`{: .url } `Get per-domain spam policy`{: .comment }"
!!! api "`PUT`{: .put } `/api/spampolicy/domain/<domain>`{: .url } `Set per-domain spam policy`{: .comment } `Parameters`{: .has_params_spampolicy }"
!!! api "`DELETE`{: .delete } `/api/spampolicy/domain/<domain>`{: .url } `Delete per-domain spam policy`{: .comment }"
!!! api "`GET`{: .get } `/api/spampolicy/user/<mail>`{: .url } `Get per-user spam policy`{: .comment }"
!!! api "`PUT`{: .put } `/api/spampolicy/user/<mail>`{: .url } `Set per-user spam policy`{: .comment } `Parameters`{: .has_params_spampolicy }"
!!! api "`DELETE`{: .delete } `/api/spampolicy/user/<mail>`{: .url } `Delete per-user spam policy`{: .comment }"
<div class="params params_spampolicy">
Parameters available for global, per-domain, per-user spam policies.
> Per-user policy has the highest priority, then per-domain policy, then global policy.
Parameter | Summary | Sample Usage
--- |--- |---
`bypass_spam_checks` | Bypass spam checks | `bypass_spam_checks=yes` (default is `no`)
`bypass_virus_checks` | Bypass virus checks | `bypass_virus_checks=yes` (default is `no`)
`bypass_banned_checks` | Bypass banned file type checks | `bypass_banned_checks=yes` (default is `no`)
`bypass_header_checks` | Bypass bad header checks | `bypass_header_checks=yes` (default is `no`)
`quarantine_spam` | Quarantine detected spam into SQL database | `quarantine_spam=yes` (default is `no`)
`quarantine_virus` | Quarantine detected virus into SQL database | `quarantine_virus=no` (default is `yes`)
`quarantine_banned` | Quarantine email with banned file type into SQL database | `quarantine_banned=yes` (default is `no`)
`quarantine_bad_header` | Quarantine email with bad header into SQL database | `quarantine_bad_header=yes` (default is `no`)
`prefix_spam_in_subject` | Prefix string `[SPAM] ` in mail subject if it's spam | `prefix_spam_in_subject=yes` (default is `no`)
`always_insert_x_spam_headers` | Always insert `X-Spam-*` headers in email. It contains spam score and matched SpamAssassin rules. __Don't enable this unless you want to debug spam checking.__ | `always_insert_x_spam_headers=yes` (default is `no`)
`spam_score` | Set a preferred spam score, if scanned email has higher score than this one, it will be marked as spam. | `spam_score=4` (defaults to use system setting defined in Amavisd config file.)
</div>
### Throttling {: .toggle }
!!! api "`GET`{: .get } `/api/throttle/global/inbound`{: .url } `Get global inbound throttle settings`{: .comment }"
!!! api "`POST`{: .post } `/api/throttle/global/inbound`{: .url } `Set global inbound throttle settings`{: .comment } `Parameters`{: .has_params_throttle }"
!!! api "`GET`{: .get } `/api/throttle/global/outbound`{: .url } `Get global outbound throttle settings`{: .comment }"
!!! api "`POST`{: .post } `/api/throttle/global/outbound`{: .url } `Set global inbound throttle settings`{: .comment } `Parameters`{: .has_params_throttle }"
!!! api "`GET`{: .get } `/api/throttle/<domain>/inbound`{: .url } `Get domain inbound throttle settings`{: .comment }"
!!! api "`POST`{: .post } `/api/throttle/<domain>/inbound`{: .url } `Set domain inbound throttle settings`{: .comment } `Parameters`{: .has_params_throttle }"
!!! api "`GET`{: .get } `/api/throttle/<domain>/outbound`{: .url } `Get domain outbound throttle settings`{: .comment }"
!!! api "`POST`{: .post } `/api/throttle/<domain>/outbound`{: .url } `Set domain outbound throttle settings`{: .comment } `Parameters`{: .has_params_throttle }"
!!! api "`GET`{: .get } `/api/throttle/<mail>/inbound`{: .url } `Get user inbound throttle settings`{: .comment }"
!!! api "`POST`{: .post } `/api/throttle/<mail>/inbound`{: .url } `Set user inbound throttle settings`{: .comment } `Parameters`{: .has_params_throttle }"
!!! api "`GET`{: .get } `/api/throttle/<mail>/outbound`{: .url } `Get user outbound throttle settings`{: .comment }"
!!! api "`POST`{: .post } `/api/throttle/<mail>/outbound`{: .url } `Set user outbound throttle settings`{: .comment } `Parameters`{: .has_params_throttle }"
<div class="params params_throttle">
Parameters available for global, per-domain, per-user throttle settings.
Parameter | Summary | Sample Usage
--- |--- |---
`period` * | Period of time, in seconds | `period=3600` (one hour)
`msg_size` | Max size of single email, in bytes | `msg_size=10485760` (10 MB)
`max_msgs` | Number of max inbound emails | `max_msgs=20` (up to 20 messages)
`max_quota` | Cumulative size of inbound or outbound emails, in bytes | `max_quota=1048576000` (1 GB)
</div>
### Export Accounts {: .toggle }
#### LDIF (LDAP backend only) {: .toggle }
!!! api "`GET`{: .get } `/api/ldif/domain/<domain>`{: .url } `Export domain to LDIF`{: .comment }"
!!! api "`GET`{: .get } `/api/ldif/catchall/<domain>`{: .url } `Export per-domain catch-all account to LDIF`{: .comment }"
!!! api "`GET`{: .get } `/api/ldif/admin/<mail>`{: .url } `Export (separated) domain admin to LDIF`{: .comment }"
!!! api "`GET`{: .get } `/api/ldif/user/<mail>`{: .url } `Export mail user to LDIF`{: .comment }"
!!! api "`GET`{: .get } `/api/ldif/maillist/<mail>`{: .url } `Export mailing list account to LDIF`{: .comment }"
!!! api "`GET`{: .get } `/api/ldif/alias/<mail>`{: .url } `Export mail alias account to LDIF`{: .comment }"
<script src="./js/jquery-1.12.3.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
/* Collapse all parameters by default */
$('.params').hide();
/* Expand/Collapse ALL parameters */
$('.toggle_all').bind('click', function(){$('.params').toggle();});
/* Expand/Collapse parameters under same title/category */
$('.toggle').on('click', function() {
$(this).nextUntil('.toggle').children('.params').toggle();
});
/* Expand/Collapse parameter for current API */
$('.has_params').on('click', function() {
$(this).parent().nextUntil('.has_params').toggle();
});
/* Expand/Collapse specific parameters */
$('.has_params_throttle').bind('click', function(){$('.params_throttle').toggle();});
$('.has_params_spampolicy').bind('click', function(){$('.params_spampolicy').toggle();});
});
</script>

View File

@ -20,12 +20,12 @@ this tutorial with just one shell command:
### iRedAdmin-Pro-LDAP (for OpenLDAP backend)
Version | Release Date | Comment
---|---|---
[2.8.0](http://www.iredmail.org/forum/topic12499.html) | Mar 21, 2017 | Bug fix release.
[2.7.0](http://www.iredmail.org/forum/topic12266.html) | Jan 23, 2017 | Improved RESTful API support.
[2.6.1](http://www.iredmail.org/forum/topic11809.html) | Oct 10, 2016 | Fixes an __CRITICAL SECURITY ISSUE__ on FreeBSD and OpenBSD.
[2.6.0](http://www.iredmail.org/forum/topic10995.html) | May 3, 2016 | With __RESTful API__ support.
Version | Release Date | Comment | Extra
---|---|---|---
[2.8.0](http://www.iredmail.org/forum/topic12499.html) | Mar 21, 2017 | Bug fix release. | [RESTful API document](./iredadmin-pro.restful.api-20170123.html)
[2.7.0](http://www.iredmail.org/forum/topic12266.html) | Jan 23, 2017 | Improved RESTful API support. | [RESTful API document](./iredadmin-pro.restful.api-20170123.html)
[2.6.1](http://www.iredmail.org/forum/topic11809.html) | Oct 10, 2016 | Fixes an __CRITICAL SECURITY ISSUE__ on FreeBSD and OpenBSD. | [RESTful API document](./iredadmin-pro.restful.api-20170123.html)
[2.6.0](http://www.iredmail.org/forum/topic10995.html) | May 3, 2016 | With __RESTful API__ support. | [RESTful API document](./iredadmin-pro.restful.api-20170123.html)
[2.5.0](http://www.iredmail.org/forum/topic10513.html) | Jan 25, 2016
[2.4.0](http://www.iredmail.org/forum/topic10262.html) | Dec 14, 2015
[2.3.1](http://www.iredmail.org/forum/topic9281.html) | Jun 3, 2015 | Bug fix release.
@ -52,12 +52,12 @@ Version | Release Date | Comment
### iRedAdmin-Pro-SQL (For MySQL, MariaDB, PostgreSQL backends)
Version | Release Date | Comment
---|---|---
[2.6.0](http://www.iredmail.org/forum/topic12498.html) | Mar 21, 2017 | Bug fix release.
[2.5.0](http://www.iredmail.org/forum/topic12267.html) | Jan 23, 2017 | Improved RESTful API support.
[2.4.1](http://www.iredmail.org/forum/topic11809.html) | Oct 10, 2016 | Fixes an __CRITICAL SECURITY ISSUE__ on FreeBSD and OpenBSD.
[2.4.0](http://www.iredmail.org/forum/topic10996.html) | May 3, 2016 | With __RESTful API__ support.
Version | Release Date | Comment | RESTful API Document
---|---|---|---
[2.6.0](http://www.iredmail.org/forum/topic12498.html) | Mar 21, 2017 | Bug fix release. | [RESTful API document](./iredadmin-pro.restful.api-20170123.html)
[2.5.0](http://www.iredmail.org/forum/topic12267.html) | Jan 23, 2017 | Improved RESTful API support. | [RESTful API document](./iredadmin-pro.restful.api-20170123.html)
[2.4.1](http://www.iredmail.org/forum/topic11809.html) | Oct 10, 2016 | Fixes an __CRITICAL SECURITY ISSUE__ on FreeBSD and OpenBSD. | [RESTful API document](./iredadmin-pro.restful.api-20170123.html)
[2.4.0](http://www.iredmail.org/forum/topic10996.html) | May 3, 2016 | With __RESTful API__ support. | [RESTful API document](./iredadmin-pro.restful.api-20170123.html)
[2.3.0](http://www.iredmail.org/forum/topic10514.html) | Jan 25, 2016
[2.2.0](http://www.iredmail.org/forum/topic10263.html) | Dec 14, 2015
[2.1](http://www.iredmail.org/forum/topic9282.html) | Jun 3, 2015 | Bug fix release.

View File

@ -180,6 +180,7 @@
<li><a href="iredadmin-pro.custom.logo.html">iRedAdmin-Pro: Custom logo image, brand name, short product description</a></li>
<li><a href="iredadmin-pro.default.password.policy.html">iRedAdmin-Pro: Default password restrictions</a></li>
<li><a href="iredadmin-pro.domain.ownership.verification.html">iRedAdmin-Pro: Domain ownership verification</a></li>
<li><a href="iredadmin-pro.restful.api-20170123.html">iRedAdmin-Pro: RESTful API</a></li>
<li><a href="iredadmin-pro.restful.api.html">iRedAdmin-Pro: RESTful API</a></li>
<li><a href="iredadmin-pro.self-service.html">iRedAdmin-Pro: Enable self-service to allow users to manage their own preferences and more</a></li>
<li><a href="iredadmin-pro.spam.policy.priority.html">iRedAdmin-Pro: Priority of spam policy used in iRedMail &amp; iRedAdmin-Pro</a></li>

View File

@ -51,6 +51,7 @@ this tutorial with just one shell command:</p>
<th>Version</th>
<th>Release Date</th>
<th>Comment</th>
<th>Extra</th>
</tr>
</thead>
<tbody>
@ -58,136 +59,163 @@ this tutorial with just one shell command:</p>
<td><a href="http://www.iredmail.org/forum/topic12499.html">2.8.0</a></td>
<td>Mar 21, 2017</td>
<td>Bug fix release.</td>
<td><a href="./iredadmin-pro.restful.api-20170123.html">RESTful API document</a></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic12266.html">2.7.0</a></td>
<td>Jan 23, 2017</td>
<td>Improved RESTful API support.</td>
<td><a href="./iredadmin-pro.restful.api-20170123.html">RESTful API document</a></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic11809.html">2.6.1</a></td>
<td>Oct 10, 2016</td>
<td>Fixes an <strong>CRITICAL SECURITY ISSUE</strong> on FreeBSD and OpenBSD.</td>
<td><a href="./iredadmin-pro.restful.api-20170123.html">RESTful API document</a></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic10995.html">2.6.0</a></td>
<td>May 3, 2016</td>
<td>With <strong>RESTful API</strong> support.</td>
<td><a href="./iredadmin-pro.restful.api-20170123.html">RESTful API document</a></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic10513.html">2.5.0</a></td>
<td>Jan 25, 2016</td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic10262.html">2.4.0</a></td>
<td>Dec 14, 2015</td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic9281.html">2.3.1</a></td>
<td>Jun 3, 2015</td>
<td>Bug fix release.</td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic9145.html">2.3.0</a></td>
<td>May 15, 2015</td>
<td>Provides some basic hooks (hook is just like plugin)</td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic8635.html">2.2.2</a></td>
<td>Feb 2, 2015</td>
<td>Bug fix release.</td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic8447.html">2.2.0</a></td>
<td>Jan 1, 2015</td>
<td>self-service, deeper Amavisd integration, SSHA512/BCRYPT password hashes support.</td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic6925-news-announcements-bug-fixes-iredadminproldap212-has-been-released.html">2.1.2</a></td>
<td>2014-05-16</td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic5911.html">2.1.1</a></td>
<td>2013-12-30</td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic5832-news-announcements-bug-fixes-iredadminproldap21-has-been-released.html">2.1.0</a></td>
<td>2013-12-16</td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic5168-news-announcements-bug-fixes-iredadminproldap20-has-been-released.html">2.0</a></td>
<td>2013-07-16</td>
<td>Bug fix release.</td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic4647-news-announcements-bug-fixes-iredadminproldap190-has-been-released.html">1.9.0</a></td>
<td>2013-03-26</td>
<td>Bug fix release.</td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic3919-news-announcements-bug-fixes-iredadminproldap180-has-been-released.html">1.8.0</a></td>
<td>2012-09-19</td>
<td>Bug fix release.</td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic3369-news-announcements-bug-fixes-iredadminproldap172-has-been-released.html">1.7.0</a></td>
<td>2012-05-10</td>
<td>Bug fix release.</td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedAdmin-Pro/LDAP/1.6.3">1.6.3</a></td>
<td>2012-01-10</td>
<td>Bug fix release.</td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedAdmin-Pro/LDAP/1.6.2">1.6.2</a></td>
<td>2011-08-07</td>
<td>Bug fix release.</td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedAdmin-Pro/LDAP/1.6.1">1.6.1</a></td>
<td>2011-06-26</td>
<td>Bug fix release.</td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedAdmin-Pro/LDAP/1.6.0">1.6.0</a></td>
<td>2011-06-10</td>
<td>security fix release.</td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedAdmin-Pro/LDAP/1.5.0">1.5.0</a></td>
<td>2011-05-03</td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedAdmin-Pro/LDAP/1.4.1">1.4.1</a></td>
<td>2011-03-03</td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedAdmin-Pro/LDAP/1.4.0">1.4.0</a></td>
<td>2011-02-01</td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedAdmin-Pro/LDAP/1.3.0">1.3.0</a></td>
<td>2010-10-01</td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedAdmin-Pro/LDAP/1.2.0">1.2.0</a></td>
<td>2010-06-18</td>
<td></td>
<td></td>
</tr>
<tr>
<td>1.0</td>
<td>2009-11-01</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
@ -198,6 +226,7 @@ this tutorial with just one shell command:</p>
<th>Version</th>
<th>Release Date</th>
<th>Comment</th>
<th>RESTful API Document</th>
</tr>
</thead>
<tbody>
@ -205,131 +234,157 @@ this tutorial with just one shell command:</p>
<td><a href="http://www.iredmail.org/forum/topic12498.html">2.6.0</a></td>
<td>Mar 21, 2017</td>
<td>Bug fix release.</td>
<td><a href="./iredadmin-pro.restful.api-20170123.html">RESTful API document</a></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic12267.html">2.5.0</a></td>
<td>Jan 23, 2017</td>
<td>Improved RESTful API support.</td>
<td><a href="./iredadmin-pro.restful.api-20170123.html">RESTful API document</a></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic11809.html">2.4.1</a></td>
<td>Oct 10, 2016</td>
<td>Fixes an <strong>CRITICAL SECURITY ISSUE</strong> on FreeBSD and OpenBSD.</td>
<td><a href="./iredadmin-pro.restful.api-20170123.html">RESTful API document</a></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic10996.html">2.4.0</a></td>
<td>May 3, 2016</td>
<td>With <strong>RESTful API</strong> support.</td>
<td><a href="./iredadmin-pro.restful.api-20170123.html">RESTful API document</a></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic10514.html">2.3.0</a></td>
<td>Jan 25, 2016</td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic10263.html">2.2.0</a></td>
<td>Dec 14, 2015</td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic9282.html">2.1</a></td>
<td>Jun 3, 2015</td>
<td>Bug fix release.</td>
<td></td>
</tr>
<tr>
<td>2.1.3</td>
<td>Jun 27, 2015</td>
<td>Bug fix release.</td>
<td></td>
</tr>
<tr>
<td>2.1.2</td>
<td>Jun 17, 2015</td>
<td>Bug fix release.</td>
<td></td>
</tr>
<tr>
<td>2.1.1</td>
<td>Jun 4, 2015</td>
<td>Bug fix release.</td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic9146.html">2.0</a></td>
<td>May 15, 2015</td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic8636.html">1.9.2</a></td>
<td>Feb 2, 2015</td>
<td>Bug fix release.</td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic8448.html">1.9.0</a></td>
<td>Jan 1, 2015</td>
<td>Self-service, deeper Amavisd integration, SSHA512/BCRYPT password hashes support.</td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic6924.html">1.8.2</a></td>
<td>May 16, 2014</td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic5912.html">1.8.1</a></td>
<td>Dec 30, 2013</td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic5834.html">1.8.0</a></td>
<td>Dec 16, 2013</td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic5169.html">1.7.0</a></td>
<td>July 16, 2013</td>
<td>Bug fix release.</td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic4649.html">1.6.0</a></td>
<td>March 26, 2013</td>
<td>Bug fix release.</td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic3920.html">1.5.0</a></td>
<td>Sept 19, 2012</td>
<td>Bug fix release.</td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/forum/topic3370.html">1.4.0</a></td>
<td>May 10, 2012</td>
<td>Bug fix release.</td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedAdmin-Pro/MySQL/1.3.1">1.3.1</a></td>
<td>Jan 10, 2012</td>
<td>Bug fix release.</td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedAdmin-Pro/MySQL/1.3.0">1.3.0</a></td>
<td>Aug 7, 2011</td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedAdmin-Pro/MySQL/1.2.1">1.2.1</a></td>
<td>June 26, 2011</td>
<td>Bug fix release.</td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedAdmin-Pro/MySQL/1.2.0">1.2.0</a></td>
<td>June 10, 2011</td>
<td>Security fix release.</td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedAdmin-Pro/MySQL/1.1.0">1.1.0</a></td>
<td>May 3, 2011</td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="http://www.iredmail.org/wiki/index.php?title=Release.Notes/iRedAdmin-Pro/MySQL/1.0">1.0</a></td>
<td>Feb 1, 2011</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>

File diff suppressed because it is too large Load Diff

View File

@ -19,12 +19,7 @@
<div class="toc">
<ul>
<li><a href="#iredadmin-pro-restful-api">iRedAdmin-Pro: RESTful API</a><ul>
<li><a href="#changelog">ChangeLog</a><ul>
<li><a href="#iredadmin-pro-sql-270-iredadmin-pro-ldap-290">iRedAdmin-Pro-SQL-2.7.0, iRedAdmin-Pro-LDAP-2.9.0</a></li>
</ul>
</li>
<li><a href="#summary">Summary</a></li>
<li><a href="#requirements">Requirements</a></li>
<li><a href="#enable-restful-api">Enable RESTful API</a></li>
<li><a href="#sample-code-to-interact-with-iredadmin-pro-restful-api">Sample code to interact with iRedAdmin-Pro RESTful API</a></li>
<li><a href="#apis">APIs</a><ul>
@ -43,6 +38,11 @@
</li>
</ul>
</li>
<li><a href="#changelog">ChangeLog</a><ul>
<li><a href="#iredadmin-pro-sql-270-iredadmin-pro-ldap-290">iRedAdmin-Pro-SQL-2.7.0, iRedAdmin-Pro-LDAP-2.9.0</a></li>
<li><a href="#iredadmin-pro-sql-260-iredadmin-pro-ldap-280">iRedAdmin-Pro-SQL-2.6.0, iRedAdmin-Pro-LDAP-2.8.0</a></li>
</ul>
</li>
</ul>
</li>
</ul>
@ -50,51 +50,14 @@
<div class="admonition attention">
<p class="admonition-title">Attention</p>
<ul>
<li>This document is applicable to <code>iRedAdmin-Pro-SQL-2.7.0</code> and
<code>iRedAdmin-Pro-LDAP-2.9.0</code>. If you're running an old release, please
upgrade iRedAdmin-Pro to the latest release, or check
<a href="./iredadmin-pro.releases.html">document for old releases</a>.</li>
<li>If you need an API which has not yet been implemented, don't hesitate to
<a href="../contact.html">contact us</a>.</li>
<li>This document is applicable to:<ul>
<li>iRedAdmin-Pro-SQL-2.7.0 (SQL edition)</li>
<li>iRedAdmin-Pro-LDAP-2.9.0 (LDAP edition)</li>
</ul>
</li>
<li>If you're looking for API document for old iRedAdmin-Pro releases, please
check <a href="./iredadmin-pro.releases.html">this document</a>.</li>
</ul>
</div>
<h2 id="changelog">ChangeLog</h2>
<h3 id="iredadmin-pro-sql-270-iredadmin-pro-ldap-290">iRedAdmin-Pro-SQL-2.7.0, iRedAdmin-Pro-LDAP-2.9.0</h3>
<ul>
<li>New: Able to manage global, per-domain and per-user greylisting settings,
whitelist senders, and global whitelisted SPF domains.</li>
<li>iRedAdmin-Pro-SQL-2.7.0:<ul>
<li>Variable names changed in returned JSON data of user profile (<code>GET /api/user/&lt;mail&gt;</code>):<ul>
<li>name <code>forwarding</code> is replaced by <code>forwardings</code>, and it's now a list
object of user forwarding email addresses (was a string, multiple
addresses were separated by comma).</li>
</ul>
</li>
<li>Variable names in returned JSON data of mail alias profile (<code>GET /api/alias/&lt;mail&gt;</code>):<ul>
<li>name <code>islist</code> is gone.</li>
<li>name <code>goto</code> is replaced by <code>members</code>, and it's now a list object of
member email addresses (was a string, multiple addresses were separated
by comma).</li>
</ul>
</li>
<li>Variable names in returned JSON data of domain profile (<code>GET /api/domain/&lt;domain&gt;</code>):<ul>
<li>name <code>catchall</code> always presents, and it's now a list object of catch-all
email address (was a string, multiple addresses were separated by comma).</li>
</ul>
</li>
<li>Fixed bugs:<ul>
<li>Cannot set per-user alias addresses while creating new mail user.</li>
<li>Cannot add or remove per-user alias addresses while updating user profile.</li>
<li>User mailbox quota was removed while updating user profile.</li>
<li>Not use default transport setting while creating new domain.</li>
</ul>
</li>
</ul>
</li>
</ul>
<h2 id="summary">Summary</h2>
<p>iRedAdmin-Pro RESTful API will return message in JSON format.</p>
<ul>
@ -105,11 +68,6 @@
</li>
<li>If operation failed, it returns JSON data: <code>{'_success': false, '_msg': '&lt;error_reason&gt;'}</code>.</li>
</ul>
<h2 id="requirements">Requirements</h2>
<p>This document is applicable to the latest iRedAdmin-Pro-LDAP-2.7.0 and iRedAdmin-Pro-SQL-2.5.0.</p>
<ul>
<li><a href="./iredadmin-pro.restful.api-20170123.html">RESTful API document for iRedAdmin-Pro-LDAP-2.7.0 or iRedAdmin-Pro-SQL-2.5.0</a>, released on Jan 23, 2017.</li>
</ul>
<h2 id="enable-restful-api">Enable RESTful API</h2>
<p>RESTful API is disabled by default, to enable it, please add setting below in
iRedAdmin-Pro config file <code>settings.py</code>:</p>
@ -1540,6 +1498,51 @@ please use mail alias account as mailing list.</p>
<div class="admonition api">
<p class="admonition-title"><code class="get">GET</code> <code class="url">/api/ldif/alias/&lt;mail&gt;</code> <code class="comment">Export mail alias account to LDIF</code></p>
</div>
<h2 id="changelog">ChangeLog</h2>
<h3 id="iredadmin-pro-sql-270-iredadmin-pro-ldap-290">iRedAdmin-Pro-SQL-2.7.0, iRedAdmin-Pro-LDAP-2.9.0</h3>
<ul>
<li>New: Able to manage global, per-domain and per-user greylisting settings,
whitelist senders, and global whitelisted SPF domains.</li>
<li>iRedAdmin-Pro-SQL-2.7.0:<ul>
<li>Variable names changed in returned JSON data of user profile (<code>GET /api/user/&lt;mail&gt;</code>):<ul>
<li>name <code>forwarding</code> is replaced by <code>forwardings</code>, and it's now a list
object of user forwarding email addresses (was a string, multiple
addresses were separated by comma).</li>
</ul>
</li>
<li>Variable names in returned JSON data of mail alias profile (<code>GET /api/alias/&lt;mail&gt;</code>):<ul>
<li>name <code>islist</code> is gone.</li>
<li>name <code>goto</code> is replaced by <code>members</code>, and it's now a list object of
member email addresses (was a string, multiple addresses were separated
by comma).</li>
</ul>
</li>
<li>Variable names in returned JSON data of domain profile (<code>GET /api/domain/&lt;domain&gt;</code>):<ul>
<li>name <code>catchall</code> always presents, and it's now a list object of catch-all
email address (was a string, multiple addresses were separated by comma).</li>
</ul>
</li>
<li>Fixed bugs:<ul>
<li>Cannot set per-user alias addresses while creating new mail user.</li>
<li>Cannot add or remove per-user alias addresses while updating user profile.</li>
<li>User mailbox quota was removed while updating user profile.</li>
<li>Not use default transport setting while creating new domain.</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3 id="iredadmin-pro-sql-260-iredadmin-pro-ldap-280">iRedAdmin-Pro-SQL-2.6.0, iRedAdmin-Pro-LDAP-2.8.0</h3>
<ul>
<li>Variable names in returned JSON data has been changed to:
<code>{'_success': ..., '_msg': ...}</code> (was <code>{'success': ..., 'msg': ...}</code>).</li>
<li>Some variable names have been renamed:<ul>
<li><code>cn</code> -&gt; <code>name</code>.</li>
<li><code>mailQuota</code> -&gt; <code>quota</code></li>
<li><code>preferredLanguage</code> -&gt; <code>language</code></li>
</ul>
</li>
</ul>
<script src="./js/jquery-1.12.3.min.js"></script>
<script type="text/javascript">