Track Sieve/plan/Roundcube files and update move log
- Add financ.sieve, plan.md, roundcube.txt to version control - Update verplaats_log.json after backup dry run - Gitignore codex.session session file
This commit is contained in:
@@ -8,3 +8,4 @@ web_config.json
|
|||||||
sort_mail_daemon_state.json
|
sort_mail_daemon_state.json
|
||||||
verplaats_log_*.json
|
verplaats_log_*.json
|
||||||
unsubscribe_log.json
|
unsubscribe_log.json
|
||||||
|
codex.session
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# mailcat_roundcube.sieve
|
||||||
|
# Generated from domain_routes.json and mailinglist_routes.json.
|
||||||
|
# Intended for Roundcube/Managesieve import for hans@australius.nl.
|
||||||
|
# Do not use :copy: these rules sort incoming mail into destination folders.
|
||||||
|
# Historical mailbox reordering still requires verplaats_bestaand.py.
|
||||||
|
|
||||||
|
require ["fileinto", "date", "variables"];
|
||||||
|
|
||||||
|
# Financial rules are first. The invoice rule stays dynamic, so individual quarters are not separately ordered.
|
||||||
|
# rule:[Financieel / Facturen / Dynamisch kwartaal]
|
||||||
|
if header :contains "Subject" ["factuur", "invoice", "rekening", "nota", "betaalverzoek", "receipt", "orderbevestiging", "order confirmation", "betaling ontvangen", "payment received", "uw factuur", "your invoice", "je factuur"] {
|
||||||
|
if currentdate :matches "year" "*" {
|
||||||
|
set "jaar" "${1}";
|
||||||
|
}
|
||||||
|
if anyof (currentdate :is "month" "1", currentdate :is "month" "2", currentdate :is "month" "3") {
|
||||||
|
fileinto "INBOX.Financieel.Facturen.${jaar}.Q1";
|
||||||
|
} elsif anyof (currentdate :is "month" "4", currentdate :is "month" "5", currentdate :is "month" "6") {
|
||||||
|
fileinto "INBOX.Financieel.Facturen.${jaar}.Q2";
|
||||||
|
} elsif anyof (currentdate :is "month" "7", currentdate :is "month" "8", currentdate :is "month" "9") {
|
||||||
|
fileinto "INBOX.Financieel.Facturen.${jaar}.Q3";
|
||||||
|
} else {
|
||||||
|
fileinto "INBOX.Financieel.Facturen.${jaar}.Q4";
|
||||||
|
}
|
||||||
|
stop;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
Plan
|
||||||
|
|
||||||
|
Fase 0 — Download (jij voert uit)
|
||||||
|
|
||||||
|
Draai python download_mailbox.py in de projectmap. Het script:
|
||||||
|
- vraagt om je e-mailadres + wachtwoord (lokaal, gaat niet via mij)
|
||||||
|
- downloadt alle mappen en mails naar mailbox/<mapnaam>/<id>.eml
|
||||||
|
- is herstart-safe: al gedownloade mails worden overgeslagen
|
||||||
|
:q
|
||||||
|
Fase 1 — Overzichten (ik maak na download)
|
||||||
|
|
||||||
|
1. Mailinglijsten — via List-ID / List-Unsubscribe headers; per lijst: volume, laatste mail, advies (afmelden / houden)
|
||||||
|
2. Facturen in mailbox — PDF-bijlagen + mails met factuurtermen; per afzender gesorteerd
|
||||||
|
3. Factuurlinks — mails die verwijzen naar een portaal ("bekijk je factuur op..."); per website
|
||||||
|
4. Prullenbak-kandidaten — auto-notificaties, lege threads, doublures, oude nieuwsbrieven
|
||||||
|
|
||||||
|
Fase 2 — Mappenindeling + mailrules (ik stel voor na analyse)
|
||||||
|
|
||||||
|
Op basis van wat ik in de mailbox aantref, maak ik een voorstel voor:
|
||||||
|
- een logische, intuïtieve mappenstructuur (bijv. Financieel / Projecten / Abonnementen / Archief)
|
||||||
|
- server-side mailrules (Sieve-formaat, het meest gangbare bij IMAP-providers) om inkomende mail automatisch te sorteren
|
||||||
|
|
||||||
|
Fase 3 — Scripts (ik schrijf, jij voert uit op echte mailbox)
|
||||||
|
|
||||||
|
- Unsubscribe-script — per mailinglijst: mailto of HTTP List-Unsubscribe aanroepen
|
||||||
|
- Opruim-script — geselecteerde mails via IMAP naar Trash verplaatsen
|
||||||
|
- Factuur-plan — per website een aanpak voor geautomatiseerd ophalen (login-flow, download-URL)
|
||||||
|
- Mailrules-implementatie — instructies of script om de Sieve-rules op de server te zetten
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
require ["copy","date","fileinto","regex"];
|
||||||
|
# rule:[kwartaalmail]
|
||||||
|
if allof (date :regex "Date" "month" "[789]", date :is "Date" "year" "2026")
|
||||||
|
{
|
||||||
|
fileinto :copy "INBOX.Notes";
|
||||||
|
}
|
||||||
|
# rule:[zuiderzee]
|
||||||
|
if allof (header :contains "from" "zuiderzee")
|
||||||
|
{
|
||||||
|
fileinto :copy "INBOX.Notes";
|
||||||
|
}
|
||||||
|
|
||||||
+7977
-3182
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user