From be480fef87b918b822cc61358875ffc7941e61f4 Mon Sep 17 00:00:00 2001 From: Hans Wienen Date: Sat, 4 Jul 2026 13:22:37 +0200 Subject: [PATCH] Report decisions-based mailing list routing The prompts used to arrive at this change since the previous commit User asked to read decisions.json as an indicator for mailing-list handling, route choice h to appropriate functional mailboxes, route choice a under Afmelden, combine lists from the same person or organization, first draw up a report, then create a plan to add the structure to the existing approach. Any special observations that may be relevant for version management for this version. Be brief. This is a planning/report commit only. No sorter behavior changed; verplaats_bestaand.py still uses mail_routes.py and does not yet read decisions.json or a generated mailing-list policy. --- .../decisions_mailinglist_routing_report.md | 283 ++++++++++++++++++ restart_prompt.md | 10 + 2 files changed, 293 insertions(+) create mode 100644 reports/decisions_mailinglist_routing_report.md diff --git a/reports/decisions_mailinglist_routing_report.md b/reports/decisions_mailinglist_routing_report.md new file mode 100644 index 0000000..6e28cac --- /dev/null +++ b/reports/decisions_mailinglist_routing_report.md @@ -0,0 +1,283 @@ +# Decisions Mailing List Routing Report + +Date: 2026-07-04 + +Source: `decisions.json` + +Purpose: interpret `decisions.json` as the user intent for mailing-list handling and translate it into mailbox structure proposals. + +## Summary + +`decisions.json` contains 185 sender/list decision entries: + +- `h` ("houden"): 95 entries, 2,762 messages. +- `a` ("afmelden"): 89 entries, 2,683 messages. +- `s`: 1 entry, 26 messages. + +The current sorter does not read `decisions.json`. It only reads the hardcoded routes in `mail_routes.py`. Therefore these decisions are currently advisory data, not active routing behavior. + +## Interpretation + +Recommended interpretation: + +- `keuze: "h"` means keep the list and route it to a normal functional mailbox. +- `keuze: "a"` means isolate it under `Afmelden`, so it can be reviewed/unsubscribed without polluting normal destination folders. +- `keuze: "s"` is ambiguous. Treat it as "separate/review" until confirmed; for now it should be kept in a functional mailbox or a review mailbox, not under `Afmelden`. + +For `Afmelden`, use a separate top-level tree: + +- `INBOX.Afmelden..` + +Do not place final folders under `Archief`. + +## Combined Groups + +The following entries should be combined because they appear to come from the same organization/person even when domains differ: + +- Coursera: `coursera.org`, `email.coursera.org`, `m.mail.coursera.org`, `m.learn.coursera.org`. +- MIT Technology Review: `technologyreview.com`, `fulfillment.technologyreview.com`. +- Eva Keiffenheim: `evakeiffenheim.com`, `eva keiffenheim s lifelong learning club`, `eva keiffenheim from the learn letter`, and their `substack.com` transport. +- KPN: `kpn.com`, `campagnes.kpn.com`. +- PostNL: `postnl.nl`, `notificatie.postnl.nl`, `edm.postnl.nl`. +- STRATO: `strato.com`, `news.strato.com`, `marketingradar.strato.com`. +- Unive: `nieuwsbrief.unive.nl` and any future `unive.nl`. +- ICS: `icsmarketing.icscards.nl` and any future `icscards.nl`/`service.icscards.nl`. +- Viking: `delivery.vikingdirect.nl`, `online.vikingdirect.nl`, and any future `vikingdirect.nl`. +- bol: `bol.com`, `feedback.bol.com`. +- Coolblue: `coolblue.nl`, `coolblue.eu`. +- Vodafone: split by intent: keep `zakelijk.vodafone.nl` in normal telecom, but place `vodafone.nl` under `Afmelden` because it is marked `a`. +- Sophos/Cleverbridge: `home.sophos.com`, `cleverbridge.com`. +- Forte Labs/BASB: `fortelabs.co`, `fortelabs.com`. +- CIONET: `mn.co`, `cionet.com`. +- Gusti: `gusti-leer.nl`, `gusti-leder.de`, `gusti-pelle.it`. +- Nord: `nordvpn.com`, `nordpass.com`. +- DHL: split by intent: keep `dhlparcel.nl`, but place `dhlecommerce.nl` under `Afmelden` because it is marked `a`; `proxy.privault.rpip.nl` should be treated as DHL if retained. +- Proton: `proton.me`, `notify.proton.me`, `mail.proton.me`. +- Vonage/Nexmo: `vonage.com`, `insights.vonage.com`, `nexmo.com`. +- Visme: `accounts.visme.com`, `visme.co`. +- ClickUp: `clickup.com`, `team.wrike.com` are not the same organization; keep separate. +- Pleio/IBDS: `pleio.nl`, `mail.pleio.nl`. + +## Keep: Proposed Functional Mailboxes + +These `h` entries should be routed to normal destination folders. + +| Proposed mailbox | Entries/domains | Count | Notes | +| --- | --- | ---: | --- | +| `INBOX.Nieuwsbrieven.Leren.Coursera` | `coursera.org`, `email.coursera.org`, `m.mail.coursera.org`, `m.learn.coursera.org` | 492 | Already mostly represented in `mail_routes.py`; zero-count aliases should remain aliases. | +| `INBOX.Nieuwsbrieven.Leren.Storytelling with Data` | `storytellingwithdata.com` | 319 | Already represented. | +| `INBOX.Nieuwsbrieven.Leren.MIT Technology Review` | `technologyreview.com`, `fulfillment.technologyreview.com` | 287 | Already represented. | +| `INBOX.Nieuwsbrieven.Overig.Lendahand` | `lendahand.com` | 256 | Already represented. | +| `INBOX.Nieuwsbrieven.Leren.Eva Keiffenheim` | `evakeiffenheim.com`, Keiffenheim Substack entries via `substack.com` | 204 | Needs sender-name or List-ID handling for Substack; domain-only routing is insufficient. | +| `INBOX.Nieuwsbrieven.Overig.The Good Roll` | `thegoodroll.nl` | 89 | Already represented. | +| `INBOX.Mobiliteit.EV.Eneco eMobility` | `eneco-emobility.com`, `eneco.nl` | 96 | Already represented. | +| `INBOX.Nieuwsbrieven.Leren.Nick Milo` | `linkingyourthinking.com` | 76 | Already represented. | +| `INBOX.Mobiliteit.OV & Reizen.NS` | `ns.nl`, `email.ns.nl` | 63 | Already represented. | +| `INBOX.Werk.Opdrachten.OneStopSourcing` | `onestopsourcing.nl` | 51 | Already represented. | +| `INBOX.Nieuwsbrieven.Leren.AI Report` | `beehiiv.com`, `mail.beehiiv.com` | 39 | Already represented by domain aliases. | +| `INBOX.Werk.Opdrachten.Flextender` | `flextender.nl` | 37 | Already represented. | +| `INBOX.Financieel.Verzekering.Unive` | `nieuwsbrief.unive.nl` | 37 | Existing route uses `Univé`; prefer ASCII folder spelling if normalizing new folder names. | +| `INBOX.Financieel.Bank.ICS` | `icsmarketing.icscards.nl` | 36 | Already represented with aliases. | +| `INBOX.Nieuwsbrieven.Nieuws & Vakbladen.Vakblad Crisismanager` | `crisismanager.nl` | 35 | Already represented. | +| `INBOX.Diensten.Software.CogSci Apps` | `cogsciapps.com` | 33 | Already represented. | +| `INBOX.Nieuwsbrieven.Leren.Ben Tiggelaar` | `tiggelaar.nl` | 31 | Already represented. | +| `INBOX.Werk.Opdrachten.IMMENS` | `immens.nu` | 30 | Already represented. | +| `INBOX.Financieel.Bank.ABN AMRO` | `nl.abnamro.com` | 26 | Already represented; include `abnamro.nl` alias. | +| `INBOX.Bestellingen.PostNL` | `postnl.nl`, `notificatie.postnl.nl`, `edm.postnl.nl` | 48 | Already represented; zero-count alias should remain. | +| `INBOX.Bestellingen.123inkt` | `123inkt.nl`, `m.123inkt.nl` | 24 | Already represented; zero-count alias should remain. | +| `INBOX.Bestellingen.DHL` | `dhlparcel.nl`, `proxy.privault.rpip.nl` | 25 | Keep parcel notifications; do not merge with `dhlecommerce.nl` because that entry is marked `a`. | +| `INBOX.Diensten.Hosting.STRATO` | `strato.com`, `news.strato.com`, `marketingradar.strato.com` | 27 | Already represented. | +| `INBOX.Diensten.Telecom.Vodafone` | `zakelijk.vodafone.nl` | 20 | Keep business Vodafone; consumer `vodafone.nl` is marked `a`. | +| `INBOX.Diensten.Software.Formspree` | `formspree.io` | 19 | New functional folder. | +| `INBOX.Diensten.Telecom.KPN` | `campagnes.kpn.com`, `kpn.com` | 22 | Already represented. | +| `INBOX.Diensten.Hosting.Lets Encrypt` | `letsencrypt.org` | 16 | Already represented. | +| `INBOX.Diensten.Backup.Backblaze` | `backblaze.com` | 14 | Existing route is `Diensten.Hosting.Backblaze`; consider `Diensten.Backup.Backblaze`. | +| `INBOX.Nieuwsbrieven.Leren.Brian Keating` | `briankeating.com` | 14 | Already represented. | +| `INBOX.Werk.Opdrachten.Get There` | `getthere.nl` | 13 | Already represented. | +| `INBOX.Werk.Opdrachten.Jamie` | `hey.meetjamie.ai` | 13 | Already represented. | +| `INBOX.Werk.Opdrachten.Huckr` | `huckr.ai` | 13 | Already represented. | +| `INBOX.Nieuwsbrieven.Leren.MIT Open Learning` | `mit.edu` | 13 | Already represented. | +| `INBOX.Bestellingen.Allekabels` | `allekabels.nl` | 10 | Already represented. | +| `INBOX.Mobiliteit.OV & Reizen.Booking` | `booking.com` | 10 | Already represented. | +| `INBOX.Diensten.Software.Sophos` | `cleverbridge.com`, `home.sophos.com` | 12 | Already represented. | +| `INBOX.Mobiliteit.EV.FastNed` | `fastned.nl` | 9 | Already represented. | +| `INBOX.Mobiliteit.EV.OPnGO` | `opngo.com` | 9 | Already represented. | +| `INBOX.Mobiliteit.EV.Tesla` | `tesla.com` | 9 | Already represented. | +| `INBOX.Diensten.Software.Cursor` | `cursor.com` | 8 | Already represented. | +| `INBOX.Diensten.Software.1Password` | `1password.com` | 7 | Already represented. | +| `INBOX.Bestellingen.Viking` | `delivery.vikingdirect.nl`, `online.vikingdirect.nl` | 13 | Already represented; include `vikingdirect.nl` alias. | +| `INBOX.Diensten.Software.Matter` | `getmatter.com` | 7 | Already represented. | +| `INBOX.Werk.Overig.Gemeente Groningen` | `groningen.nl`, `groningenbereikbaar.nl` | 10 | Already represented. | +| `INBOX.Financieel.Verzekering.VEZA` | `heinenoord.nl` | 7 | Already represented. | +| `INBOX.Diensten.Software.Kahoot` | `team.kahoot.com` | 7 | Already represented. | +| `INBOX.Diensten.Hosting.TransIP` | `transip.nl` | 7 | Already represented. | +| `INBOX.Diensten.Software.Indigo Neo` | `indigoneo.com` | 6 | New functional folder. | +| `INBOX.Bestellingen.Office Centre` | `officecentre.nl` | 6 | Already represented. | +| `INBOX.Mobiliteit.EV.Shell Recharge` | `shellrecharge.com` | 6 | Already represented. | +| `INBOX.Bestellingen.Smartphonehoesjes` | `smartphonehoesjes.nl` | 6 | Already represented. | +| `INBOX.Werk.Overig.BOIP` | `boip.int` | 5 | Already represented. | +| `INBOX.Nieuwsbrieven.Leren.Elizabeth Butler` | `elizabethbutlermd.com` | 5 | Already represented. | +| `INBOX.Bestellingen.bol` | `bol.com`, `feedback.bol.com` | 9 | Already represented. | +| `INBOX.Mobiliteit.OV & Reizen.Flitsmeister` | `flitsmeister.nl` | 5 | Already represented. | +| `INBOX.Werk.Opdrachten.FutureXL` | `futurexl.nl` | 5 | Already represented. | +| `INBOX.Financieel.Bank.NPEX` | `npex.nl` | 5 | Already represented. | +| `INBOX.Nieuwsbrieven.Nieuws & Vakbladen.The Presentation Guru` | `presentation-guru.com` | 5 | Already represented. | +| `INBOX.Bestellingen.Sligro` | `sligro.nl` | 5 | Already represented. | +| `INBOX.Financieel.Bank.SnelStart` | `snelstart.nl` | 5 | Already represented. | +| `INBOX.Financieel.Bank.Tellow` | `tellow.nl` | 5 | Already represented. | +| `INBOX.Bestellingen.Coolblue` | `coolblue.nl`, `coolblue.eu` | 7 | Already represented. | +| `INBOX.Nieuwsbrieven.Nieuws & Vakbladen.Computable` | `jaarbeurs.nl` | 4 | Already represented. | +| `INBOX.Diensten.Software.Microsoft Teams` | `microsoft365.com` | 4 | Already represented. | +| `INBOX.Mobiliteit.EV.Mitsubishi` | `mmsn.nl` | 4 | Already represented. | +| `INBOX.Diensten.Software.Claude` | `claude.com` | 3 | Already represented. | +| `INBOX.Bestellingen.Makro` | `makro.nl` | 3 | Already represented. | +| `INBOX.Diensten.Software.MindNode` | `mindnode.com` | 3 | Already represented. | +| `INBOX.Diensten.Netwerk.Netherfind` | `netherfind.com` | 3 | New functional folder. | +| `INBOX.Diensten.Software.Papers` | `papersapp.com` | 3 | Already represented. | +| `INBOX.Diensten.Software.Perplexity` | `perplexity.ai` | 3 | Already represented. | +| `INBOX.Diensten.Email.Proton` | `mail.proton.me` | 0 | Zero-count keep alias; useful only if future Proton keep-routing is desired. | + +## Afmelden: Proposed Mailboxes + +These `a` entries should be routed below `INBOX.Afmelden`. + +| Proposed mailbox | Entries/domains | Count | Notes | +| --- | --- | ---: | --- | +| `INBOX.Afmelden.Netwerken.ResearchGate` | `researchgatemail.net` | 674 | Highest-volume unsubscribe candidate. | +| `INBOX.Afmelden.Fitness.STARS Personal Training` | `virtuagym.com` | 413 | Includes S.T.A.R.S via Virtuagym. | +| `INBOX.Afmelden.Netwerken.LinkedIn` | `linkedin.com` | 363 | High-volume unsubscribe candidate. | +| `INBOX.Afmelden.Nieuws.Het Financieele Dagblad` | `messagent.fdmediagroep.nl` | 108 | FD Techzaken/news. | +| `INBOX.Afmelden.Werk.FixedToday` | `fixedtoday.nl` | 97 | Armand/FixedToday. | +| `INBOX.Afmelden.Werk.Centre of Excellence Data Sharing Cloud` | `coe-dsc.nl` | 78 | Combine spelling variants. | +| `INBOX.Afmelden.Netwerken.CIONET` | `mn.co`, `cionet.com` | 83 | Same organization. | +| `INBOX.Afmelden.Winkels.Gusti` | `gusti-leer.nl`, `gusti-leder.de`, `gusti-pelle.it` | 88 | Same brand across country domains. | +| `INBOX.Afmelden.Leren.Forte Labs` | `fortelabs.co`, `fortelabs.com` | 76 | Same organization; current old folder `BASB` should be treated as source if unsubscribing. | +| `INBOX.Afmelden.Telecom.Vonage` | `vonage.com`, `insights.vonage.com`, `nexmo.com` | 50 | Same company/product family. | +| `INBOX.Afmelden.Beveiliging.Nord` | `nordvpn.com`, `nordpass.com` | 40 | Same vendor. | +| `INBOX.Afmelden.Bestellingen.DHL eCommerce` | `dhlecommerce.nl` | 29 | Do not merge with kept `dhlparcel.nl` unless user changes decision. | +| `INBOX.Afmelden.Leren.Taproot` | `taproot.com` | 27 | Anne Roberts/Taproot. | +| `INBOX.Afmelden.Productiviteit.Readwise` | `readwise.io` | 22 | Note historical overlap with Eva Keiffenheim sender names. | +| `INBOX.Afmelden.Leren.Scrimba` | `scrimba.com` | 21 | Coding education. | +| `INBOX.Afmelden.Software.Kilo Code` | `kilocode.ai` | 18 | Development tool. | +| `INBOX.Afmelden.Werk.Jooble` | `nl.jooble.org` | 18 | Job alerts. | +| `INBOX.Afmelden.Werk.Pleio IBDS` | `pleio.nl`, `mail.pleio.nl` | 18 | Combine real and alias domain. | +| `INBOX.Afmelden.Leren.FUN MOOC` | `fun-mooc.fr` | 17 | Course platform. | +| `INBOX.Afmelden.Software.Stackfield` | `stackfield.help` | 17 | Collaboration software. | +| `INBOX.Afmelden.Werk.De Staffing Groep` | `destaffinggroep.nl` | 16 | Work/recruitment. | +| `INBOX.Afmelden.Leren.Kaggle` | `kaggle.com` | 16 | Learning/data platform. | +| `INBOX.Afmelden.Diensten.Proton` | `proton.me`, `notify.proton.me` | 19 | Do not merge with zero-count keep alias without clarification. | +| `INBOX.Afmelden.Software.Genially` | `genially.com` | 14 | Presentation/creative software. | +| `INBOX.Afmelden.Backup.IDrive` | `idrive.com` | 14 | Backup service. | +| `INBOX.Afmelden.Projectmanagement.PMRGI` | `oppmi.com` | 14 | Project management resource group. | +| `INBOX.Afmelden.Energie.Zelf Energie Produceren` | `zelfenergieproduceren.nl` | 13 | Energy. | +| `INBOX.Afmelden.Software.Nuclino` | `nuclino.com` | 12 | Knowledge base software. | +| `INBOX.Afmelden.Apparaten.reMarkable` | `remarkable.com` | 12 | Device/vendor. | +| `INBOX.Afmelden.Software.Olares` | `olares.com` | 11 | Software/service. | +| `INBOX.Afmelden.Schrijven.Schrijf.be` | `schrijf.be` | 11 | Writing/training. | +| `INBOX.Afmelden.Software.VMware` | `connect.vmware.com` | 10 | VMware marketing. | +| `INBOX.Afmelden.Software.Audiogest` | `loops.audiogest.app` | 10 | Software/service. | +| `INBOX.Afmelden.Software.SmallCubed` | `smallcubed.com` | 10 | Software vendor. | +| `INBOX.Afmelden.Energie.Energie Collectief Nederland` | `titanomon.com` | 10 | Energy. | +| `INBOX.Afmelden.Telecom.Vodafone` | `vodafone.nl` | 10 | Consumer Vodafone; separate from kept business Vodafone. | +| `INBOX.Afmelden.Mobiliteit.Fulli` | `fulli.com` | 9 | Travel/toll service. | +| `INBOX.Afmelden.Advertenties.Google Ads` | `google.com` | 9 | Ads/marketing. | +| `INBOX.Afmelden.Software.Saga` | `saga.so` | 9 | Software/service. | +| `INBOX.Afmelden.Financieel.Triodos` | `triodos.nl` | 9 | Bank marketing. | +| `INBOX.Afmelden.Software.TurboScribe` | `turboscribe.ai` | 9 | Transcription service. | +| `INBOX.Afmelden.Financieel.bunq` | `bunq.com` | 8 | Bank marketing. | +| `INBOX.Afmelden.Winkels.Airo Paradise` | `ekwb.nl` | 8 | Retail/vendor. | +| `INBOX.Afmelden.Software.Parallels` | `parallels-universe.com` | 8 | Software vendor. | +| `INBOX.Afmelden.Leren.OReilly` | `et.oreilly.com` | 7 | Learning/publisher. | +| `INBOX.Afmelden.Software.Visme` | `accounts.visme.com`, `visme.co` | 9 | Same vendor. | +| `INBOX.Afmelden.Winkels.De Vulpenwereld` | `devulpenwereld.nl` | 6 | Retail. | +| `INBOX.Afmelden.Privacy.Incogni` | `incogni.com` | 6 | Privacy service. | +| `INBOX.Afmelden.Software.Smartsheet` | `smartsheet.com` | 6 | Software. | +| `INBOX.Afmelden.Netwerken.YourConnector` | `yourconnector.nl` | 6 | Networking/business. | +| `INBOX.Afmelden.Software.Zapier` | `zapier.com` | 6 | Software. | +| `INBOX.Afmelden.Software.ClickUp` | `clickup.com` | 5 | Software. | +| `INBOX.Afmelden.Presenteren.Duarte` | `duarte.com` | 5 | Presentation/training. | +| `INBOX.Afmelden.Winkels.PrintAbout` | `printabout.nl` | 5 | Retail. | +| `INBOX.Afmelden.Cloud.Microsoft Azure` | `promomail.microsoft.com` | 5 | Azure promotions. | +| `INBOX.Afmelden.Productiviteit.Tana` | `tana.inc` | 5 | Productivity software. | +| `INBOX.Afmelden.Leren.TIAS` | `tias.edu` | 5 | Education. | +| `INBOX.Afmelden.Media.VALUE IPTV VOD` | `weblinux.de` | 5 | Media/service. | +| `INBOX.Afmelden.Productiviteit.Capacities` | `capacities.io` | 4 | Productivity software. | +| `INBOX.Afmelden.Nieuws.Computable Enigma Research` | `enigmaresearch.nl` | 4 | Related to Computable but marked unsubscribe. | +| `INBOX.Afmelden.Winkels.Euroflorist` | `euroflorist.nl` | 4 | Retail. | +| `INBOX.Afmelden.Financieel.IEX Cloud` | `iexcloud.io` | 4 | Finance/API. | +| `INBOX.Afmelden.Diensten.Jetpack` | `jetpack.com` | 4 | WordPress/Automattic service. | +| `INBOX.Afmelden.Software.Linearity` | `linearity.io` | 4 | Design software. | +| `INBOX.Afmelden.Software.LiquidText` | `liquidtext.net` | 4 | Software. | +| `INBOX.Afmelden.Software.MURAL` | `mural.co` | 4 | Software. | +| `INBOX.Afmelden.Winkels.Office Noord` | `officenoord.nl` | 4 | Office retail. | +| `INBOX.Afmelden.Presenteren.Prezent` | `prezent.ai` | 4 | Presentation software. | +| `INBOX.Afmelden.Projectmanagement.Wrike` | `team.wrike.com` | 4 | Software. | +| `INBOX.Afmelden.Mobiliteit.Alfen` | `alfen.com` | 3 | Marked unsubscribe, despite current active route keeping Alfen under EV. Needs policy decision. | +| `INBOX.Afmelden.Productiviteit.GRID` | `gridnewsletter.com` | 3 | Productivity/newsletter. | +| `INBOX.Afmelden.Legal.Henchman` | `henchman.io` | 3 | Legal software. | +| `INBOX.Afmelden.Presenteren.Pitch` | `hi.pitch.com` | 3 | Presentation software. | +| `INBOX.Afmelden.Wonen.How To Buy A Home` | `howtobuyahome.com` | 3 | Real estate/education. | +| `INBOX.Afmelden.Leren.Kodeco` | `kodeco.com` | 3 | Learning platform. | +| `INBOX.Afmelden.Nieuws.Medium` | `medium.com` | 3 | Publishing platform. | +| `INBOX.Afmelden.Productiviteit.MindMeister` | `mindmeister.com` | 3 | Productivity software. | +| `INBOX.Afmelden.Fitness.NEXT Personal Gym` | `next-sports.nl` | 3 | Fitness. | +| `INBOX.Afmelden.Projectmanagement.TeamGantt` | `teamgantt.com` | 3 | Project management software. | + +## Separate/Review + +`circle8.nl` is marked `s` with 26 messages. + +Recommended temporary mailbox: + +- `INBOX.Werk.Opdrachten.Circle8` + +Reason: Circle8 is already present as a work/opportunity route in `mail_routes.py`. The meaning of `s` should be confirmed before moving it under `Afmelden`. + +## Conflicts With Current Routes + +These decisions conflict with the current hardcoded route table or expose incomplete routing: + +- `researchgatemail.net` is a high-volume `a` decision but has no active route, so it currently remains in place. +- Keiffenheim Substack messages are `h` but cannot be routed by domain alone because `substack.com` is shared. Need List-ID, sender address, or display-name matching. +- `fortelabs.co`/`fortelabs.com` are marked `a`, but old mailbox naming suggests they may currently live under `INBOX.Mailinglists.BASB`; they should not become a normal final folder if the decision is to unsubscribe. +- `alfen.com` is in the current active EV route but is marked `a` in `decisions.json`. This should be resolved before applying generated routes. +- `vodafone.nl` is marked `a`, while `zakelijk.vodafone.nl` is marked `h`. The route table currently maps both consumer and business Vodafone into `Diensten.Telecom.Vodafone`; this should be split. +- `dhlecommerce.nl` is marked `a`, while `dhlparcel.nl` is marked `h`. The route table currently maps both to `Bestellingen.DHL`; this should be split. +- `proton.me` and `notify.proton.me` are marked `a`, but `mail.proton.me` is a zero-count `h` placeholder. Keep these separate until the user clarifies. + +## Plan To Add This Structure + +1. Introduce a structured policy file generated from `decisions.json`. + - Suggested file: `mailinglist_routes.json`. + - Fields: `action`, `mailbox`, `domains`, `sender_patterns`, `list_id_patterns`, `source_decision_keys`, `notes`. + - Do not make `decisions.json` itself the runtime file; it contains unsubscribe URLs and analysis artifacts. + +2. Extend `mail_routes.py` to load mailing-list policy. + - Keep `DOMAIN_ROUTES` for stable functional/business mail. + - Add a runtime lookup for generated mailing-list rules. + - Support domain matching, exact sender address matching, display-name matching, and List-ID/header matching. + +3. Add `Afmelden` to destination folder creation. + - `maak_mappen.py` should create all `INBOX.Afmelden.*` folders from the generated policy. + - Existing `destination_folders()` should include both functional keep folders and unsubscribe review folders. + +4. Update routing precedence. + - Invoice keyword routing should remain first. + - Exact/list-specific mailing-list rules should run before broad domain rules, especially for shared senders such as `substack.com`. + - Domain rules should remain the fallback for normal service/vendor mail. + +5. Add audit output before moving. + - Dry-run should report counts per proposed destination, including `Afmelden`. + - It should also report unmatched `decisions.json` entries and current-route conflicts. + +6. Resolve conflicts before actual execution. + - Confirm `circle8.nl` meaning for `s`. + - Confirm `alfen.com`, `vodafone.nl`, `dhlecommerce.nl`, and Proton split behavior. + - Confirm whether zero-count aliases should be kept as future aliases. + +7. Test only on `backup@australius.nl`. + - Create the new folder structure in backup. + - Run dry-run sorter on backup. + - Review planned moves. + - Run actual sorter only after explicit confirmation. + diff --git a/restart_prompt.md b/restart_prompt.md index 7eea3af..2177c6c 100644 --- a/restart_prompt.md +++ b/restart_prompt.md @@ -153,6 +153,16 @@ Latest live mailbox verification: The prior script review is in `reports/script_review_findings.md`. +The decisions-based mailing-list routing proposal is in `reports/decisions_mailinglist_routing_report.md`. + +That report interprets `decisions.json` as advisory intent: + +- `keuze: "h"` means keep and route to an appropriate functional mailbox. +- `keuze: "a"` means route below `INBOX.Afmelden.*` for unsubscribe/review. +- `keuze: "s"` is ambiguous and should be confirmed before automation. +- Obvious aliases from the same sender or organization should be combined, including Coursera, MIT Technology Review, Eva Keiffenheim/Substack, PostNL, STRATO, Forte Labs, CIONET, Gusti, Nord, Proton, Vonage/Nexmo, and Visme. +- The report is not active code yet; `verplaats_bestaand.py` still routes through `mail_routes.py`. + Key earlier findings: - The old redistribution script selected some source folders read-only and then tried to delete messages.