[Users] nesting conditions in matcherrc

wwp wwp at claws-mail.org
Sat Aug 28 07:10:34 UTC 2021


Hello Adrian,


On Sat, 28 Aug 2021 07:48:50 +0100 Adrian via Users <users at lists.claws-mail.org> wrote:

> I tried setting the following in matcherrc
> condition1 & condition2 | condition3...
> 
> and it gets rewritten as
> condition1 | condition2 | condition3...
> 
> What I actually need of course is
> condition1 & (condition2 | condition3...)
> 
> Can this be done?

It can't. Mixing & and |, () and de facto operator precedence are not
implemented.


> If not, is there a way to test for (e.g.) any of a set of strings IF
> the From is 'Fred' ?

Your question is not clear to me. Moreover, "is" is not accurate
enough. Does it mean "contains" or "is equal to"?
If you need to determine if the From header contains or is Fred,
semantically it could appear to be the same, but in the domain of
filtering expressions, it's definitely different.

What you might only need is one condition:
from matchcase "Fred"
but it may match much more than what you expect.
 
> OK, confession.  I edit matcherrc manually so I can't expect claws mail
> to handle everything I do. I'm prepared to behave and use the UI if it
> will let me do this.

Editing by hand the matcherrc file is not what I'd call a good idea,
unless you really know what you're doing and well know how filtering
works and filtering expressions in Claws Mail. Getting to the UI is
what I'd recommend ;-).


Regards,

-- 
wwp
https://useplaintext.email/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.claws-mail.org/pipermail/users/attachments/20210828/8af48f8c/attachment.sig>


More information about the Users mailing list