Add INBOX candidate routing rules
Prompts used since the previous commit: - Kijk nu in de INBOX en kijk of er nog meer kandidaten zijn om in de nieuwe structuur te plaatsen. - Zuiderzee.net mag je zo laten. de oude werkcontexten mag je in aparte mappen zetten. Gmail mag je ook zo laten. KvK mag onder Administratie.KvK Special observations: - Added domain routes only; no mailbox-affecting script was run. - verplaats_log.json remains modified from the user's run and was intentionally not staged.
This commit is contained in:
+22
-2
@@ -14,8 +14,11 @@ DOMAIN_ROUTES: list[tuple[list[str], str]] = [
|
|||||||
(["nl.abnamro.com", "abnamro.nl"], "Financieel.Bank.ABN AMRO"),
|
(["nl.abnamro.com", "abnamro.nl"], "Financieel.Bank.ABN AMRO"),
|
||||||
(["icscards.nl", "icsmarketing.icscards.nl", "service.icscards.nl"], "Financieel.Bank.ICS"),
|
(["icscards.nl", "icsmarketing.icscards.nl", "service.icscards.nl"], "Financieel.Bank.ICS"),
|
||||||
(["npex.nl"], "Financieel.Bank.NPEX"),
|
(["npex.nl"], "Financieel.Bank.NPEX"),
|
||||||
|
(["n26.com"], "Financieel.Bank.N26"),
|
||||||
|
(["update.bunq.com", "hello.bunq.com"], "Financieel.Bank.bunq"),
|
||||||
(["snelstart.nl"], "Financieel.Bank.SnelStart"),
|
(["snelstart.nl"], "Financieel.Bank.SnelStart"),
|
||||||
(["tellow.nl"], "Financieel.Bank.Tellow"),
|
(["tellow.nl"], "Financieel.Bank.Tellow"),
|
||||||
|
(["mijnkantoorapp.nl", "dijkman-ac.nl"], "Financieel.Boekhouding.Dijkman"),
|
||||||
(["unive.nl", "nieuwsbrief.unive.nl"], "Financieel.Verzekering.Univé"),
|
(["unive.nl", "nieuwsbrief.unive.nl"], "Financieel.Verzekering.Univé"),
|
||||||
(["heinenoord.nl"], "Financieel.Verzekering.VEZA"),
|
(["heinenoord.nl"], "Financieel.Verzekering.VEZA"),
|
||||||
(["flextender.nl"], "Werk.Opdrachten.Flextender"),
|
(["flextender.nl"], "Werk.Opdrachten.Flextender"),
|
||||||
@@ -24,10 +27,15 @@ DOMAIN_ROUTES: list[tuple[list[str], str]] = [
|
|||||||
(["circle8.nl"], "Werk.Opdrachten.Circle8"),
|
(["circle8.nl"], "Werk.Opdrachten.Circle8"),
|
||||||
(["getthere.nl"], "Werk.Opdrachten.Get There"),
|
(["getthere.nl"], "Werk.Opdrachten.Get There"),
|
||||||
(["huckr.ai"], "Werk.Opdrachten.Huckr"),
|
(["huckr.ai"], "Werk.Opdrachten.Huckr"),
|
||||||
(["hey.meetjamie.ai"], "Werk.Opdrachten.Jamie"),
|
(["hey.meetjamie.ai", "notifications.meetjamie.ai"], "Werk.Opdrachten.Jamie"),
|
||||||
|
(["maandag.com"], "Werk.Opdrachten.Maandag"),
|
||||||
(["futurexl.nl"], "Werk.Opdrachten.FutureXL"),
|
(["futurexl.nl"], "Werk.Opdrachten.FutureXL"),
|
||||||
|
(["drenthe.nl"], "Werk.Oude context.Provincie Drenthe"),
|
||||||
|
(["rdw.nl"], "Werk.Oude context.RDW"),
|
||||||
|
(["plasbossinade.nl"], "Werk.Oude context.PlasBossinade"),
|
||||||
(["boip.int"], "Werk.Overig.BOIP"),
|
(["boip.int"], "Werk.Overig.BOIP"),
|
||||||
(["groningen.nl", "groningenbereikbaar.nl"], "Werk.Overig.Gemeente Groningen"),
|
(["groningen.nl", "groningenbereikbaar.nl"], "Werk.Overig.Gemeente Groningen"),
|
||||||
|
(["kvk.nl"], "Administratie.KvK"),
|
||||||
(["eneco-emobility.com", "eneco.nl"], "Mobiliteit.EV.Eneco eMobility"),
|
(["eneco-emobility.com", "eneco.nl"], "Mobiliteit.EV.Eneco eMobility"),
|
||||||
(["shellrecharge.com"], "Mobiliteit.EV.Shell Recharge"),
|
(["shellrecharge.com"], "Mobiliteit.EV.Shell Recharge"),
|
||||||
(["fastned.nl"], "Mobiliteit.EV.FastNed"),
|
(["fastned.nl"], "Mobiliteit.EV.FastNed"),
|
||||||
@@ -52,16 +60,24 @@ DOMAIN_ROUTES: list[tuple[list[str], str]] = [
|
|||||||
(["smartphonehoesjes.nl"], "Bestellingen.Smartphonehoesjes"),
|
(["smartphonehoesjes.nl"], "Bestellingen.Smartphonehoesjes"),
|
||||||
(["strato.com", "news.strato.com", "marketingradar.strato.com"], "Diensten.Hosting.STRATO"),
|
(["strato.com", "news.strato.com", "marketingradar.strato.com"], "Diensten.Hosting.STRATO"),
|
||||||
(["transip.nl"], "Diensten.Hosting.TransIP"),
|
(["transip.nl"], "Diensten.Hosting.TransIP"),
|
||||||
|
(["cloud86.io", "cloud86.zendesk.com"], "Diensten.Hosting.Cloud86"),
|
||||||
|
(["godaddy.com"], "Diensten.Hosting.GoDaddy"),
|
||||||
(["letsencrypt.org"], "Diensten.Hosting.Lets Encrypt"),
|
(["letsencrypt.org"], "Diensten.Hosting.Lets Encrypt"),
|
||||||
(["backblaze.com"], "Diensten.Hosting.Backblaze"),
|
(["backblaze.com"], "Diensten.Hosting.Backblaze"),
|
||||||
(["kpn.com", "campagnes.kpn.com"], "Diensten.Telecom.KPN"),
|
(["kpn.com", "campagnes.kpn.com"], "Diensten.Telecom.KPN"),
|
||||||
(["zakelijk.vodafone.nl", "vodafone.nl"], "Diensten.Telecom.Vodafone"),
|
(["zakelijk.vodafone.nl", "vodafone.nl"], "Diensten.Telecom.Vodafone"),
|
||||||
|
(["nordaccount.com"], "Diensten.Beveiliging.Nord"),
|
||||||
|
(["info.expressvpn.com"], "Diensten.Beveiliging.ExpressVPN"),
|
||||||
|
(["email.remarkable.com"], "Diensten.Apparaten.reMarkable"),
|
||||||
(["cursor.com"], "Diensten.Software.Cursor"),
|
(["cursor.com"], "Diensten.Software.Cursor"),
|
||||||
(["1password.com"], "Diensten.Software.1Password"),
|
(["1password.com"], "Diensten.Software.1Password"),
|
||||||
(["home.sophos.com", "cleverbridge.com"], "Diensten.Software.Sophos"),
|
(["home.sophos.com", "cleverbridge.com"], "Diensten.Software.Sophos"),
|
||||||
(["cogsciapps.com"], "Diensten.Software.CogSci Apps"),
|
(["cogsciapps.com"], "Diensten.Software.CogSci Apps"),
|
||||||
(["claude.com"], "Diensten.Software.Claude"),
|
(["claude.com", "mail.anthropic.com"], "Diensten.Software.Claude"),
|
||||||
|
(["canva.com", "account.canva.com"], "Diensten.Software.Canva"),
|
||||||
|
(["microsoft.com"], "Diensten.Software.Microsoft"),
|
||||||
(["microsoft365.com"], "Diensten.Software.Microsoft Teams"),
|
(["microsoft365.com"], "Diensten.Software.Microsoft Teams"),
|
||||||
|
(["market.envato.com"], "Diensten.Software.Envato"),
|
||||||
(["getmatter.com"], "Diensten.Software.Matter"),
|
(["getmatter.com"], "Diensten.Software.Matter"),
|
||||||
(["mindnode.com"], "Diensten.Software.MindNode"),
|
(["mindnode.com"], "Diensten.Software.MindNode"),
|
||||||
(["papersapp.com"], "Diensten.Software.Papers"),
|
(["papersapp.com"], "Diensten.Software.Papers"),
|
||||||
@@ -77,11 +93,15 @@ DOMAIN_ROUTES: list[tuple[list[str], str]] = [
|
|||||||
(["briankeating.com"], "Nieuwsbrieven.Leren.Brian Keating"),
|
(["briankeating.com"], "Nieuwsbrieven.Leren.Brian Keating"),
|
||||||
(["beehiiv.com", "mail.beehiiv.com"], "Nieuwsbrieven.Leren.AI Report"),
|
(["beehiiv.com", "mail.beehiiv.com"], "Nieuwsbrieven.Leren.AI Report"),
|
||||||
(["elizabethbutlermd.com"], "Nieuwsbrieven.Leren.Elizabeth Butler"),
|
(["elizabethbutlermd.com"], "Nieuwsbrieven.Leren.Elizabeth Butler"),
|
||||||
|
(["notify.orcid.org"], "Nieuwsbrieven.Leren.ORCID"),
|
||||||
(["crisismanager.nl"], "Nieuwsbrieven.Nieuws & Vakbladen.Vakblad Crisismanager"),
|
(["crisismanager.nl"], "Nieuwsbrieven.Nieuws & Vakbladen.Vakblad Crisismanager"),
|
||||||
(["jaarbeurs.nl"], "Nieuwsbrieven.Nieuws & Vakbladen.Computable"),
|
(["jaarbeurs.nl"], "Nieuwsbrieven.Nieuws & Vakbladen.Computable"),
|
||||||
(["presentation-guru.com"], "Nieuwsbrieven.Nieuws & Vakbladen.The Presentation Guru"),
|
(["presentation-guru.com"], "Nieuwsbrieven.Nieuws & Vakbladen.The Presentation Guru"),
|
||||||
(["lendahand.com"], "Nieuwsbrieven.Overig.Lendahand"),
|
(["lendahand.com"], "Nieuwsbrieven.Overig.Lendahand"),
|
||||||
(["thegoodroll.nl"], "Nieuwsbrieven.Overig.The Good Roll"),
|
(["thegoodroll.nl"], "Nieuwsbrieven.Overig.The Good Roll"),
|
||||||
|
(["tasks.clickup.com"], "Afmelden.Software.ClickUp"),
|
||||||
|
(["gemeenteprojecten.talent-pool.com"], "Afmelden.Werk.Gemeenteprojecten"),
|
||||||
|
(["engage.istockphoto.com"], "Afmelden.Creatief.iStock"),
|
||||||
(["dmarc.postmarkapp.com"], "Technisch.DMARC"),
|
(["dmarc.postmarkapp.com"], "Technisch.DMARC"),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
+18
-1
@@ -51,6 +51,9 @@ Destination policy:
|
|||||||
- Final destination folders are functional folders such as `Financieel`, `Werk`, `Diensten`, `Nieuwsbrieven`, `Bestellingen`, `Mobiliteit`, and `Technisch`.
|
- Final destination folders are functional folders such as `Financieel`, `Werk`, `Diensten`, `Nieuwsbrieven`, `Bestellingen`, `Mobiliteit`, and `Technisch`.
|
||||||
- Final destination folders under `Archief` should not be created.
|
- Final destination folders under `Archief` should not be created.
|
||||||
- `Technisch` and `Technisch.DMARC` are valid destination folders.
|
- `Technisch` and `Technisch.DMARC` are valid destination folders.
|
||||||
|
- `Administratie` is a valid destination root; KvK messages route to `Administratie.KvK`.
|
||||||
|
- Old work-context senders may be routed into separate folders under `Werk.Oude context.*`.
|
||||||
|
- `zuiderzee.net` and generic `gmail.com` messages should remain unmatched for now.
|
||||||
|
|
||||||
Sieve:
|
Sieve:
|
||||||
|
|
||||||
@@ -65,6 +68,19 @@ Shared modules:
|
|||||||
- `imap_utils.py` centralizes IMAP modified UTF-7 folder encoding/decoding, quoted mailbox names, LIST parsing, and folder listing.
|
- `imap_utils.py` centralizes IMAP modified UTF-7 folder encoding/decoding, quoted mailbox names, LIST parsing, and folder listing.
|
||||||
- `mail_routes.py` centralizes `PREFIX`, domain routes, invoice keywords, source-folder exclusions, already-sorted folders, invoice quarter routing, generated destination folders, and normalized mailing-list routing.
|
- `mail_routes.py` centralizes `PREFIX`, domain routes, invoice keywords, source-folder exclusions, already-sorted folders, invoice quarter routing, generated destination folders, and normalized mailing-list routing.
|
||||||
|
|
||||||
|
Current INBOX candidate domain routing additions:
|
||||||
|
|
||||||
|
- `mijnkantoorapp.nl` and `dijkman-ac.nl` route to `Financieel.Boekhouding.Dijkman`.
|
||||||
|
- `drenthe.nl`, `rdw.nl`, and `plasbossinade.nl` route to separate old-work-context folders under `Werk.Oude context`.
|
||||||
|
- `kvk.nl` routes to `Administratie.KvK`.
|
||||||
|
- `godaddy.com`, `cloud86.io`, and `cloud86.zendesk.com` route under `Diensten.Hosting`.
|
||||||
|
- `mail.anthropic.com`, `canva.com`, `account.canva.com`, `microsoft.com`, `market.envato.com`, `email.remarkable.com`, `nordaccount.com`, and `info.expressvpn.com` route under `Diensten`.
|
||||||
|
- `maandag.com` and `notifications.meetjamie.ai` route under `Werk.Opdrachten`.
|
||||||
|
- `tasks.clickup.com`, `gemeenteprojecten.talent-pool.com`, and `engage.istockphoto.com` route under `Afmelden`.
|
||||||
|
- `n26.com`, `update.bunq.com`, and `hello.bunq.com` route under `Financieel.Bank`.
|
||||||
|
- `notify.orcid.org` routes to `Nieuwsbrieven.Leren.ORCID`.
|
||||||
|
- `zuiderzee.net` and `gmail.com` are intentionally not routed.
|
||||||
|
|
||||||
Scripts using shared IMAP folder handling:
|
Scripts using shared IMAP folder handling:
|
||||||
|
|
||||||
- `verplaats_bestaand.py`
|
- `verplaats_bestaand.py`
|
||||||
@@ -176,6 +192,7 @@ Notable policy risks:
|
|||||||
Latest local code verification:
|
Latest local code verification:
|
||||||
|
|
||||||
- `python3 -m py_compile *.py`
|
- `python3 -m py_compile *.py`
|
||||||
|
- Explicit `route_from_subject()` checks for the latest INBOX candidate domains, including negative checks for `zuiderzee.net` and `gmail.com`.
|
||||||
- `git diff --check`
|
- `git diff --check`
|
||||||
|
|
||||||
Earlier route/folder consistency check returned:
|
Earlier route/folder consistency check returned:
|
||||||
@@ -190,7 +207,7 @@ Latest live mailbox verification:
|
|||||||
- Direct read-only IMAP count audit of both `hans` and `backup` accounts after the mirror.
|
- Direct read-only IMAP count audit of both `hans` and `backup` accounts after the mirror.
|
||||||
- The user ran the previous dry-run sorter version against `backup@australius.nl`. It reached `INBOX.Archief.2022.verzonden` after completing `INBOX.Archief.2022.inkomend`, then the IMAP server closed the connection with `Server shutting down.`. The current code has reconnect/retry handling for that failure mode.
|
- The user ran the previous dry-run sorter version against `backup@australius.nl`. It reached `INBOX.Archief.2022.verzonden` after completing `INBOX.Archief.2022.inkomend`, then the IMAP server closed the connection with `Server shutting down.`. The current code has reconnect/retry handling for that failure mode.
|
||||||
- The user started an actual sorter run on `backup@australius.nl`; it began moving messages from `INBOX` and then crashed on an unexpected IMAP `FETCH` response shape: `AttributeError: 'int' object has no attribute 'decode'`. The local `verplaats_log.json` contains processed `INBOX:<uid>` entries from that run and should be preserved if the user resumes sorting. The current code fixes this parser crash.
|
- The user started an actual sorter run on `backup@australius.nl`; it began moving messages from `INBOX` and then crashed on an unexpected IMAP `FETCH` response shape: `AttributeError: 'int' object has no attribute 'decode'`. The local `verplaats_log.json` contains processed `INBOX:<uid>` entries from that run and should be preserved if the user resumes sorting. The current code fixes this parser crash.
|
||||||
- No live mailbox script was run by Codex while adding the latest reconnect changes.
|
- A later read-only INBOX inspection of the `backup` account found 1,908 unmatched messages and identified additional candidate sender domains. No mailbox-affecting script was run by Codex.
|
||||||
|
|
||||||
## What To Do Next
|
## What To Do Next
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user