RE: https://social.tchncs.de/@Lapizistik/116087161953914165
I can pull mail addresses out of thin air.
My mailer knows about
local_part_suffix = +* : -*
local_part_suffix_optional
so you can mail to kris@..., but also to kris+keks@... or kris-keks@...
They will all go to the kris user account,and there will be X-local-part-suffix: keks set for any mail to kris-keks@....
Of course, I don't want all of that in my inbox.
:0
* ^X-local-part-suffix:.*kris-\/[^@]+
$MAILDIR/.special.`echo $MATCH | sed -e 's!([^)]*)!!g' -e 's![^a-zA-Z0-9_-]!_!g' | tr A-Z a-z`/
The what:
Anything that matches X-local-part-suffix: kris-something@... will be caught by that rule.
We take something from the rule, lowercase it, and replace all characters that are not letters or numbers or _ or - with a _. We then push that into the folder INBOX/special/something or whatever that replacement produces.
So mail to kris-keks@... goes to the folder INBOX/special/keks. If it doesn't exist we create it.