james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <server-...@james.apache.org>
Subject [jira] [Commented] (JAMES-2321) WebAdmin should allow to see more details about Mails
Date Fri, 08 Jun 2018 10:09:00 GMT

    [ https://issues.apache.org/jira/browse/JAMES-2321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16505890#comment-16505890
] 

ASF GitHub Bot commented on JAMES-2321:
---------------------------------------

GitHub user blackheaven opened a pull request:

    https://github.com/apache/james-project/pull/118

    JAMES-2321 WebAdmin should allow to see more details about Mails

    Continuation (for CI) of #1454

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/blackheaven/james-project JAMES-2321

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/james-project/pull/118.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #118
    
----
commit 8ddbfeef809fef56a59d6c5955dc9094eed64c01
Author: Gautier DI FOLCO <gdifolco@...>
Date:   2018-06-04T10:20:39Z

    JAMES-2321 WebAdmin should allow to see more details about Mails

commit cdc6db1fac14ae8b165dcb7e5303fa8cd619eefd
Author: Gautier DI FOLCO <gdifolco@...>
Date:   2018-06-08T08:06:59Z

    fixup! JAMES-2321 WebAdmin should allow to see more details about Mails

commit eea60675009352d74fcd75a2296c769b6d8413ee
Author: Gautier DI FOLCO <gdifolco@...>
Date:   2018-06-08T10:06:14Z

    fixup! JAMES-2321 WebAdmin should allow to see more details about Mails

----


> WebAdmin should allow  to see more details about Mails
> ------------------------------------------------------
>
>                 Key: JAMES-2321
>                 URL: https://issues.apache.org/jira/browse/JAMES-2321
>             Project: James Server
>          Issue Type: Improvement
>          Components: MailStore &amp; MailRepository, webadmin
>    Affects Versions: master
>            Reporter: Tellier Benoit
>            Priority: Major
>              Labels: feature, newbie
>
> The WebAdmin REST API allows to see mails in a mailQueue and in a mail repository. However,
as of today, the amount of information that can be seen is limited, and has the following
properties:
>  - The `name` that identifies the mail
>  - The envelope information (sender + recipients)
>  - And basic processing information (state and possible error).
> Today:
> {code:java}
> curl -XGET http://ip:port/mailRepositories/file%3A%2F%2Fvar%2Fmail%2Ferror%2F/mails/mail-key-1
> {code}
> Will return:
> {code:java}
> {
>     "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..."
> }
> {code}
> We also should add the following properties in the view by default: `lastUpdated`, `remoteHost`,
`remoteAddr`.
> The basic answers becomes then:
> {code:java}
> {
>     "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": "smtp.apache.org",
>     "remoteAddr":"175.26.53.48",
>     "lastUpdated": "2018-01-28T14:31:00.000+0000"
> }
> {code}
> We need to be able to get more details about the mail object.
> We should be able to pass an `additionalFields`.
> Supported additional fields would be:
>  - `attributes`
>  - `perRecipientsHeaders`
>  - `headers`
>  - `body`
>  - `messageSize`
> An example:
> {code:java}
> curl -XGET http://ip:port/mailRepositories/file%3A%2F%2Fvar%2Fmail%2Ferror%2F/mails/mail-key-1?additionalFields=attributes,headers,body,messageSize,perRecipientsHeaders
> {code}
> Will return:
> {code:java}
> {
>     "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": "smtp.apache.org",
>     "remoteAddr":"175.26.53.48",
>     "lastUpdated": "2018-01-28T14:31:00.000+0000",
>     "messageSize": 452369,
>     "attributes" : {"name1":"value1", "name2":"value2"},
>     "body": "My awesome body!!!",
>     "perRecipientsHeaders": {
>         "benwa@apache.org": {
>              "headerName1":["value1", "value2"],
>              "headerName2":["value3","value4"]
>         }
>     },
>     "headers" : {
>          "headerName3":["value5", "value8"],
>          "headerName4":["value6","value7"]
>     }
> }
> {code}
> You will need to:
>  - in */server/protocols/webadmin/webadmin-mailrepository* project:
>  - Modify MailDTO to add new mandatory fields. 
>  - *MailRepositoriesRoutesTest* :: *retrievingAMailShouldDisplayItsInformation* to take
into account these new mandatory fields.
> Then:
>  - *MailDTO* Should contain an enum called *AdditionalFields*
>  - *MailDTO::fromMail* should take a List<AdditionalFields> as argument
>  - Modify *MailRepositoriesRoutes* in order to take into account this URL parameter.
> Please note that:
>  - Unknown *additionalParameter* values should be rejected
>  - empty additionalParameters should be filtered out and ignored
>  - This parameter can be ommited.
>  - Please add tests demonstrating the following behaviours in *MailRepositoriesRoutesTest*
> Of course, as always, we are willing to provide help for these issues. Please don't hesitate
to reach us on https://gitter.im/apache/james-project .



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message