P2: Mail proxy BODYSTRUCTURE rejects normal email as an Apple Note #897

Open
opened 2026-10-02 17:37:48 +00:00 by kayg · 0 comments
Owner

Review target: job/mailproxy-486 at 7f796c4ca. Static evidence only; no tests run.

P2: BODYSTRUCTURE rejects ordinary Mail messages

  • Evidence: crates/calternal-imap/src/session.rs:542 sends every
    BODYSTRUCTURE request to crate::mime::bodystructure. In
    crates/calternal-imap/src/mime.rs:302, this helper first calls
    NoteMessage::parse. That parser requires the Apple Note type header and
    identity (mime.rs:79). Normal mail has neither header. The new Mail
    provider returns exact upstream MIME (crates/plugins/mail/src/proxy.rs:228).
  • Result: a client can list and select Mail but cannot get its MIME structure.
    The error is about an Apple Note, although the selected item is Mail.
  • Rule: DESIGN §53 requires Apple Mail and Thunderbird to read Connected
    Account mail. The reuse gate requires an appropriate shared helper.
  • Fix: add a bounded general MIME structure helper or a provider hook. Keep
    the Notes validation at the Notes boundary. Report actual MIME parameters
    and transfer encodings for Mail, including ordinary attachments.
  • Test idea: request BODYSTRUCTURE for text/plain and multipart Mail with an
    attachment. Assert the structure and a successful completion. Keep the
    existing Notes tests.
Review target: job/mailproxy-486 at 7f796c4ca. Static evidence only; no tests run. ## P2: BODYSTRUCTURE rejects ordinary Mail messages - Evidence: `crates/calternal-imap/src/session.rs:542` sends every BODYSTRUCTURE request to `crate::mime::bodystructure`. In `crates/calternal-imap/src/mime.rs:302`, this helper first calls `NoteMessage::parse`. That parser requires the Apple Note type header and identity (`mime.rs:79`). Normal mail has neither header. The new Mail provider returns exact upstream MIME (`crates/plugins/mail/src/proxy.rs:228`). - Result: a client can list and select Mail but cannot get its MIME structure. The error is about an Apple Note, although the selected item is Mail. - Rule: DESIGN §53 requires Apple Mail and Thunderbird to read Connected Account mail. The reuse gate requires an appropriate shared helper. - Fix: add a bounded general MIME structure helper or a provider hook. Keep the Notes validation at the Notes boundary. Report actual MIME parameters and transfer encodings for Mail, including ordinary attachments. - Test idea: request BODYSTRUCTURE for text/plain and multipart Mail with an attachment. Assert the structure and a successful completion. Keep the existing Notes tests.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#897
No description provided.