dpn-mail crate: fold tier-sorting mail sync out of bastion into a reusable dpn crate #58

Open
opened 2026-07-18 10:31:55 +00:00 by n8k99 · 0 comments
Owner

Extract mail tier-sorting out of the bastion binary into a reusable dpn crate (inherit, dont reimplement).

Why

Tier-sorting (JMAP -> ~/Schouwburg/6-Extra/Mail//YYYY/MM/DD/) lives only in crates/bastion (mail_sync.rs, email.rs); bastion is a broken symlink to an unbuilt binary so nothing sorts. A parallel Python poll->import chain files by Fastmail folder name -> the ~48k-file sprawl just stripped from ~/Mail.

Scope

  • New crate crates/dpn-mail: JMAP fetch + tier-sort rules (which mail -> 0 Black..5 Red) + note render.
  • bastion becomes a thin CLI over dpn-mail.
  • Tier-sort rules first-class crate API.
  • Retire the Python folder-based import (email-import-to-mail folder_for); keep email-daily-link reading the tier tree.

Done 2026-07-18

  • ~/Mail -> ~/Schouwburg/6-Extra/Mail, tiers only (43,098 files).
  • Mail scripts repointed; identity-birthday-link off deleted ~/Public/Green/Identity.
  • 4 mail units stopped+disabled pending this crate.

Another day

  • Server-side Fastmail filters pre-sorting into tier mailboxes.
Extract mail tier-sorting out of the bastion binary into a reusable dpn crate (inherit, dont reimplement). ## Why Tier-sorting (JMAP -> ~/Schouwburg/6-Extra/Mail/<Tier>/YYYY/MM/DD/) lives only in crates/bastion (mail_sync.rs, email.rs); bastion is a broken symlink to an unbuilt binary so nothing sorts. A parallel Python poll->import chain files by Fastmail folder name -> the ~48k-file sprawl just stripped from ~/Mail. ## Scope - New crate crates/dpn-mail: JMAP fetch + tier-sort rules (which mail -> 0 Black..5 Red) + note render. - bastion becomes a thin CLI over dpn-mail. - Tier-sort rules first-class crate API. - Retire the Python folder-based import (email-import-to-mail folder_for); keep email-daily-link reading the tier tree. ## Done 2026-07-18 - ~/Mail -> ~/Schouwburg/6-Extra/Mail, tiers only (43,098 files). - Mail scripts repointed; identity-birthday-link off deleted ~/Public/Green/Identity. - 4 mail units stopped+disabled pending this crate. ## Another day - Server-side Fastmail filters pre-sorting into tier mailboxes.
Sign in to join this conversation.
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
n8k99/dragonpunkos#58
No description provided.