Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-2564

WebAdmin: Mappings 'address + regex' support

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • data, webadmin

    Description

      In an effort to drop the CLI completly in Guice products, we need to support all features of the CLI in the webAdmin alternative.

      Currently, one of the features missing are related to "mappings".

      We would like to implement them on top of webadmin.

      Create routes for:

      • Reading, adding and removing address mappings
      • Reading, adding and removing regex mappings
      • List all mappings

      Here is a suggestion of APIs:

      • Address mapping

      ```
      GET /mappings/address/alice@apache.org

      200
      [

      { "toAddress": "bob@apache.org"}

      ,
      ...
      ]

      PUT /mappings/address/alice@apache.org

      With body

      { "toAddress": "bob@apache.org"}

      Will add the mapping

      DELETE /mappings/address/alice@apache.org

      With body

      { "toAddress": "bob@apache.org"}

      Will remove the mapping
      ```

      Regarding regex mapping:

      ```
      GET /mappings/regex/fromDomain.tld

      200
      [
      { "expression": "prefix_(.*)@test:admin@${1}"},
      ...
      ]

      PUT /mappings/regex/fromDomain.tld

      With body {"expression": "prefix_(.*)@test:admin@${1}"}

      Will add the mapping

      DELETE /mappings/regex/fromDomain.tld

      With body {"expression": "prefix_(.*)@test:admin@${1}"}

      Will remove the mapping
      ```

      Regarding listing mappings:

      ```
      GET /mappings

      [
      {
      "type": "Domain", // One of Domain, Address, Regex, Group, Forward, Error
      "source":

      { "fixedUser": "*", "fixedDomain": "domain.tld" }

      ,
      "mapping" : "newDomain.tld"
      }, ...
      ]
      ```

      Open separate pull requests for each sets of routes.

      We do stay at your full disposal on Gitter to answer related questions (https://gitter.im/apache/james-project)

      Attachments

        Activity

          People

            Unassigned Unassigned
            btellier Benoit Tellier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: