List (Sieve test)

From Mailutils

Jump to: navigation, search

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;
    }
Personal tools