Difference between revisions of "List (Sieve test)"
From Mailutils
Jump to navigationJump to search (Initial revision) |
m |
||
Line 20: | Line 20: | ||
} | } | ||
</source> | </source> | ||
+ | |||
+ | |||
+ | [[Category:Sieve]] | ||
+ | [[Category:Sieve Tests]] | ||
+ | [[Category:Sieve Extensions]] |
Revision as of 20:14, 17 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;
}