List (Sieve test)

From Mailutils
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

List is a Mailutils Sieve test. It is implemented as a loadable extension.

Syntax

 list [ COMPARATOR ] [ MATCH-TYPE ]
      [:delim <delimiters: string>]
      <headers: string-list> <key-list: string-list>

The list test evaluates to true if any of the headers matches any key. Each header is regarded as a list of keywords. By default, comma is assumed as a list separator. Alternative delimiter can be requested using the :delim tag, whose value is a string consisting of valid list delimiter characters.

Sample usage

  require "test-list";

  if list :matches :delim " ," [ "X-Spam-Keywords", "X-Spamd-Keywords" ]
                               [ "HTML_*", "FORGED_*" ]
    {
       discard;
    }