Node:Library Description, Next:Input Language, Up:libsieve
Libsieve
is GNU implementation of the mail filtering
language Sieve.
The library is built around a Sieve Machine -- an abstract computer constructed specially to handle mail filtering tasks. This computer has two registers: program counter and numeric accumulator; a runtime stack of unlimited depth and the code segment. A set of functions is provided for creating and destroying instances of Sieve Machine, manipulating its internal data, compiling and executing a sieve program.
The following is a typical scenario of using libsieve
:
sieve_compile
function is called to translate
the Sieve source into an equivalent program executable by the
Machine
keep
are marked with the delete
flag. Thus, running mailbox_expunge
upon the mailbox finishes
the job, leaving in the mailbox only those messages that were preserved
by the filter.
The following sections describe in detail the functions from the Sieve Library.