RealRaven2000 / FiltaQuilla

Adds many new mail filter actions to Thunderbird
http://quickfilters.quickfolders.org/filtaquilla.html
GNU General Public License v3.0
88 stars 17 forks source link

Feature Request: Filter Emails by Specific Header (Content-Type) #238

Open Philipp0205 opened 12 months ago

Philipp0205 commented 12 months ago

Hello,

I'm encountering a frequent scenario where I receive numerous meeting invitations via email. I'd like to automatically organize these by moving them to a specific folder.

Currently, I'm considering using the Content-Type header to identify these specific emails. The relevant invitations typically include this header:

Content-Type: text/calendar; charset="utf-8"; method=REQUEST

Integrating such a feature would greatly enhance email organization for similar use cases.

Thank you!

RealRaven2000 commented 11 months ago

If we can get access t this header then support for content-type may be a good idea. If it is generally as complex as your example, a mere string match may not be sufficient; it looks like there is the type (text/calendar) followed by a numer of attribute/value pairs. So should we simply have a comma separated syntax like:

contentType,attrib=value,attrib2!=value,….

this could be used to match only the attributes given i the filter search and ignore any additional ones. We could use = for matching an attribute value and strip double quote marks from the Content-Type string, and maybe != for attribute being not equal to the given value. With this syntax you would have to enter:

text/calendar,charset=utf-8,method=REQUEST

should the attribute match be case sensitive or not?

i guess the main consideration here is whether your you want to cast a really narrow net or if you want to match more widely in order to be robust against varying syntax of different mail clients. E,g. Some mailers may not use the quotation marks around the charset parameter, or the request method my be spelled lowercase or in other Capitalisations.