Message Disposition Notification (MDN) profile for Internet Message Access Protocol (IMAP)
Extracted elements (19)
MDN (RFC 2298) works fine when a single MUA accesses a mailstore from one location, but breaks in IMAP environments where multiple MUAs share the same mailbox: each MUA independently tracks sent notifications in local config, so duplicate MDNs can be generated. The $MDNSent keyword solves this by storing notification state on the server.
A client MAY use the \Seen flag as one of the indicators that an MDN must not be sent, but this is supplementary. The $MDNSent keyword takes precedence over all other flags for MDN generation decisions.
A client MUST be prepared to receive NO from the server when attempting to STORE $MDNSent, even if the server advertises arbitrary keyword support, because servers may limit the number of keywords per mailbox. A client SHOULD NOT send MDN if it fails to store the $MDNSent keyword.
A client MUST NOT use the \Recent flag as an indicator to send MDN, because it is undefined which simultaneous connection sees \Recent set on newly-arrived messages, leading to unpredictable behavior.
A server conforming to section 4.1 or 4.2 that also supports the IMAP ACL extension SHOULD preserve the $MDNSent keyword on COPY even if the client does not have 'w' (write) rights, to prevent duplicate MDN generation. The server MUST still enforce ACL rights for the COPY operation itself.
If the generated MDN is saved to a mailbox with the IMAP APPEND command, the client MUST specify the $MDNSent keyword in the APPEND to prevent duplicate MDNs.
In order to support MDN in IMAP, a server MUST support either the $MDNSent keyword or arbitrary message keywords, verified by examining the PERMANENTFLAGS response code when a client opens a mailbox.
Once the $MDNSent keyword is set, it MUST NOT be unset by a client. A client MAY set $MDNSent even when a user denies sending the notification, to prevent other MUAs from sending MDN for that message.
Servers that support only the $MDNSent keyword MUST preserve it on the COPY operation, and a server that supports SEARCH <flag> is expected to also support SEARCH KEYWORD $MDNSent.
The client MUST NOT send MDN if a message has the $MDNSent keyword set, or if a message has the \Draft flag set (some clients use \Draft to mark incomplete messages).
The client MUST NOT try to set the $MDNSent keyword if the server is incapable of storing it permanently, as determined from PERMANENTFLAGS.
The client MUST NOT use standard flags like \Draft or \Answered to indicate MDN was previously sent. In the presence of the $MDNSent keyword, the client MUST ignore all other flags or keywords for MDN generation purposes and MUST NOT send the MDN.
When copying a message between servers using APPEND, the client MUST set the $MDNSent keyword correctly. The client SHOULD also verify that $MDNSent is preserved on a COPY operation within the same server.
When saving a sent message to any folder, the client MUST set the $MDNSent keyword to prevent another client from sending MDN for that outgoing message.
When saving an unfinished (draft) message to any folder, the client MUST set the $MDNSent keyword to prevent another client from sending MDN for the incomplete message.
The MUA MUST set $MDNSent for every message that required an automatic MDN to be sent, whether or not the MDN was actually sent. Automatic MDNs cover disposition types 'dispatched', 'processed', 'deleted', 'denied', or 'failed' with 'automatic-action' and 'MDN-sent-automatically' modes, for messages lacking $MDNSent or \Draft.
This document defines a new IMAP mailbox keyword $MDNSent that MUAs MUST use to indicate that an MDN has already been sent (or intentionally suppressed) for a given message. It requires no new IMAP commands or responses.
There are no known security issues introduced by this extension beyond those already present in RFC 2298 (MDN) and RFC 3501 (IMAP4). Section 4.3 modifies ACL checking requirements: servers implementing the IMAP ACL extension must preserve $MDNSent on COPY regardless of client 'w' rights, while still enforcing standard ACL rights for COPY itself.
The formal syntax extends IMAP flag_keyword with the literal string "$MDNSent". All alphabetic characters in keyword strings are case-insensitive; all clients and servers MUST treat $MDNSent as case-insensitive in all operations.