Skip to content

ADR 0031: iCloud read-write move

Status

Accepted

Context

ADR 0027 and ADR 0030 kept iCloud as read-only IMAP inventory. MAIL-240 and MAIL-252 accepted that limit. On 2026-10-08 the owner required iCloud to move messages between folders and between connected accounts.

Decision

  1. iCloud connect still stores the app-specific password only as imap_secret ciphertext. The token check allows refresh, access, and imap_secret.
  2. ADR 0032 replaces the move-only profile. Archive, mark read, flag, delete, and move are on. Send stays off.
  3. Same-account move uses IMAP UID MOVE, with UID COPY plus removal when the server rejects MOVE.
  4. A move onto another connected iCloud account fetches RFC822, appends it to the destination folder, then removes the source copy. The source stays if the append fails.

Consequences

Preview must apply 0021_icloud_imap_secret.sql, 0022_icloud_move.sql, and 0023_icloud_mailbox_writes.sql before a live mailbox change. No new environment variable. The owner connects jskoch67@icloud.com and Jason.s.koch@icloud.com from /accounts.