|
GNU Mailutils |
General-Purpose Mail Package |
Official GNU Software |
| GNU Mailutils Manual (split by node): | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
? |
Sieve interpreter sieve allows to apply Sieve scripts to an
arbitrary number of mailboxes. GNU sieve implements a superset
of the Sieve language as described in RFC 3028. See section Sieve Language,
for a description of the Sieve language. See section GNU Extensions, for a
discussion of differences between the GNU implementation of Sieve and
its standard.
sieve The sieve invocation syntax is:
sieve [options] script |
where script denotes the filename of the sieve program to parse, and options is one or more of the following:
Compile script and exit.
Clear Sieve library path. See also clear-library-path.
Clear Sieve include path. See also clear-include-path.
Specify debug flags. The flags argument is a sequence of one or more of the following letters:
| ‘g’ | Enable main parser traces |
| ‘T’ | Enable mailutils traces |
| ‘P’ | Trace network protocols |
| ‘t’ | Enable sieve trace |
| ‘i’ | Trace the program instructions |
Compile the script, dump disassembled code on standard output and exit.
Override the user email address. This is useful for reject and
redirect actions. By default, the user email address is deduced
from the user name and the full name of the machine where
sieve is executed. See also email.
Append directory dir to the list of directories searched for include files. See also include-path.
Mailbox to sieve (defaults to user's system mailbox). See also mbox-url.
Keep on going if execution fails on a message. See also keep-going.
Append directory dir to the list of directories searched for library files. See also library-path.
Dry run: do not execute any actions, just print what would be done.
Ticket file for mailbox authentication. See also ticket.
Log all actions executed. See also verbose.
The behavior of sieve is affected by the following
configuration statements:
| Statement | Reference |
|---|---|
| debug | See section Debug Statement. |
| tls | See section TLS Statement. |
| mailbox | See section Mailbox Statement. |
| locking | See section Locking Statement. |
| logging | See section Logging Statement. |
| mailer | See section Mailer Statement. |
The following statements configure sieve-specific features:
This block statement configures search paths sieve uses to
locate its loadable modules. See section Require Statement, for a detailed
information of this feature.
This statement may contain the following sub-statements:
clear-library-path, clear-include-path,
library-path, include-path, which are described below.
Used within the sieve block statement.
If bool is ‘true’, clear library search path.
Used within the sieve block statement.
If bool is ‘true’, clear include search path.
Used within the sieve block statement.
Add directories to sieve library search path. Argument is a
string containing a colon-separated list of directories.
Used within the sieve block statement.
Add directories to the include search path. Argument is a string containing a colon-separated list of directories.
If bool is ‘true’, do not abort if execution of a Sieve script fails on a particular message.
Sets URL of the mailbox to be processed.
Sets the name of the ticket file for user authentication.
Sets Sieve debug flags. See Logging and Debugging, for a detailed description.
If bool is ‘true’, log all executed actions.
If bool is ‘true’, print source locations along with action
logs. This statement takes effect only if verbose true is also
set.
Set user e-mail address. This is useful for reject and
redirect actions. By default, the user email address is deduced
from the user name and the full name of the machine where sieve is
executed.
The default behavior of sieve is to remain silent about
anything except errors. However, it is sometimes necessary to see
which actions are executed and on which messages. This is particularly
useful when debugging the sieve scripts. The ‘--verbose’
(‘-v’) option outputs log of every action executed.
Option ‘--debug’ allows to produce even more detailed debugging information. This option takes an argument specifying the debugging level to be enabled. The argument can consist of the following letters:
This flag enables sieve tracing. It means that every test will be logged when executed.
This flag enables debugging of underlying mailutils library.
Trace network protocols: produces log of network transactions executed while running the script.
Enable main parser traces. This is useful for debugging the sieve grammar.
Trace the program instructions. It is the most extensive debugging level. It produces the full execution log of a sieve program, showing each instruction and states of the sieve machine. It is only useful for debugging the code generator.
Note, that there should be no whitespace between the short variant of the option (‘-d’), and its argument. Similarly, when using long option (‘--debug’), its argument must be preceded by equal sign.
If the argument to ‘--debug’ is omitted, it defaults to ‘TPt’.
Option ‘--dump’ produces the disassembled dump of the compiled sieve program.
By default sieve output all diagnostics on standard error and verbose
logs on standard output. This behaviour is changed when
‘--log-facility’ is given in the command line ().
This option causes sieve to output its diagnostics to
the given syslog facility.
sieve The basic set of sieve actions, tests and comparators may be extended
using loadable extensions. Usual require mechanism is used for
that.
When processing arguments for require statement, sieve
uses the following algorithm:
LTDL_LIBRARY_PATH.
library-path statement (see library-path) in Sieve configuration file.
#searchpath Sieve directive (see #searchpath).
LD_LIBRARY_PATH).
The value of LTDL_LIBRARY_PATH and LD_LIBRARY_PATH must be
a colon-separated list of absolute directories, for example,
‘"/usr/lib/mypkg:/lib/foo"’.
In any of these directories, sieve first attempts to find
and load the given filename. If this fails, it tries to append the
following suffixes to the file name:
sieve executes its
initialization function (see below) and again looks up the name
in the symbol table. If found, search terminates successfully.
sieve then displays
the following diagnostic message:
source for the required action NAME is not available |
| GNU Mailutils Manual (split by node): | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
? |
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.