-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Match subject base64 #127
Comments
IIUC, neither I think it should not be that hard to add support for encoding/decoding strings as the OpenSSL library that is required by imapfilter already has a C API for doing that. But first lets clarify what you want to do, and what works/doesn't work... |
Lets clarify: First:
Second:
One block = one subject. |
I see, I'll have to look into this when I have some time, as it looks useful to be able to match such |
workaround with maildrop http://www.courier-mta.org/maildrop/, that works with base64 encoded headers and message body maildrop configuration configuration test example imapfilter part `all = account1['mailbox']:match_to('(?i)all@') for _, mesg in ipairs(all) do all = all - spam spam:copy_messages(account1['spam']) all:copy_messages(account1['mailbox2']) |
Also, it seems those names are conformant to rfc2047. So, despite its prohibited to use them now in mailing, they are still often guest in the wild. Like received from misconfigured Outlook, etc. |
For what it's worth, I got around this by creating a I put it up here: https://paste.sr.ht/~cybolic/902986c795599f558165c63bcb65a3d4ae15881e |
This also affects the match_from method. It seems spam heavily relies on utf-8 encoding to bypass "simple" filters, and imapfilter also does not catch those. How would i decode the header before it is passed to match_from? |
At my work mail server encodes whole subject to base64 if it contains at least one non-ascii character.
This problem persists not only with me, if google for "decode mail subject" you can find many other servers.
Currently I haven't found any way to force subject decoding by
imapfilter
, which completely eliminates usefullness of imapfilter for me.I can't easily replace
match_subject
withcontain_subject
because of spoken language structure when I need to match many word variations with regexes. Moreover in almost all cases subject is the single way to distinguish work-spam from useful work messages and urgent from pending, as I can't make such decision based on to/from/etc fields.Would it be too much to ask for appropriate piece of code to add into imapfilter?)
If you are really tight on time to write and test it (as everyone is), please, point me at places in code where I could start working to implement it myself.
The text was updated successfully, but these errors were encountered: