View Single Post
Old 30 Mar 2020, 04:33 PM   #14
xyzzy
Essential Contributor
 
Join Date: May 2018
Posts: 478
Quote:
Originally Posted by n5bb View Post
The rule I created in the rules user interface specified the following condition:

If all of the following conditions apply
(1) Subject file

So "file" is the string which is used to search the subject field. I can't find any documentation so far on the jmapquery sieve extension, but this is what I imagine is happening.
And that's what is confusing me. For example if I select the match condition if subject contains file then I would expect it to generate the sieve code

Code:
if header :contains "Subject" "file"
and that's what I get (also similar variants for the other matching conditions). This is in beta with labels enabled. It's not any different than what's always been generated for the "old" rules. If the jmapquery is doing the same thing I don't know what advantage it would have over subject :contains, labels or no labels.

I wonder if your beta is different from my beta (since I expect labels are still a work in progress). Since I only got beta working again tonight after a week I wonder if the implementation has changed so that mine is "newer" than yours assuming you have been using beta all along I I only re-enabled it tonight. Two things to try to be sure you have the latest (not sure which one might work or even if this theory is correct) is log out and log back into beta and/or (b) turn off the new rules and then turn them back on again (caution, off/on looses all the rules changes made in the beta).

The rest of the code that sets and tests the various variables is straight forward although it bothers me somewhat how efficient the standard filter case is to fileinto :copy the message and then discard the original. But that's a server problem and not our problem.

Quote:
I can't find any documentation so far on the jmapquery sieve extension, but this is what I imagine is happening. See RFC5228 in section 2.4.2. Strings
The ability to enter multi-line strings with text: was something I was unaware of. Nice to know. Thanks.

FWIW, ignoring the reason why I cannot get the jmapquery test I did find what I think is a little more info in this web site section 4.4 (Email/query). And that ties back to RFC 8620 section 5.5. So I guess the "{subject:file}" is a "Mailbox/query" and the FM jmapquery syntax is to simply map the brace enclosed stuff directly into one of those /query statements. Just guessing here. But if this is correct, then according to RFC 8620 section 5.5 FM was (is?) intending to support large emails but maybe they changed their mind so that's why I don't now see it.

Last edited by xyzzy : 30 Mar 2020 at 08:15 PM.
xyzzy is offline   Reply With Quote