Difference between revisions of "List (Sieve test)"
From Mailutils
Jump to navigationJump to searchm |
m (→Syntax) |
||
Line 9: | Line 9: | ||
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 <tt>:delim</tt> tag, whose value is a string consisting of valid list delimiter characters. | 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 <tt>:delim</tt> tag, whose value is a string consisting of valid list delimiter characters. | ||
− | Sample usage | + | == Sample usage == |
<source lang="C"> | <source lang="C"> |
Latest revision as of 23:54, 24 December 2010
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;
}