How hard could it be to design a sane mail filtering language? I guess I'll just have to take that on one of these days.
How hard could it be to design a sane mail filtering language? I guess I'll just have to take that on one of these days.
Probably a good exercise as a Rust project, but I run OpenBSD so C (or C+Perl or C+Lua--Lua making it trivial to build a single binary) would probably be a better fit--no runtime or even build dependencies. An interim measure for OpenBSD might be to apply pledge and unveil sandboxing. I keep meaning to inspect how procmail loads and parses procmailrc to see if they could be applied early enough to provide realistic mitigations.
EDIT: The original author has resumed maintenance?
for mail in processor:
if mail['X-Bugzilla-URL'].contains('zephyr-ds'):
mail.move('Zephyr')
elif ...
Given the layer it operates on you don't need to worry quite so much about processing errors dropping mails either.In the specific case of Arabic characters in headers, you can see from the source¹ that when decoding fails an error is logged but you're still able to work on that header. How much work you're willing to put in to recover from that error by guessing charsets(perhaps via chardet²) is up to you.
The level of customisation that is possible is my favourite feature of this type of software. You can start with a config that is just a couple of lines, but it grows with you with no artificial ceiling imposed by the software author's imagination.
¹ https://github.com/mailprocessing/mailprocessing/blob/master...
I don't need webmail at all but it's useful just for this.