http://git-wip-us.apache.org/repos/asf/james-site/blob/e4e14366/content/server/manage-webadmin.html ---------------------------------------------------------------------- diff --git a/content/server/manage-webadmin.html b/content/server/manage-webadmin.html index cfe99b1..713ab09 100644 --- a/content/server/manage-webadmin.html +++ b/content/server/manage-webadmin.html @@ -18,7 +18,7 @@ under the License. --> - + @@ -36,7 +36,7 @@ - + @@ -74,7 +74,7 @@
- Last Published: 2018-06-07 + Last Published: 2018-07-05
Home | @@ -105,7 +105,7 @@ -
  • +
  • Server
  • +

    Also be aware that, in case things go wrong, all endpoints might return a 500 internal error (with a JSON body formatted as exposed above). To avoid information duplication, this is ommited on endpoint specific documentation.

    Navigation menu

    Administrating domains

    Create a domain

    @@ -313,8 +318,6 @@
  • 204: The domain was successfully added
  • 400: The domain name is invalid
  • - -
  • 500: Internal error while adding the domain
  • Delete a domain

    @@ -328,8 +331,6 @@

    Test if a domain exists

    @@ -345,8 +346,6 @@
  • 204: The domain exists
  • 404: The domain does not exist
  • - -
  • 500: Internal error while accessing the domains
  • Get the list of domains

    @@ -366,21 +365,19 @@

    Administrating users

    Create a user

    @@ -408,8 +405,6 @@
  • 400: The user name or the payload is invalid
  • 409: Conflict: A concurrent modification make that query to fail
  • - -
  • 500: Internal error while adding the user
  • Note: if the user is already, its password will be updated.

    @@ -428,8 +423,6 @@

    Retrieving the user list

    @@ -449,23 +442,21 @@

    Administrating user mailboxes

    Creating a mailbox

    @@ -510,8 +501,6 @@
  • 400: Invalid mailbox name
  • 404: The user name does not exist
  • - -
  • 500: Internal error
  • Testing existence of a mailbox

    @@ -530,8 +519,6 @@
  • 400: Invalid mailbox name
  • 404: The user name does not exist, the mailbox does not exist
  • - -
  • 500: Internal error
  • Listing user mailboxes

    @@ -554,8 +541,6 @@
  • 200: The mailboxes list was successfully retrieved
  • 404: The user name does not exist
  • - -
  • 500: Internal error
  • Deleting user mailboxes

    @@ -572,31 +557,29 @@
  • 204: The user do not have mailboxes anymore
  • 404: The user name does not exist
  • - -
  • 500: Internal error
  • Administrating quotas by users

    Getting the quota for a user

    @@ -668,8 +651,6 @@
  • 200: The user’s quota was successfully retrieved
  • 404: The user does not exist
  • - -
  • 500: Internal error while accessing the user’s quota
  • Updating the quota for a user

    @@ -700,8 +681,6 @@
  • 404: The user does not exist
  • 409: The requested restriction can’t be enforced right now.
  • - -
  • 500: Internal server error - Something went bad on the server side.
  • Getting the quota count for a user

    @@ -724,8 +703,6 @@
  • 200: The user’s quota was successfully retrieved
  • 404: The user does not exist
  • - -
  • 500: Internal error while accessing the user’s quota
  • Updating the quota count for a user

    @@ -752,8 +729,6 @@
  • 404: The user does not exist
  • 409: The requested restriction can’t be enforced right now.
  • - -
  • 500: Internal server error - Something went bad on the server side.
  • Deleting the quota count for a user

    @@ -774,8 +749,6 @@
  • 404: The user does not exist
  • 409: The requested restriction can’t be enforced right now.
  • - -
  • 500: Internal server error - Something went bad on the server side.
  • Getting the quota size for a user

    @@ -798,8 +771,6 @@
  • 200: The user’s quota was successfully retrieved
  • 404: The user does not exist
  • - -
  • 500: Internal error while accessing the user’s quota
  • Updating the quota size for a user

    @@ -826,8 +797,6 @@
  • 404: The user does not exist
  • 409: The requested restriction can’t be enforced right now.
  • - -
  • 500: Internal server error - Something went bad on the server side.
  • Deleting the quota size for a user

    @@ -848,8 +817,6 @@
  • 404: The user does not exist
  • 409: The requested restriction can’t be enforced right now.
  • - -
  • 500: Internal server error - Something went bad on the server side.
  • Searching user by quota ratio

    @@ -919,29 +886,27 @@
  • 200: List of users had successfully been returned.
  • 400: Validation issues with parameters
  • - -
  • 500: Internal server error - Something went bad on the server side.
  • Administrating quotas by domains

    Getting the quota for a domain

    @@ -956,7 +921,35 @@
    curl -XGET http://ip:port/quota/domains/james.org
     
    -

    The answer can contain a fixed value, an empty value (null) or an unlimited value (-1):

    +

    The answer will detail the default quota applied to users belonging to that domain:

    + +
    +
    +
    {
    +  "global": {
    +    "count":252,
    +    "size":null
    +  },
    +  "domain": {
    +    "count":null,
    +    "size":142
    +  },
    +  "computed": {
    +    "count":252,
    +    "size":142
    +  }
    +}
    +
    + + +

    Note that quota object can contain a fixed value, an empty value (null) or an unlimited value (-1):

    @@ -975,8 +968,6 @@
  • 404: The domain does not exist
  • 405: Domain Quota configuration not supported when virtual hosting is desactivated.
  • - -
  • 500: Internal error while accessing the domain’s quota
  • Updating the quota for a domain

    @@ -1009,8 +1000,6 @@
  • 405: Domain Quota configuration not supported when virtual hosting is desactivated.
  • 409: The requested restriction can’t be enforced right now.
  • - -
  • 500: Internal server error - Something went bad on the server side.
  • Getting the quota count for a domain

    @@ -1065,8 +1054,6 @@
  • 405: Domain Quota configuration not supported when virtual hosting is desactivated.
  • 409: The requested restriction can’t be enforced right now.
  • - -
  • 500: Internal server error - Something went bad on the server side.
  • Deleting the quota count for a domain

    @@ -1115,8 +1102,6 @@
  • 404: The domain does not exist
  • 405: Domain Quota configuration not supported when virtual hosting is desactivated.
  • - -
  • 500: Internal error while accessing the domain’s quota
  • Updating the quota size for a domain

    @@ -1175,21 +1160,21 @@

    Getting the global quota

    @@ -1223,8 +1208,6 @@
    • 200: The quota was successfully retrieved
    • - -
    • 500: Internal error while accessing quota

    Updating global quota

    @@ -1250,8 +1233,6 @@
  • 204: The quota has been updated
  • 400: The body is not a positive integer neither an unlimited value (-1).
  • - -
  • 500: Internal server error - Something went bad on the server side.
  • Getting the global quota count

    @@ -1272,8 +1253,6 @@
    • 200: The quota was successfully retrieved
    • - -
    • 500: Internal error while accessing the quota

    Updating the global quota count

    @@ -1295,8 +1274,6 @@
  • 204: The quota has been updated
  • 400: The body is not a positive integer neither an unlimited value (-1).
  • - -
  • 500: Internal server error - Something went bad on the server side.
  • Deleting the global quota count

    @@ -1317,8 +1294,6 @@
  • 404: The user does not exist
  • 409: The requested restriction can’t be enforced right now.
  • - -
  • 500: Internal server error - Something went bad on the server side.
  • Getting the global quota size

    @@ -1338,8 +1313,6 @@
    • 200: The quota was successfully retrieved
    • - -
    • 500: Internal error while accessing the quota

    Updating the global quota size

    @@ -1363,8 +1336,6 @@
  • 400: The body is not a positive integer neither an unlimited value (-1).
  • 409: The requested restriction can’t be enforced right now.
  • - -
  • 500: Internal server error - Something went bad on the server side.
  • Deleting the global quota size

    @@ -1382,8 +1353,6 @@
  • 400: The body is not a positive integer neither an unlimited value (-1).
  • 409: The requested restriction can’t be enforced right now.
  • - -
  • 500: Internal server error - Something went bad on the server side.
  • Cassandra Schema upgrades

    @@ -1395,13 +1364,13 @@

    Retrieving current Cassandra schema version

    @@ -1422,8 +1391,6 @@
    • 200: Success
    • - -
    • 500: Internal error

    Retrieving latest available Cassandra schema version

    @@ -1444,8 +1411,6 @@
    • 200: Success
    • - -
    • 500: Internal error

    Upgrading to a specific version

    @@ -1469,8 +1434,6 @@
  • 400: The version is invalid. The version should be a strictly positive number.
  • 410: Error while planning this migration. This resource is gone away. Reason is mentionned in the body.
  • - -
  • 500: Internal error while creating the migration task.
  • Note that several calls to this endpoint will be run in a sequential pattern.

    If the server restarts during the migration, the migration is silently aborted.

    @@ -1511,8 +1474,6 @@
  • 200: Success. The scheduled task taskId is returned.
  • 410: Error while planning this migration. This resource is gone away. Reason is mentionned in the body.
  • - -
  • 500: Internal error while creating the migration task.
  • Note that several calls to this endpoint will be run in a sequential pattern.

    If the server restarts during the migration, the migration is silently aborted.

    @@ -1588,13 +1549,13 @@

    Listing groups

    @@ -1614,8 +1575,6 @@
    • 200: Success
    • - -
    • 500: Internal error

    Listing members of a group

    @@ -1639,8 +1598,6 @@
  • 400: Group structure is not valid
  • 404: The group does not exist
  • - -
  • 500: Internal error
  • Adding a group member

    @@ -1654,15 +1611,13 @@
      -
    • 200: Success
    • +
    • 204: Success
    • 400: Group structure or member is not valid
    • 403: Server does not own the requested domain
    • 409: Requested group address is already used for another purpose
    • - -
    • 500: Internal error

    Removing a group member

    @@ -1676,11 +1631,9 @@
      -
    • 200: Success
    • +
    • 204: Success
    • 400: Group structure or member is not valid
    • - -
    • 500: Internal error

    Creating address forwards

    @@ -1693,13 +1646,13 @@

    Listing Forwards

    @@ -1719,8 +1672,6 @@
    • 200: Success
    • - -
    • 500: Internal error

    Listing destinations in a forward

    @@ -1747,8 +1698,6 @@
  • 400: Forward structure is not valid
  • 404: The given user don’t have forwards or does not exist
  • - -
  • 500: Internal error
  • Adding a new destination to a forward

    @@ -1762,15 +1711,13 @@
      -
    • 200: Success
    • +
    • 204: Success
    • 400: Forward structure or member is not valid
    • 403: Server does not own the requested domain
    • 404: Requested forward address does not match an existing user
    • - -
    • 500: Internal error

    Removing a destination of a forward

    @@ -1784,34 +1731,53 @@
      -
    • 200: Success
    • +
    • 204: Success
    • 400: Forward structure or member is not valid
    • - -
    • 500: Internal error

    Administrating mail repositories

    +

    Create a mail repository

    + +
    +
    +
    curl -XPUT http://ip:port/mailRepositories/encodedPathOfTheRepository?protocol=someProtocol
    +
    +

    Resource name encodedPathOfTheRepository should be the resource path of the created mail repository. Example:

    + +
    +
    +
    curl -XPUT http://ip:port/mailRepositories/mailRepo?protocol=file
    +
    +

    Response codes:

    + +
      + +
    • 204: The repository is created
    • +
    +

    Listing mail repositories

    @@ -1824,20 +1790,20 @@
    [
         {
    -        "repository": "file://var/mail/error/",
    -        "id": "file%3A%2F%2Fvar%2Fmail%2Ferror%2F"
    +        "repository": "var/mail/error/",
    +        "path": "var%2Fmail%2Ferror%2F"
         },
         {
    -        "repository": "file://var/mail/relay-denied/",
    -        "id": "file%3A%2F%2Fvar%2Fmail%2Frelay-denied%2F"
    +        "repository": "var/mail/relay-denied/",
    +        "path": "var%2Fmail%2Frelay-denied%2F"
         },
         {
    -        "repository": "file://var/mail/spam/",
    -        "id": "file%3A%2F%2Fvar%2Fmail%2Fspam%2F"
    +        "repository": "var/mail/spam/",
    +        "path": "var%2Fmail%2Fspam%2F"
         },
         {
    -        "repository": "file://var/mail/address-error/",
    -        "id": "file%3A%2F%2Fvar%2Fmail%2Faddress-error%2F"
    +        "repository": "var/mail/address-error/",
    +        "path": "var%2Fmail%2Faddress-error%2F"
         }
     ]
     
    @@ -1847,29 +1813,27 @@
    • 200: The list of mail repositories
    • - -
    • 500: Internal error

    Getting additional information for a mail repository

    -
    curl -XGET http://ip:port/mailRepositories/encodedUrlOfTheRepository/
    +
    curl -XGET http://ip:port/mailRepositories/encodedPathOfTheRepository/
     
    -

    Resource name encodedUrlOfTheRepository should be the resource id of an existing mail repository. Example:

    +

    Resource name encodedPathOfTheRepository should be the resource path of an existing mail repository. Example:

    -
    curl -XGET http://ip:port/mailRepositories/file%3A%2F%2Fvar%2Fmail%2Ferror%2F/
    +
    curl -XGET http://ip:port/mailRepositories/var%2Fmail%2Ferror%2F/
     

    The answer looks like:

    {
    -   "repository": "file://var/mail/error/",
    -   "id": "file%3A%2F%2Fvar%2Fmail%2Ferror%2F",
    +   "repository": "var/mail/error/",
    +   "path": "mail%2Ferror%2F",
        "size": 243
     }
     
    @@ -1880,21 +1844,19 @@
  • 200: Additonnal information for that repository
  • 404: This repository can not be found
  • - -
  • 500: Internal error
  • Listing mails contained in a mail repository

    -
    curl -XGET http://ip:port/mailRepositories/encodedUrlOfTheRepository/mails
    +
    curl -XGET http://ip:port/mailRepositories/encodedPathOfTheRepository/mails
     
    -

    Resource name encodedUrlOfTheRepository should be the resource id of an existing mail repository. Example:

    +

    Resource name encodedPathOfTheRepository should be the resource path of an existing mail repository. Example:

    -
    curl -XGET http://ip:port/mailRepositories/file%3A%2F%2Fvar%2Fmail%2Ferror%2F/mails
    +
    curl -XGET http://ip:port/mailRepositories/var%2Fmail%2Ferror%2F/mails
     

    The answer will contains all mailKey contained in that repository.

    @@ -1912,7 +1874,7 @@
    -
    curl -XGET http://ip:port/mailRepositories/file%3A%2F%2Fvar%2Fmail%2Ferror%2F/mails?limit=100&offset=500
    +
    curl -XGET http://ip:port/mailRepositories/var%2Fmail%2Ferror%2F/mails?limit=100&offset=500
     

    Response codes:

    @@ -1923,23 +1885,21 @@
  • 400: Invalid parameters
  • 404: This repository can not be found
  • - -
  • 500: Internal error
  • -

    Reading a mail details

    +

    Reading/downloading a mail details

    -
    curl -XGET http://ip:port/mailRepositories/encodedUrlOfTheRepository/mails/mailKey
    +
    curl -XGET http://ip:port/mailRepositories/encodedPathOfTheRepository/mails/mailKey
     
    -

    Resource name encodedUrlOfTheRepository should be the resource id of an existing mail repository. Resource name mailKey should be the key of a mail stored in that repository. Example:

    +

    Resource name encodedPathOfTheRepository should be the resource path of an existing mail repository. Resource name mailKey should be the key of a mail stored in that repository. Example:

    -
    curl -XGET http://ip:port/mailRepositories/file%3A%2F%2Fvar%2Fmail%2Ferror%2F/mails/mail-key-1
    +
    curl -XGET http://ip:port/mailRepositories/var%2Fmail%2Ferror%2F/mails/mail-key-1
     
    -

    Response looks like:

    +

    If the Accept header in the request is “application/json”, then the response looks like:

    @@ -1948,7 +1908,61 @@ "sender": "sender@domain.com", "recipients": ["recipient1@domain.com", "recipient2@domain.com"], "state": "address-error", - "error": "A small message explaining what happened to that mail..." + "error": "A small message explaining what happened to that mail...", + "remoteHost": "111.222.333.444", + "remoteAddr": "127.0.0.1", + "lastUpdated": null +} +
    +

    If the Accept header in the request is “message/rfc822”, then the response will be the eml file itself.

    +

    Additional query parameter additionalFields add the existing informations to the response for the supported values: - attributes - headers - textBody - htmlBody - messageSize - perRecipientsHeaders

    + +
    +
    +
    curl -XGET http://ip:port/mailRepositories/file%3A%2F%2Fvar%2Fmail%2Ferror%2F/mails/mail-key-1?additionalFields=attributes,headers,textBody,htmlBody,messageSize,perRecipientsHeaders
    +
    +

    Give the following kind of response:

    + +
    +
    +
    {
    +    "name": "mail-key-1",
    +    "sender": "sender@domain.com",
    +    "recipients": ["recipient1@domain.com", "recipient2@domain.com"],
    +    "state": "address-error",
    +    "error": "A small message explaining what happened to that mail...",
    +    "remoteHost": "111.222.333.444",
    +    "remoteAddr": "127.0.0.1",
    +    "lastUpdated": null,
    +    "attributes": {
    +      "name2": "value2",
    +      "name1": "value1"
    +    },
    +    "perRecipientsHeaders": {
    +      "third@party": {
    +        "headerName1": [
    +          "value1",
    +          "value2"
    +        ],
    +        "headerName2": [
    +          "value3",
    +          "value4"
    +        ]
    +      }
    +    },
    +    "headers": {
    +      "headerName4": [
    +        "value6",
    +        "value7"
    +      ],
    +      "headerName3": [
    +        "value5",
    +        "value8"
    +      ]
    +    },
    +    "textBody": "My body!!",
    +    "htmlBody": "My <em>body</em>!!",
    +    "messageSize": 42424242
     }
     

    Response codes:

    @@ -1958,21 +1972,19 @@
  • 200: Details of the mail
  • 404: This repository or mail can not be found
  • - -
  • 500: Internal error
  • Removing a mail from a mail repository

    -
    curl -XDELETE http://ip:port/mailRepositories/encodedUrlOfTheRepository/mails/mailKey
    +
    curl -XDELETE http://ip:port/mailRepositories/encodedPathOfTheRepository/mails/mailKey
     
    -

    Resource name encodedUrlOfTheRepository should be the resource id of an existing mail repository. Resource name mailKey should be the key of a mail stored in that repository. Example:

    +

    Resource name encodedPathOfTheRepository should be the resource path of an existing mail repository. Resource name mailKey should be the key of a mail stored in that repository. Example:

    -
    curl -XDELETE http://ip:port/mailRepositories/file%3A%2F%2Fvar%2Fmail%2Ferror%2F/mails/mail-key-1
    +
    curl -XDELETE http://ip:port/mailRepositories/var%2Fmail%2Ferror%2F/mails/mail-key-1
     

    Response codes:

    @@ -1981,21 +1993,19 @@
  • 204: This mail no longer exists in this repository
  • 404: This repository can not be found
  • - -
  • 500: Internal error
  • Removing all mails from a mail repository

    -
    curl -XDELETE http://ip:port/mailRepositories/encodedUrlOfTheRepository/mails
    +
    curl -XDELETE http://ip:port/mailRepositories/encodedPathOfTheRepository/mails
     
    -

    Resource name encodedUrlOfTheRepository should be the resource id of an existing mail repository. Example:

    +

    Resource name encodedPathOfTheRepository should be the resource path of an existing mail repository. Example:

    -
    curl -XDELETE http://ip:port/mailRepositories/file%3A%2F%2Fvar%2Fmail%2Ferror%2F/mails
    +
    curl -XDELETE http://ip:port/mailRepositories/var%2Fmail%2Ferror%2F/mails
     

    The response to that request will be the scheduled taskId :

    @@ -2021,15 +2031,13 @@
  • 201: Success. Corresponding task id is returned.
  • 404: Could not find that mail repository
  • - -
  • 500: Internal error
  • The scheduled task will have the following type clearMailRepository and the following additionalInformation:

    {
    -  "repositoryUrl":"file://var/mail/error/",
    +  "repositoryPath":"var/mail/error/",
       "initialCount": 243,
       "remainingCount": 17
     }
    @@ -2041,21 +2049,21 @@
     
     
    -
    curl -XPATCH http://ip:port/mailRepositories/encodedUrlOfTheRepository/mails?action=reprocess
    +
    curl -XPATCH http://ip:port/mailRepositories/encodedPathOfTheRepository/mails?action=reprocess
     
    -

    Resource name encodedUrlOfTheRepository should be the resource id of an existing mail repository. Example:

    +

    Resource name encodedPathOfTheRepository should be the resource path of an existing mail repository. Example:

    For instance:

    -
    curl -XPATCH http://ip:port/mailRepositories/file%3A%2F%2Fvar%2Fmail%2Ferror%2F/mails?action=reprocess
    +
    curl -XPATCH http://ip:port/mailRepositories/var%2Fmail%2Ferror%2F/mails?action=reprocess
     

    Additional query paramaters are supported: - queue allow you to target the mail queue you want to enqueue the mails in. - processor allow you to overwrite the state of the reprocessing mails, and thus select the processors they will start their processing in.

    For instance:

    -
    curl -XPATCH http://ip:port/mailRepositories/file%3A%2F%2Fvar%2Fmail%2Ferror%2F/mails?action=reprocess&processor=transport&queue=spool
    +
    curl -XPATCH http://ip:port/mailRepositories/var%2Fmail%2Ferror%2F/mails?action=reprocess&processor=transport&queue=spool
     

    Note that the action query parameter is compulsary and can only take value reprocess.

    The response to that request will be the scheduled taskId :

    @@ -2082,15 +2090,13 @@
  • 201: Success. Corresponding task id is returned.
  • 404: Could not find that mail repository
  • - -
  • 500: Internal error
  • The scheduled task will have the following type reprocessingAllTask and the following additionalInformation:

    {
    -  "repositoryUrl":"file://var/mail/error/",
    +  "repositoryPath":"var/mail/error/",
       "targetQueue":"spool",
       "targetProcessor":"transport",
       "initialCount": 243,
    @@ -2103,21 +2109,21 @@
     
     
    -
    curl -XPATCH http://ip:port/mailRepositories/encodedUrlOfTheRepository/mails/mailKey?action=reprocess
    +
    curl -XPATCH http://ip:port/mailRepositories/encodedPathOfTheRepository/mails/mailKey?action=reprocess
     
    -

    Resource name encodedUrlOfTheRepository should be the resource id of an existing mail repository. Resource name mailKey should be the key of a mail stored in that repository. Example:

    +

    Resource name encodedPathOfTheRepository should be the resource id of an existing mail repository. Resource name mailKey should be the key of a mail stored in that repository. Example:

    For instance:

    -
    curl -XPATCH http://ip:port/mailRepositories/file%3A%2F%2Fvar%2Fmail%2Ferror%2F/mails/name1?action=reprocess
    +
    curl -XPATCH http://ip:port/mailRepositories/var%2Fmail%2Ferror%2F/mails/name1?action=reprocess
     

    Additional query paramaters are supported: - queue allow you to target the mail queue you want to enqueue the mails in. - processor allow you to overwrite the state of the reprocessing mails, and thus select the processors they will start their processing in.

    For instance:

    -
    curl -XPATCH http://ip:port/mailRepositories/file%3A%2F%2Fvar%2Fmail%2Ferror%2F/mails/name1?action=reprocess&processor=transport&queue=spool
    +
    curl -XPATCH http://ip:port/mailRepositories/var%2Fmail%2Ferror%2F/mails/name1?action=reprocess&processor=transport&queue=spool
     

    Note that the action query parameter is compulsary and can only take value reprocess.

    The response to that request will be the scheduled taskId :

    @@ -2144,15 +2150,13 @@
  • 201: Success. Corresponding task id is returned.
  • 404: Could not find that mail repository
  • - -
  • 500: Internal error
  • The scheduled task will have the following type reprocessingOneTask and the following additionalInformation:

    {
    -  "repositoryUrl":"file://var/mail/error/",
    +  "repositoryPath":"var/mail/error/",
       "targetQueue":"spool",
       "targetProcessor":"transport",
       "mailKey":"name1"
    @@ -2163,17 +2167,17 @@
     
     
     

    Listing mail queues

    @@ -2192,9 +2196,7 @@
      -
    • 200: The list of mail queuess
    • - -
    • 500: Internal error
    • +
    • 200: The list of mail queues

    Getting a mail queue details

    @@ -2218,8 +2220,6 @@
  • 400: Mail queue is not valid
  • 404: The mail queue does not exist
  • - -
  • 500: Internal error
  • Listing the mails of a mail queue

    @@ -2259,8 +2259,6 @@
  • 400: Mail queue is not valid or limit is invalid
  • 404: The mail queue does not exist
  • - -
  • 500: Internal error
  • Deleting mails from a mail queue

    @@ -2289,8 +2287,6 @@
  • 400: Invalid request
  • 404: The mail queue does not exist
  • - -
  • 500: Internal error
  • The scheduled task will have the following type deleteMailsFromMailQueue and the following additionalInformation:

    @@ -2322,8 +2318,6 @@
  • 400: Invalid request
  • 404: The mail queue does not exist
  • - -
  • 500: Internal error
  • The scheduled task will have the following type clearMailQueue and the following additionalInformation:

    @@ -2354,23 +2348,231 @@
  • 400: Invalid request
  • 404: The mail queue does not exist
  • +
    +
    +

    Administrating DLP Configuration

    +

    DLP (stands for Data Leak Prevention) is supported by James. A DLP matcher will, on incoming emails, execute regular expressions on email sender, recipients or content, in order to report suspicious emails to an administrator. WebAdmin can be used to manage these DLP rules on a per senderDomain basis.

    +

    senderDomain is domain of the sender of incoming emails, for example: apache.org, james.org,… Each senderDomain correspond to a distinct DLP configuration.

    + + +
    +

    List DLP configuration by sender domain

    +

    Retrieve a DLP configuration for corresponding senderDomain, a configuration contains list of configuration items

    + +
    +
    +
    curl -XGET http://ip:port/dlp/rules/senderDomain
    +
    +

    Response codes:

    + +
      + +
    • 200: A list of dlp configuration items is returned
    • + +
    • 400: Invalid senderDomain or payload in request
    • + +
    • 404: The domain does not exist.
    • +
    +

    This is an example of returned body. The rules field is a list of rules as described below.

    + +
    +
    +
    {"rules : [
    +  {
    +    "id": "1",
    +    "expression": "james.org",
    +    "explanation": "Find senders or recipients containing james[any char]org",
    +    "targetsSender": true,
    +    "targetsRecipients": true,
    +    "targetsContent": false
    +  },
    +  {
    +    "id": "2",
    +    "expression": "Find senders containing apache[any char]org",
    +    "explanation": "apache.org",
    +    "targetsSender": true,
    +    "targetsRecipients": false,
    +    "targetsContent": false
    +  }
    +]}
    +
    +
    +

    Store DLP configuration by sender domain

    +

    Store a DLP configuration for corresponding senderDomain, if any item of DLP configuration in the request is stored before, it will not be stored anymore

    + +
    +
    +
    curl -XPUT http://ip:port/dlp/rules/senderDomain
    +
    +

    The body can contain a list of DLP configuration items formed by those fields: - id(String) is mandatory, unique identifier of the configuration item - expression(String) is mandatory, regular expression to match contents of targets - explanation(String) is optional, description of the configuration item - targetsSender(boolean) is optional and defaults to false. If true, expression will be applied to Sender and to From headers of the mail - targetsContent(boolean) is optional and defaults to false. If true, expression will be applied to Subject headers and textual bodies (text/plain and text/html) of the mail - targetsRecipients(boolean) is optional and defaults to false. If true, expression will be applied to recipients of the mail

    +

    This is an example of returned body. The rules field is a list of rules as described below.

    + +
    +
    +
    {"rules": [
    +  {
    +    "id": "1",
    +    "expression": "james.org",
    +    "explanation": "Find senders or recipients containing james[any char]org",
    +    "targetsSender": true,
    +    "targetsRecipients": true,
    +    "targetsContent": false
    +  },
    +  {
    +    "id": "2",
    +    "expression": "Find senders containing apache[any char]org",
    +    "explanation": "apache.org",
    +    "targetsSender": true,
    +    "targetsRecipients": false,
    +    "targetsContent": false
    +  }
    +]}
    +
    +

    Response codes:

    + +
      + +
    • 204: List of dlp configuration items is stored
    • + +
    • 400: Invalid senderDomain or payload in request
    • + +
    • 404: The domain does not exist.
    • +
    +
    +

    Remove DLP configuration by sender domain

    +

    Remove a DLP configuration for corresponding senderDomain

    + +
    +
    +
    curl -XDELETE http://ip:port/dlp/rules/senderDomain
    +
    +

    Response codes:

    + +
      + +
    • 204: DLP configuration is removed
    • + +
    • 400: Invalid senderDomain or payload in request
    • + +
    • 404: The domain does not exist.
    +

    Administrating Sieve quotas

    +

    Some limitations on space Users Sieve script can occupy can be configured by default, and overridden by user.

    + + +
    +

    Retrieving global sieve quota

    +

    This endpoints allows to retrieve the global Sieve quota, which will be users default:

    + +
    +
    +
    curl -XGET http://ip:port/sieve/quota/default
    +
    +

    Will return the bytes count allowed by user per default on this server.

    + +
    +
    +
    102400
    +
    +

    Response codes: - 200: Request is a success and the value is returned - 204: No default quota is being configured

    +
    +

    Updating global sieve quota

    +

    This endpoints allows to update the global Sieve quota, which will be users default:

    + +
    +
    +
    curl -XPUT http://ip:port/sieve/quota/default
    +
    +

    With the body being the bytes count allowed by user per default on this server.

    + +
    +
    +
    102400
    +
    +

    Response codes: - 204: Operation succeeded - 400: Invalid payload

    +
    +

    Removing global sieve quota

    +

    This endpoints allows to remove the global Sieve quota. There will no more be users default:

    + +
    +
    +
    curl -XDELETE http://ip:port/sieve/quota/default
    +
    +

    Response codes: - 204: Operation succeeded

    +
    +

    Retrieving user sieve quota

    +

    This endpoints allows to retrieve the Sieve quota of a user, which will be this users quota:

    + +
    +
    +
    curl -XGET http://ip:port/sieve/quota/users/user@domain.com
    +
    +

    Will return the bytes count allowed for this user.

    + +
    +
    +
    102400
    +
    +

    Response codes: - 200: Request is a success and the value is returned - 204: No quota is being configured for this user

    +
    +

    Updating user sieve quota

    +

    This endpoints allows to update the Sieve quota of a user, which will be users default:

    + +
    +
    +
    curl -XPUT http://ip:port/sieve/quota/users/user@domain.com
    +
    +

    With the body being the bytes count allowed for this user on this server.

    + +
    +
    +
    102400
    +
    +

    Response codes: - 204: Operation succeeded - 400: Invalid payload

    +
    +

    Removing user sieve quota

    +

    This endpoints allows to remove the Sieve quota of a user. There will no more quota for this userrrrrrr:

    + +
    +
    +
    curl -XDELETE http://ip:port/sieve/quota/users/user@domain.com
    +
    +

    Response codes: - 204: Operation succeeded

    +

    Task management

    Some webadmin features schedules tasks. The task management API allow to monitor and manage the execution of the following tasks.

    Note that the taskId used in the following APIs is returned by other WebAdmin APIs scheduling tasks.

    Getting a task details

    http://git-wip-us.apache.org/repos/asf/james-site/blob/e4e14366/content/server/manage.html ---------------------------------------------------------------------- diff --git a/content/server/manage.html b/content/server/manage.html index 1295a79..530eca4 100644 --- a/content/server/manage.html +++ b/content/server/manage.html @@ -18,7 +18,7 @@ under the License. --> - + @@ -36,7 +36,7 @@ - + @@ -74,7 +74,7 @@
    - Last Published: 2018-06-07 + Last Published: 2018-07-05
    Home | @@ -105,7 +105,7 @@ -
  • +
  • Server
    • @@ -114,7 +114,7 @@
    • Objectives
    • -
    • +
    • User Manual
        -
      • http://git-wip-us.apache.org/repos/asf/james-site/blob/e4e14366/content/server/metrics.html ---------------------------------------------------------------------- diff --git a/content/server/metrics.html b/content/server/metrics.html index d79422b..1992baf 100644 --- a/content/server/metrics.html +++ b/content/server/metrics.html @@ -18,7 +18,7 @@ under the License. --> - + @@ -36,7 +36,7 @@ - + @@ -74,7 +74,7 @@
        - Last Published: 2018-06-07 + Last Published: 2018-07-05
        Home | @@ -105,7 +105,7 @@
      • -
      • +
      • Server
        • @@ -114,7 +114,7 @@
        • Objectives
        • -
        • +
        • User Manual
            -
          • @@ -300,6 +300,8 @@
          • Tika HTTP client statistics
          • SpamAssassin TCP client statistics
          • + +
          • Mailbox listeners statistics time percentiles
          Retrieve available boards for Grafana. --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org For additional commands, e-mail: server-dev-help@james.apache.org