Initial commit

Claude has done a lot of work, but there are still some errors which
cause the mails to be distributed to wrong mail boxes. I am now going to
let codex and claude compete. They will have their own branches and
merge to main as soon as we are somewhere where we can switch AI.
This commit is contained in:
2026-07-04 11:18:05 +02:00
commit 4780c18d70
27 changed files with 43087 additions and 0 deletions
+242
View File
@@ -0,0 +1,242 @@
# mailrules.sieve
# Automatische mailsortering voor hans@australius.nl
# Upload via: python3 upload_sieve.py
#
# Noot: fileinto-paden zijn relatief aan de persoonlijke namespace.
# Op Dovecot-servers met INBOX. als prefix: voeg "INBOX." toe aan elke
# fileinto-waarde als mail niet aankomt (zie SIEVE_PREFIX in upload_sieve.py).
require [
"fileinto", "redirect", "copy",
"date", "variables",
"mime", "foreverypart",
"imap4flags"
];
# ════════════════════════════════════════════════════════════════════════════
# 1. FACTUREN (altijd eerst — vóór nieuwsbrieven en diensten)
# PDF-bijlagen worden doorgestuurd naar boekhouding@australius.nl
# (alleen voor nieuwe mail, geen terugwerkende kracht)
# ════════════════════════════════════════════════════════════════════════════
if anyof (
header :contains "Subject" ["factuur", "Factuur",
"invoice", "Invoice",
"rekening", "Rekening",
"nota", "Nota",
"betaalverzoek", "Betaalverzoek",
"receipt", "Receipt",
"orderbevestiging", "Orderbevestiging",
"order confirmation",
"betaling ontvangen",
"payment received",
"uw factuur", "Uw factuur",
"your invoice", "Your invoice",
"je factuur"]
) {
# Kwartaal bepalen op basis van ontvangstdatum
if currentdate :matches "year" "*" { set "jaar" "${1}"; }
if anyof (currentdate :is "month" "1",
currentdate :is "month" "2",
currentdate :is "month" "3") { set "kwartaal" "Q1"; }
elsif anyof (currentdate :is "month" "4",
currentdate :is "month" "5",
currentdate :is "month" "6") { set "kwartaal" "Q2"; }
elsif anyof (currentdate :is "month" "7",
currentdate :is "month" "8",
currentdate :is "month" "9") { set "kwartaal" "Q3"; }
else { set "kwartaal" "Q4"; }
# PDF aanwezig → doorsturen naar boekhouding (nieuwe mail vanaf activatiedatum)
foreverypart {
if anyof (
header :mime :param "filename" :matches "Content-Disposition" ["*.pdf", "*.PDF"],
header :mime :is "Content-Type" "application/pdf"
) {
redirect :copy "boekhouding@australius.nl";
break;
}
}
fileinto "Financieel.Facturen.${jaar}.${kwartaal}";
stop;
}
# ════════════════════════════════════════════════════════════════════════════
# 2. BANK & VERZEKERING
# ════════════════════════════════════════════════════════════════════════════
if address :domain :is "From" ["nl.abnamro.com", "abnamro.nl"] {
fileinto "Financieel.Bank.ABN AMRO"; stop;
}
if address :domain :is "From" ["icscards.nl", "icsmarketing.icscards.nl",
"service.icscards.nl"] {
fileinto "Financieel.Bank.ICS"; stop;
}
if address :domain :is "From" ["npex.nl"] { fileinto "Financieel.Bank.NPEX"; stop; }
if address :domain :is "From" ["snelstart.nl"] { fileinto "Financieel.Bank.SnelStart"; stop; }
if address :domain :is "From" ["tellow.nl"] { fileinto "Financieel.Bank.Tellow"; stop; }
if address :domain :is "From" ["unive.nl", "nieuwsbrief.unive.nl"] {
fileinto "Financieel.Verzekering.Univé"; stop;
}
if address :domain :is "From" ["heinenoord.nl"] {
fileinto "Financieel.Verzekering.VEZA"; stop;
}
# ════════════════════════════════════════════════════════════════════════════
# 3. WERK / OPDRACHTEN
# ════════════════════════════════════════════════════════════════════════════
if address :domain :is "From" ["flextender.nl"] { fileinto "Werk.Opdrachten.Flextender"; stop; }
if address :domain :is "From" ["onestopsourcing.nl"] { fileinto "Werk.Opdrachten.OneStopSourcing"; stop; }
if address :domain :is "From" ["immens.nu"] { fileinto "Werk.Opdrachten.IMMENS"; stop; }
if address :domain :is "From" ["circle8.nl"] { fileinto "Werk.Opdrachten.Circle8"; stop; }
if address :domain :is "From" ["getthere.nl"] { fileinto "Werk.Opdrachten.Get There"; stop; }
if address :domain :is "From" ["huckr.ai"] { fileinto "Werk.Opdrachten.Huckr"; stop; }
if address :domain :is "From" ["hey.meetjamie.ai"] { fileinto "Werk.Opdrachten.Jamie"; stop; }
if address :domain :is "From" ["futurexl.nl"] { fileinto "Werk.Opdrachten.FutureXL"; stop; }
if address :domain :is "From" ["boip.int"] { fileinto "Werk.Overig.BOIP"; stop; }
if address :domain :is "From" ["groningen.nl", "groningenbereikbaar.nl"] {
fileinto "Werk.Overig.Gemeente Groningen"; stop;
}
# ════════════════════════════════════════════════════════════════════════════
# 4. MOBILITEIT / EV
# ════════════════════════════════════════════════════════════════════════════
if address :domain :is "From" ["eneco-emobility.com", "eneco.nl"] {
fileinto "Mobiliteit.EV.Eneco eMobility"; stop;
}
if address :domain :is "From" ["shellrecharge.com"] { fileinto "Mobiliteit.EV.Shell Recharge"; stop; }
if address :domain :is "From" ["fastned.nl"] { fileinto "Mobiliteit.EV.FastNed"; stop; }
if address :domain :is "From" ["opngo.com"] { fileinto "Mobiliteit.EV.OPnGO"; stop; }
if address :domain :is "From" ["tesla.com"] { fileinto "Mobiliteit.EV.Tesla"; stop; }
if address :domain :is "From" ["mmsn.nl"] { fileinto "Mobiliteit.EV.Mitsubishi"; stop; }
if address :domain :is "From" ["alfen.com"] { fileinto "Mobiliteit.EV.Alfen"; stop; }
# ════════════════════════════════════════════════════════════════════════════
# 5. MOBILITEIT / OV & REIZEN
# ════════════════════════════════════════════════════════════════════════════
if address :domain :is "From" ["ns.nl", "email.ns.nl"] {
fileinto "Mobiliteit.OV & Reizen.NS"; stop;
}
if address :domain :is "From" ["booking.com"] { fileinto "Mobiliteit.OV & Reizen.Booking"; stop; }
if address :domain :is "From" ["flitsmeister.nl"]{ fileinto "Mobiliteit.OV & Reizen.Flitsmeister"; stop; }
# ════════════════════════════════════════════════════════════════════════════
# 6. BESTELLINGEN & BEZORGING
# ════════════════════════════════════════════════════════════════════════════
if address :domain :is "From" ["postnl.nl", "edm.postnl.nl",
"notificatie.postnl.nl"] { fileinto "Bestellingen.PostNL"; stop; }
if address :domain :is "From" ["dhlparcel.nl", "dhlecommerce.nl"] { fileinto "Bestellingen.DHL"; stop; }
if address :domain :is "From" ["gls-netherlands.com"] { fileinto "Bestellingen.GLS"; stop; }
if address :domain :is "From" ["bol.com", "feedback.bol.com"] { fileinto "Bestellingen.bol"; stop; }
if address :domain :is "From" ["coolblue.nl", "coolblue.eu"] { fileinto "Bestellingen.Coolblue"; stop; }
if address :domain :is "From" ["allekabels.nl"] { fileinto "Bestellingen.Allekabels"; stop; }
if address :domain :is "From" ["vikingdirect.nl",
"delivery.vikingdirect.nl",
"online.vikingdirect.nl"] { fileinto "Bestellingen.Viking"; stop; }
if address :domain :is "From" ["123inkt.nl", "m.123inkt.nl"] { fileinto "Bestellingen.123inkt"; stop; }
if address :domain :is "From" ["officecentre.nl"] { fileinto "Bestellingen.Office Centre"; stop; }
if address :domain :is "From" ["sligro.nl"] { fileinto "Bestellingen.Sligro"; stop; }
if address :domain :is "From" ["makro.nl"] { fileinto "Bestellingen.Makro"; stop; }
if address :domain :is "From" ["smartphonehoesjes.nl"] { fileinto "Bestellingen.Smartphonehoesjes"; stop; }
# ════════════════════════════════════════════════════════════════════════════
# 7. DIENSTEN / HOSTING
# ════════════════════════════════════════════════════════════════════════════
if address :domain :is "From" ["strato.com", "news.strato.com",
"marketingradar.strato.com"] { fileinto "Diensten.Hosting.STRATO"; stop; }
if address :domain :is "From" ["transip.nl"] { fileinto "Diensten.Hosting.TransIP"; stop; }
if address :domain :is "From" ["letsencrypt.org"] { fileinto "Diensten.Hosting.Lets Encrypt"; stop; }
if address :domain :is "From" ["backblaze.com"] { fileinto "Diensten.Hosting.Backblaze"; stop; }
# ════════════════════════════════════════════════════════════════════════════
# 8. DIENSTEN / TELECOM
# ════════════════════════════════════════════════════════════════════════════
if address :domain :is "From" ["kpn.com", "campagnes.kpn.com"] { fileinto "Diensten.Telecom.KPN"; stop; }
if address :domain :is "From" ["zakelijk.vodafone.nl",
"vodafone.nl"] { fileinto "Diensten.Telecom.Vodafone"; stop; }
# ════════════════════════════════════════════════════════════════════════════
# 9. DIENSTEN / SOFTWARE
# ════════════════════════════════════════════════════════════════════════════
if address :domain :is "From" ["cursor.com"] { fileinto "Diensten.Software.Cursor"; stop; }
if address :domain :is "From" ["1password.com"] { fileinto "Diensten.Software.1Password"; stop; }
if address :domain :is "From" ["home.sophos.com",
"cleverbridge.com"] { fileinto "Diensten.Software.Sophos"; stop; }
if address :domain :is "From" ["cogsciapps.com"] { fileinto "Diensten.Software.CogSci Apps"; stop; }
if address :domain :is "From" ["claude.com"] { fileinto "Diensten.Software.Claude"; stop; }
if address :domain :is "From" ["microsoft365.com"] { fileinto "Diensten.Software.Microsoft Teams"; stop; }
if address :domain :is "From" ["getmatter.com"] { fileinto "Diensten.Software.Matter"; stop; }
if address :domain :is "From" ["mindnode.com"] { fileinto "Diensten.Software.MindNode"; stop; }
if address :domain :is "From" ["papersapp.com"] { fileinto "Diensten.Software.Papers"; stop; }
if address :domain :is "From" ["team.kahoot.com"] { fileinto "Diensten.Software.Kahoot"; stop; }
if address :domain :is "From" ["perplexity.ai"] { fileinto "Diensten.Software.Perplexity"; stop; }
# ════════════════════════════════════════════════════════════════════════════
# 10. NIEUWSBRIEVEN / LEREN
# ════════════════════════════════════════════════════════════════════════════
if address :domain :is "From" ["coursera.org", "email.coursera.org",
"m.mail.coursera.org", "m.learn.coursera.org"] {
fileinto "Nieuwsbrieven.Leren.Coursera"; stop;
}
if address :domain :is "From" ["technologyreview.com",
"fulfillment.technologyreview.com"] {
fileinto "Nieuwsbrieven.Leren.MIT Technology Review"; stop;
}
if address :domain :is "From" ["mit.edu"] { fileinto "Nieuwsbrieven.Leren.MIT Open Learning"; stop; }
if address :domain :is "From" ["storytellingwithdata.com"]{ fileinto "Nieuwsbrieven.Leren.Storytelling with Data"; stop; }
if address :domain :is "From" ["linkingyourthinking.com"] { fileinto "Nieuwsbrieven.Leren.Nick Milo"; stop; }
if anyof (
address :domain :is "From" ["evakeiffenheim.com"],
header :contains "List-ID" "evakeiffenheim"
) {
fileinto "Nieuwsbrieven.Leren.Eva Keiffenheim"; stop;
}
if address :domain :is "From" ["tiggelaar.nl"] { fileinto "Nieuwsbrieven.Leren.Ben Tiggelaar"; stop; }
if address :domain :is "From" ["briankeating.com"] { fileinto "Nieuwsbrieven.Leren.Brian Keating"; stop; }
if address :domain :is "From" ["beehiiv.com", "mail.beehiiv.com"] {
fileinto "Nieuwsbrieven.Leren.AI Report"; stop;
}
if address :domain :is "From" ["elizabethbutlermd.com"] { fileinto "Nieuwsbrieven.Leren.Elizabeth Butler"; stop; }
# ════════════════════════════════════════════════════════════════════════════
# 11. NIEUWSBRIEVEN / NIEUWS & VAKBLADEN
# ════════════════════════════════════════════════════════════════════════════
if address :domain :is "From" ["crisismanager.nl"] { fileinto "Nieuwsbrieven.Nieuws & Vakbladen.Vakblad Crisismanager"; stop; }
if address :domain :is "From" ["jaarbeurs.nl"] { fileinto "Nieuwsbrieven.Nieuws & Vakbladen.Computable"; stop; }
if address :domain :is "From" ["presentation-guru.com"]{ fileinto "Nieuwsbrieven.Nieuws & Vakbladen.The Presentation Guru"; stop; }
# ════════════════════════════════════════════════════════════════════════════
# 12. NIEUWSBRIEVEN / OVERIG
# ════════════════════════════════════════════════════════════════════════════
if address :domain :is "From" ["lendahand.com"] { fileinto "Nieuwsbrieven.Overig.Lendahand"; stop; }
if address :domain :is "From" ["thegoodroll.nl"] { fileinto "Nieuwsbrieven.Overig.The Good Roll"; stop; }
# ════════════════════════════════════════════════════════════════════════════
# 13. TECHNISCH
# ════════════════════════════════════════════════════════════════════════════
if anyof (
header :contains "Subject" ["DMARC", "SPF", "DKIM"],
header :contains "From" "dmarc"
) {
fileinto "Technisch.DMARC"; stop;
}
if anyof (
header :contains "Subject" ["delivery failed", "undeliverable",
"mailer-daemon", "mail delivery"],
address :is "From" "mailer-daemon@australius.nl"
) {
fileinto "Technisch"; stop;
}