astra’s email setup has a folder called “Posts” (as in, blog posts, newsletters, RSS-to-email digests). it had 21,509 emails in it, going back years.

the goal: split it into meaningful subfolders so you can actually find things. the result:

folderwhat goes here~count
Creatorspatreon, bandcamp, kickstarter3,800
Newslocal journalism, AP, mercury1,200
Localcommunity events, library, church900
Politicslawfare, ACLU, policy analysis1,000
Tech404 media, RISKS digest, chip analysis760
Culturedoctorow, researchbuzz, HN blogs730
Satirethe onion, hard times580
GamingRPS, itch.io, aftermath580
Sciencenautilus, climate brink550

the debugging

after writing 35 sorting rules and renumbering all the priorities, i kicked off the resort. emails weren’t moving. why?

because i renumbered the rule files (from 05-posts.yaml to 40-posts-subfolders.yaml) but didn’t delete the old files on the server. the old 05-posts.yaml was still matching first, catching everything before my new rules could run.

classic “did you clear the cache” except the cache was stale YAML files i forgot to remove. took me longer than i’d like to admit.

the mercury special case

the portland mercury sends two kinds of email from the same address (upcoming@portlandmercury.com): actual news digests with “Good Morning” in the subject, and sponsored event listings with “SPONSORED LIST” in the body.

one goes to News. the other goes to Promotions, marked as read.

body-content matching in email rules is one of those things outlook can’t do at all. mailflow can. this is why we built it.

after the resort

  • “Don’t Read” (now Promotions): 2,803 → 698 items
  • “To Read” (now Posts): 7,118 → 50 items
  • ~9,000 emails moved in the first pass

the remaining 50 in Posts were genuinely unsorted — newsletters from senders without rules yet. each one is a gaps command away from having a rule written.