rfc3503.Message_Disposition_Notification.txt 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507
  1. Network Working Group A. Melnikov
  2. Request for Comments: 3503 ACI Worldwide/MessagingDirect
  3. Category: Standards Track March 2003
  4. Message Disposition Notification (MDN) profile for
  5. Internet Message Access Protocol (IMAP)
  6. Status of this Memo
  7. This document specifies an Internet standards track protocol for the
  8. Internet community, and requests discussion and suggestions for
  9. improvements. Please refer to the current edition of the "Internet
  10. Official Protocol Standards" (STD 1) for the standardization state
  11. and status of this protocol. Distribution of this memo is unlimited.
  12. Copyright Notice
  13. Copyright (C) The Internet Society (2003). All Rights Reserved.
  14. Abstract
  15. The Message Disposition Notification (MDN) facility defined in RFC
  16. 2298 provides a means by which a message can request that message
  17. processing by the recipient be acknowledged as well as a format to be
  18. used for such acknowledgements. However, it doesn't describe how
  19. multiple Mail User Agents (MUAs) should handle the generation of MDNs
  20. in an Internet Message Access Protocol (IMAP4) environment.
  21. This document describes how to handle MDNs in such an environment and
  22. provides guidelines for implementers of IMAP4 that want to add MDN
  23. support to their products.
  24. Melnikov Standards Track [Page 1]
  25. RFC 3503 MDN profile for IMAP March 2003
  26. Table of Contents
  27. 1. Conventions Used in this Document............................. 2
  28. 2. Introduction and Overview..................................... 2
  29. 3. Client behavior............................................... 3
  30. 3.1. Client behavior when receiving a message................. 5
  31. 3.2. Client behavior when copying a message................... 5
  32. 3.3. Client behavior when sending a message................... 5
  33. 3.4. Client behavior when saving a temporary message.......... 5
  34. 4. Server behavior............................................... 5
  35. 4.1. Server that supports arbitrary keywords.................. 5
  36. 4.2. Server that supports only $MDNSent keyword............... 5
  37. 4.3. Interaction with IMAP ACL extension...................... 6
  38. 5. Examples...................................................... 6
  39. 6. Security Considerations....................................... 7
  40. 7. Formal Syntax................................................. 7
  41. 8. Acknowledgments............................................... 7
  42. 9. Normative References.......................................... 8
  43. 10. Author's Address.............................................. 8
  44. 11. Full Copyright Statement...................................... 9
  45. 1. Conventions Used in this Document
  46. "C:" and "S:" in examples show lines sent by the client and server
  47. respectively.
  48. The keywords "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY" in
  49. this document when typed in uppercase are to be interpreted as
  50. defined in "Key words for use in RFCs to Indicate Requirement Levels"
  51. [KEYWORDS].
  52. 2. Introduction and Overview
  53. This memo defines an additional [IMAP4] mailbox keyword that allows
  54. multiple Mail User Agents (MUAs) to know if a requested receipt
  55. notification was sent.
  56. Message Disposition Notification [MDN] does not require any special
  57. support of IMAP in the case where a user has access to the mailstore
  58. from only one computer and is using a single MUA. In this case, the
  59. MUA behaves as described in [MDN], i.e., the MUA performs automatic
  60. processing and generates corresponding MDNs, it performs requested
  61. action and, with the user's permission, sends appropriate MDNs. The
  62. MUA will not send MDN twice because the MUA keeps track of sent
  63. notifications in a local configuration. However, that does not work
  64. when IMAP is used to access the same mailstore from different
  65. locations or is using different MUAs.
  66. Melnikov Standards Track [Page 2]
  67. RFC 3503 MDN profile for IMAP March 2003
  68. This document defines a new special purpose mailbox keyword $MDNSent
  69. that must be used by MUAs. It does not define any new command or
  70. response for IMAP, but describes a technique that MUAs should use to
  71. achieve interoperability.
  72. When a client opens a mailbox for the first time, it verifies that
  73. the server is capable of storing the $MDNSent keyword by examining
  74. the PERMANENTFLAGS response code. In order to support MDN in IMAP, a
  75. server MUST support either the $MDNSent keyword, or arbitrary message
  76. keywords.
  77. 3. Client behavior
  78. The use of IMAP requires few additional steps in mail processing on
  79. the client side. The following timeline modifies the timeline found
  80. in Section 4 of [MDN].
  81. -- User composes message.
  82. -- User tells MUA to send message.
  83. -- MUA passes message to MSA (original recipient information passed
  84. along). MUA [optionally] saves message to a folder for sent mail
  85. with $MDNSent flag set.
  86. -- MSA sends message to MTA.
  87. -- Final MTA receives message.
  88. -- Final MTA delivers message to MUA (possibly generating DSN).
  89. -- MUA logs into IMAP server, opens mailbox, verifies if mailbox can
  90. store $MDNSent keyword by examining PERMANENTFLAGS response.
  91. -- MUA performs automatic processing and generates corresponding MDNs
  92. ("dispatched", "processed", "deleted", "denied" or "failed"
  93. disposition type with "automatic-action" and "MDN-sent-
  94. automatically" disposition modes) for messages that do not have
  95. $MDNSent keyword, or \Draft flag set. (*)
  96. -- MUA sets the $MDNSent keyword for every message that required an
  97. automatic MDN to be sent, whether or not the MDN was sent.
  98. -- MUA displays a list of messages to user.
  99. -- User selects a message and requests that some action be performed
  100. on it.
  101. Melnikov Standards Track [Page 3]
  102. RFC 3503 MDN profile for IMAP March 2003
  103. -- MUA performs requested action and, with user's permission, sends
  104. appropriate MDN ("displayed", "dispatched", "processed",
  105. "deleted", "denied" or "failed" disposition type with "manual-
  106. action" and "MDN-sent-manually" or "MDN-sent-automatically"
  107. disposition mode). If the generated MDN is saved to a mailbox
  108. with the APPEND command, the client MUST specify the $MDNSent
  109. keyword in the APPEND.
  110. -- MUA sets the $MDNSent keyword for all messages for which the user
  111. confirmed the dispatching of disposition (or was explicitly
  112. prohibited to do so).
  113. -- User possibly performs other actions on message, but no further
  114. MDNs are generated.
  115. (*) Note: MUA MUST NOT use \Recent flag as an indicator that it
  116. should send MDN, because according to [IMAP4], "If multiple
  117. connections have the same mailbox selected simultaneously, it is
  118. undefined which of these connections will see newly-arrived
  119. messages with \Recent set and which will see it without \Recent
  120. set". Thus, using \Recent as an indicator will cause
  121. unpredictable client behavior with different IMAP4 servers.
  122. However, the client MAY use \Seen flag as one of the indicators
  123. that MDN must not be sent. The client MUST NOT use any other
  124. standard flags, like \Draft or \Answered, to indicate that MDN
  125. was previously sent, because they have different well known
  126. meaning. In any case, in the presence of the $MDNSent keyword,
  127. the client MUST ignore all other flags or keywords for the
  128. purpose of generating an MDN and MUST NOT send the MDN.
  129. When the client opens a mailbox for the first time, it must verify
  130. that the server supports the $MDNSent keyword, or arbitrary message
  131. keywords by examining PERMANENTFLAGS response code.
  132. The client MUST NOT try to set the $MDNSent keyword if the server is
  133. incapable of storing it permanently.
  134. The client MUST be prepared to receive NO from the server as the
  135. result of STORE $MDNSent when the server advertises the support of
  136. storing arbitrary keywords, because the server may limit the number
  137. of message keywords it can store in a particular mailbox. A client
  138. SHOULD NOT send MDN if it fails to store the $MDNSent keyword.
  139. Once the $MDNSent keyword is set, it MUST NOT be unset by a client.
  140. The client MAY set the $MDNSent keyword when a user denies sending
  141. the notification. This prohibits all other MUAs from sending MDN for
  142. this message.
  143. Melnikov Standards Track [Page 4]
  144. RFC 3503 MDN profile for IMAP March 2003
  145. 3.1. Client behavior when receiving a message
  146. The client MUST NOT send MDN if a message has the $MDNSent keyword
  147. set. It also MUST NOT send MDN if a message has \Draft flag, because
  148. some clients use this flag to mark a message as incomplete.
  149. See the timeline in section 3 for details on client behavior when
  150. receiving a message.
  151. 3.2. Client behavior when copying a message
  152. The client SHOULD verify that $MDNSent is preserved on a COPY
  153. operation. Furthermore, when a message is copied between servers
  154. with the APPEND command, the client MUST set the $MDNSent keyword
  155. correctly.
  156. 3.3. Client behavior when sending a message
  157. When saving a sent message to any folder, the client MUST set the
  158. $MDNSent keyword to prevent another client from sending MDN for the
  159. message.
  160. 3.4. Client behavior when saving a temporary message
  161. When saving an unfinished message to any folder client MUST set
  162. $MDNSent keyword to prevent another client from sending MDN for the
  163. message.
  164. 4. Server behavior
  165. Server implementors that want to follow this specification must
  166. insure that their server complies with either section 4.1 or section
  167. 4.2. If the server also supports the IMAP [ACL] extension, it MUST
  168. also comply with the section 4.3.
  169. 4.1. Server that supports arbitrary keywords
  170. No changes are required from the server to make it compatible with
  171. the extension described in this document if it supports arbitrary
  172. keywords.
  173. 4.2. Server that supports only $MDNSent keyword
  174. Servers that support only the $MDNSent keyword MUST preserve it on
  175. the COPY operation. It is also expected that a server that supports
  176. SEARCH <flag> will also support the SEARCH KEYWORD $MDNSent.
  177. Melnikov Standards Track [Page 5]
  178. RFC 3503 MDN profile for IMAP March 2003
  179. 4.3. Interaction with IMAP ACL extension
  180. Any server that conforms to either 4.1 or 4.2 and also supports the
  181. IMAP [ACL] extension, SHOULD preserve the $MDNSent keyword on COPY
  182. even if the client does not have 'w' right. This will prevent the
  183. generation of a duplicated MDN for the same message. Note that the
  184. server MUST still check if the client has rights to perform the COPY
  185. operation on a message according to [ACL].
  186. 5. Examples
  187. 1) MUA opens mailbox for the first time.
  188. a) The server supports storing of arbitrary keywords
  189. C: a100 select INBOX
  190. S: * FLAGS (\Flagged \Draft \Deleted \Seen)
  191. S: * OK [PERMANENTFLAGS (\Flagged \Draft \Deleted \Seen \*)]
  192. S: * 5 EXISTS
  193. S: * 3 RECENT
  194. S: * OK [UIDVALIDITY 894294713]
  195. S: a100 OK [READ-WRITE] Completed
  196. b) The server supports storing of the $MDNSent keyword
  197. C: a100 select INBOX
  198. S: * FLAGS (\Flagged \Draft \Deleted \Seen $MDNSent)
  199. S: * OK [PERMANENTFLAGS (\Flagged \Draft \Deleted \Seen $MDNSent)]
  200. S: * 5 EXISTS
  201. S: * 3 RECENT
  202. S: * OK [UIDVALIDITY 894294713]
  203. S: a100 OK [READ-WRITE] Completed
  204. 2) The MUA successfully sets the $MDNSent keyword
  205. C: a200 STORE 4 +FLAGS ($MDNSent)
  206. S: * 4 FETCH (FLAGS (\Flagged \Seen $MDNSent))
  207. S: * FLAGS ($MDNSent \Flagged \Deleted \Draft \Seen)
  208. S: * OK [PERMANENTFLAGS ($MDNSent \Flagged \Deleted \Draft \Seen \*)]
  209. S: a200 OK STORE completed
  210. 3) The server refuses to store the $MDNSent keyword
  211. C: a200 STORE 4 +FLAGS ($MDNSent)
  212. S: a200 NO STORE failed : no space left to store $MDNSent keyword
  213. Melnikov Standards Track [Page 6]
  214. RFC 3503 MDN profile for IMAP March 2003
  215. 4) All clients and servers MUST treat the $MDNSent keyword as case
  216. insensitive in all operations, as stated in [IMAP].
  217. C: a300 FETCH 1:* FLAGS
  218. S: * 1 FETCH (FLAGS (\Seen))
  219. S: * 2 FETCH (FLAGS (\Answered \Seen $MdnSENt))
  220. S: * 3 FETCH (FLAGS ())
  221. S: * 4 FETCH (FLAGS (\Flagged \Seen $MdnSENT))
  222. S: * 5 FETCH (FLAGS ($MDNSent))
  223. S: * 6 FETCH (FLAGS (\Recent))
  224. S: a300 OK FETCH completed
  225. C: a400 SEARCH KEYWORDS $mdnsent
  226. S: * SEARCH 2 4 5
  227. S: a400 OK SEARCH completed
  228. 6. Security Considerations
  229. There are no known security issues with this extension, not found in
  230. [MDN] and/or [IMAP4].
  231. Section 4.3 changes ACL checking requirements on an IMAP server that
  232. implements IMAP [ACL] extension.
  233. 7. Formal Syntax
  234. The following syntax specification uses the augmented Backus-Naur
  235. Form (BNF) notation as specified in [RFC-822], as modified by
  236. [IMAP4]. Non-terminals referenced, but not defined below, are as
  237. defined by [IMAP4].
  238. Except as noted otherwise, all alphabetic characters are case-
  239. insensitive. The use of upper or lower case characters to define
  240. token strings is for editorial clarity only. Implementations MUST
  241. accept these strings in a case-insensitive fashion.
  242. flag_keyword ::= "$MDNSent" / other_keywords
  243. other_keywords ::= atom
  244. 8. Acknowledgments
  245. This document is the product of discussions that took place on the
  246. IMAP mailing list. Special gratitude to Cyrus Daboo and Randall
  247. Gellens for reviewing the document.
  248. Thank you to my father who as he has helped to make me what I am. I
  249. miss you terribly.
  250. Melnikov Standards Track [Page 7]
  251. RFC 3503 MDN profile for IMAP March 2003
  252. 9. Normative References
  253. [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
  254. Requirement Levels", BCP 14, RFC 2119, March 1997.
  255. [MDN] Fajman, R., "An Extensible Message Format for Message
  256. Disposition Notifications", RFC 2298, March 1998.
  257. [IMAP4] Crispin, M., "Internet Message Access Protocol - Version
  258. 4rev1", RFC 3501, March 2003.
  259. [ACL] Myers, J., "IMAP4 ACL extension", RFC 2086, January 1997.
  260. 10. Author's Address
  261. Alexey Melnikov
  262. ACI Worldwide/MessagingDirect
  263. 59 Clarendon Road
  264. Watford, Hertfordshire
  265. United Kingdom, WD17 1FQ
  266. Phone: +44 1923 81 2877
  267. EMail: mel@messagingdirect.com
  268. Melnikov Standards Track [Page 8]
  269. RFC 3503 MDN profile for IMAP March 2003
  270. 11. Full Copyright Statement
  271. Copyright (C) The Internet Society (2003). All Rights Reserved.
  272. This document and translations of it may be copied and furnished to
  273. others, and derivative works that comment on or otherwise explain it
  274. or assist in its implementation may be prepared, copied, published
  275. and distributed, in whole or in part, without restriction of any
  276. kind, provided that the above copyright notice and this paragraph are
  277. included on all such copies and derivative works. However, this
  278. document itself may not be modified in any way, such as by removing
  279. the copyright notice or references to the Internet Society or other
  280. Internet organizations, except as needed for the purpose of
  281. developing Internet standards in which case the procedures for
  282. copyrights defined in the Internet Standards process must be
  283. followed, or as required to translate it into languages other than
  284. English.
  285. The limited permissions granted above are perpetual and will not be
  286. revoked by the Internet Society or its successors or assigns.
  287. This document and the information contained herein is provided on an
  288. "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  289. TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  290. BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  291. HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  292. MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  293. Acknowledgement
  294. Funding for the RFC Editor function is currently provided by the
  295. Internet Society.
  296. Melnikov Standards Track [Page 9]