ProtonMail / libsieve-php

libsieve-php is a library to manage and modify sieve (RFC5228) scripts. It contains a parser for the sieve language (including extensions) and a client for the managesieve protocol. It is written entirely in PHP 8+.
https://packagist.org/packages/protonlabs/libsieve-php
GNU General Public License v3.0
22 stars 7 forks source link

Allow `requires` tag with tests. #14

Open ThHareau opened 6 years ago

ThHareau commented 6 years ago

For now, it is possible to use requires inside comparators, tags, matchtype and addresspart.

The relational extension uses that for the count match type:

    <matchtype name="count">
        <requires type="comparator" name="i;ascii-numeric" regex="i;ascii-numeric" />
        <parameter type="string" name="relation string" regex="(lt|le|eq|ge|gt|ne)" />
    </matchtype>

It would be useful to be able to define a test that requires a specific field.