### 5.9 GNU Extensions ¶

This section summarizes the GNU extensions to the sieve language

1. Multiline strings syntax

   GNU libmu_sieve understands the following multiline string syntax:

       text:[-][delimiter]
       ....
       delimiter

   The meaning of optional flags is the same as in shell “here document” construct: the dash strips all leading tab characters from the string body, thus allowing it to be indented in a natural fashion; delimiter introduces the new end-of-text delimiter instead of the default dot. If delimiter starts with a backslash, no preprocessing will be performed within a string.

2. Handling of the `require` statement.
   - According to the RFC an error must occur if a `require` appears after a command other than `require`. The GNU sieve library allows for interspersing the `require` and other statements. The only requirement is that `require` must occur before a statement that is using the required capability (see Require Statement).
   - Prefixing the required capability with “test” requires the use of an extension test.
3. `header` test

   The `header` takes an optional argument `:mime`, meaning to scan the headers from each part of a multipart message.

4. `size` test

   In case the optional argument (:over|:under) is omitted, exact equality is assumed.

5. `envelope` test

   The only value that can be meaningfully used as the first required argument of an `envelope` test is ‘`from`’. This limitation may disappear from the subsequent releases.

6. `fileinto` action

   It is possible to specify permissions on the mailbox, in case it will be created (see fileinto).

7. Match type optional argument.

   Along with the usual `:is`, `:matches` and `:contains` matching type, GNU sieve library understands `:regex` type. This matching type toggles POSIX Extended Regular Expression matching.