Current rule actions allow users to move or copy messages.
Add a new Sieve action: link. The link action creates a single-instance reference to a message in a target folder. It saves storage space and synchronizes message metadata across folders.
Add the link action to the Sieve engine: link :folder <folder>
Storage:
- The server stores the raw message body once.
- The target folder receives a reference pointer to the original message data.
Synchronization:
- Flags, tags, and read status synchronize across all folders that reference the message.
- A flag update in the target folder changes the original message. And a flag update in the original message changes the target folder reference.
Deletion:
- Delete linked reference: Removing a linked message from a target folder deletes only that reference pointer. The original message remains unchanged.
- Delete original message: Removing the original message automatically purges all linked references. The system MUST NOT create or retain broken references in any folder.
Materialization:
- Support a materialization action in JMAP and IMAP extensions.
- Materialization converts a linked reference into a distinct independent copy.
- After materialization deleting or updating the original message does not affect the target message.