[jira] [Commented] (JAMES-3436) Saving Draft: convenience header & empty body

2020-10-26 Thread Benoit Tellier (Jira)


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

Benoit Tellier commented on JAMES-3436:
---

https://github.com/linagora/james-project/pull/3943 is merged

https://github.com/linagora/james-project/pull/3956 specifies email metadata 
properties

> Saving Draft: convenience header & empty body
> -
>
> Key: JAMES-3436
> URL: https://issues.apache.org/jira/browse/JAMES-3436
> Project: James Server
>  Issue Type: Sub-task
>  Components: JMAP
>Affects Versions: master
>Reporter: Benoit Tellier
>Assignee: Antoine Duprat
>Priority: Major
> Fix For: master
>
>
> = Why
> As a user, I want to create a mail draft (but empty body for the moment)
> = How
> Implement [`Email/set create` ](https://jmap.io/spec-mail.html#emailset)
> {code:java}
> [[ "Email/set", {
>   "accountId": "ue150411c",
>   "create": {
> "k192": {
>   "mailboxIds": {
> "2ea1ca41b38e": true
>   },
>   "keywords": {
> "$seen": true,
> "$draft": true
>   },
>   "from": [{
> "name": "Joe Bloggs",
> "email": "j...@example.com"
>   }],
>   "subject": "World domination",
>   "receivedAt": **"2018-07-10T01:03:11Z",
>   "sentAt": "2018-07-10T11:03:11+10:00",
> }
>   }
> }, "0" ]]
> {code}
> Notes: 
> * omitting the body part for now (see #3910)
> * not all headers are allowed for now, only the convenience ones, as: 
>   * `references` | defaults to null
>   * `inReplyTo` | defaults to null
>   * `sender` | default to `from`
>   * `from` | defaults to null
>   * `to` | defaults to null
>   * `cc` | defaults to null
>   * `bcc` | defaults to null
>   * `replyTo` | defaults to `to`
>   * `subject` | defaults to null
>   * `sentAt` | defaults to `now`
> * other parameters can set:
>   * `mailboxIds` must be set
>   * `keywords` | default is null 
>   * `receivedAt` | default is time of creation on server
> * server-set parameters:
>   * `id`
>   * `threadId`
>   * `size` 
> Restrictions:
> * The headers property MUST NOT be given on either the top-level Email or an 
> EmailBodyPart — the client must set each header field as an individual 
> property.
> * There MUST NOT be two properties that represent the same header field 
> (e.g., header:from and from) within the Email or particular EmailBodyPart.
> * Header fields MUST NOT be specified in parsed forms that are forbidden for 
> that particular field.
> * Header fields beginning with Content- MUST NOT be specified on the Email 
> object, only on EmailBodyPart objects.
> = Definition of Done 
> Write integration tests about email creation and error handlings.
> Delegation needs to be handled.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Commented] (JAMES-3431) Relay DSN options on RemoteDelivery

2020-10-26 Thread Karsten Otto (Jira)


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

Karsten Otto commented on JAMES-3431:
-

> Would configuring this at the server level help your use case?

Unfortunately not. The use case is a form of "registered mail" scenario, where 
a user requires notification once certain important mails reach the recipients 
inbox (NOTIFY=SUCCESS). But in general they only care about delivery failure 
(NOTIFY=FAILURE) and don't want any confirmations for each and every mail. 
Looking at the source code of SMTPTransport, mail.smtp.dsn.notify would set the 
NOTIFY option to a fixed value regardless, which is not helpful.

However, I noticed that SMTPTransport actually can use the SMTPMessage subclass 
of MimeMessage to specify the NOTIFY and RET options, and possibly even ENVID 
via setMailExtension. Maybe this could be a backwards compatible way to make 
DSN work, without abandoning javax.mail? Of course there are still all the 
other issues regarding mail attributes and SMTP stack.

> Relay DSN options on RemoteDelivery
> ---
>
> Key: JAMES-3431
> URL: https://issues.apache.org/jira/browse/JAMES-3431
> Project: James Server
>  Issue Type: Bug
>  Components: Remote Delivery, SMTPServer
>Affects Versions: 3.5.0
>Reporter: Karsten Otto
>Priority: Major
>
> Since James claims to support the DSN SMTP extension, it may receive a mail 
> submission according to [RFC 3461|https://tools.ietf.org/html/rfc3461]:
> {code:java}
> MAIL FROM: RET=HDRS ENVID=QQ314159
> RCPT TO: NOTIFY=SUCCESS,FAILURE,DELAY 
> ORCPT=rfc822;d...@ivory.edu
> RCPT TO: NOTIFY=NEVER{code}
> In this case James should
>  * remember the given DSN options (NOTIFY, ORCPT, RET, ENVID) for each 
> recipient, and
>  * provide the same options when relaying the mail to remote servers via the 
> RemoteDelivery mailet.
> (The DSN options should be accessible to other interested mailets as well, 
> e.g. for bounce processing.)
> Possibly related issues:
>  https://issues.apache.org/jira/browse/JAMES-322
>  https://issues.apache.org/jira/browse/JAMES-362
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Commented] (JAMES-3431) Relay DSN options on RemoteDelivery

2020-10-26 Thread Benoit Tellier (Jira)


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

Benoit Tellier commented on JAMES-3431:
---

Hello Otto.

Thanks for the report, this seems very interesting.

We need to cary over these parameters from the SMTP server stack through the 
mailetcontainer into RemoteDelivery. The way I would see to do it is:
 - Either to modify the Mail object in order to modify the recipient property, 
in order to take parameters into account, but this is a breaking change in one 
of our core APIs.
 - Or a mail attribute could be set up, for each recipient.

Regarding "remote delivery", SMTPTransport seems to handle DSN extension, 
`mail.smtp.dsn.notify` configure it server wide. I'm however unsure we could 
get this working in a MX forwarding context (as this is a configured value). 
Subclassing SMTPTransport seems brittle, getting rid of javax.mail not doable 
quickly. Would configuring this at the server level help your use case?

And of course James needs to comply to DSN specification as you mentionned: 
https://issues.apache.org/jira/browse/JAMES-362 


> Relay DSN options on RemoteDelivery
> ---
>
> Key: JAMES-3431
> URL: https://issues.apache.org/jira/browse/JAMES-3431
> Project: James Server
>  Issue Type: Bug
>  Components: Remote Delivery, SMTPServer
>Affects Versions: 3.5.0
>Reporter: Karsten Otto
>Priority: Major
>
> Since James claims to support the DSN SMTP extension, it may receive a mail 
> submission according to [RFC 3461|https://tools.ietf.org/html/rfc3461]:
> {code:java}
> MAIL FROM: RET=HDRS ENVID=QQ314159
> RCPT TO: NOTIFY=SUCCESS,FAILURE,DELAY 
> ORCPT=rfc822;d...@ivory.edu
> RCPT TO: NOTIFY=NEVER{code}
> In this case James should
>  * remember the given DSN options (NOTIFY, ORCPT, RET, ENVID) for each 
> recipient, and
>  * provide the same options when relaying the mail to remote servers via the 
> RemoteDelivery mailet.
> (The DSN options should be accessible to other interested mailets as well, 
> e.g. for bounce processing.)
> Possibly related issues:
>  https://issues.apache.org/jira/browse/JAMES-322
>  https://issues.apache.org/jira/browse/JAMES-362
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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