SIEVE-TEST - Online Linux Manual PageSection : 1
Updated : 2010-08-23
Source : Pigeonhole for Dovecot v2.0
Note : Pigeonhole
NAMEsieve−test − Pigeonhole's Sieve script tester
SYNOPSISsieve−test [options] script−file mail−file
DESCRIPTIONThe sieve−test command is part of the Pigeonhole Project (pigeonhole(7)), which adds Sieve (RFC 5228) support to the Dovecot secure IMAP and POP3 server (dovecot(1)). Using the sieve−test command, the execution of Sieve scripts can be tested. This evaluates the script for the provided message, yielding a set of Sieve actions. Unless the −e option is specified, it does not actually execute these actions, meaning that it does not store or forward the message anywere. In stead, it prints a detailed list of what actions would normally take place. Note that, even when −e is specified, no messages are ever transmitted to remote SMTP recipients. The outgoing messages are always printed to stdout in stead. This is a very useful tool to debug the execution of Sieve scripts. It can be used to verify newly installed scripts for the intended behaviour and it can provide more detailed information about script execution problems that are reported by the Sieve plugin, for example by tracing the execution and evaluation of commands and tests respectively.
OPTIONS−c config−file Alternative Dovecot configuration file path. −C Force compilation. By default, the compiled binary is stored on disk. When this binary is found during the next execution of sieve−test and its modification time is more recent than the script file, it is used and the script is not compiled again. This option forces the script to be compiled, thus ignoring any present binary. Refer to sievec(1) for more information about Sieve compilation. −D Enable Sieve debugging. −d dump−file Causes a dump of the generated code to be written to the specified file. This is identical to the dump produced by sieve−dump(1). Using '−' as filename causes the dump to be written to stdout. −e Enables true execution of the set of actions that results from running the script. In combination with the −l parameter, the actual delivery of messages can be tested. Note that this will not transmit any messages to remote SMTP recipients. Such actions only print the outgoing message to stdout. −f envelope−sender The envelope sender or return path. This is what Sieve's envelope test will compare to when the "from" envelope part is requested. Also, this is where response messages are sent to. −l mail−location The location of the user's mail store. The syntax of this option's mail−location parameter is identical to what is used for the mail_location setting in the Dovecot config file. This parameter is typically used in combination with −e to test the actual delivery of messages. If −l is omitted when −e is specified, mail store actions like fileinto and keep are skipped. −m default−mailbox The mailbox where the keep action stores the message. This is "INBOX" by default. −r recipient−address The envelope recipient address. This is what Sieve's envelope test will compare to when the "to" envelope part is requested. Some tests and actions will also use this as the owner's e−mail address. −s script−file Specify additional scripts to be executed before the main script. Multiple −s arguments are allowed and the specified scripts are executed sequentially in the order specified at the command line. −t trace−file Enables runtime trace debugging. Trace debugging provides detailed insight in the operations performed by the Sieve script. Refer to the runtime trace debugging section below. The trace information is written to the specified file. Using '−' as filename causes the trace data to be written to stdout. −T trace−option Configures runtime trace debugging, which is enabled with the −t option. Refer to the runtime trace debugging section below. −x extensions Set the available extensions. The parameter is a space−separated list of the active extensions. By prepending the extension identifiers with + or −, extensions can be included or excluded relative to the default set of extensions. If no extensions have a + or − prefix, only those extensions that are explicitly listed will be enabled. Unknown extensions are ignored and a warning is produced. By default, all supported extensions are available, except for deprecated extensions or those that are still under development. For example −x "+imapflags −enotify" will enable the deprecated imapflags extension along with all extensions that are available by default, except for the enotify extension.
ARGUMENTSscript−file Specifies the script to (compile and) execute. Note that this tool looks for a pre−compiled binary file with a .svbin extension and with basename and path identical to the specified script. Use the −C option to disable this behavior by forcing the script to be compiled into a new binary. mail−file Specifies the file containing the e−mail message to test with.
USAGE
RUNTIME TRACE DEBUGGINGUsing the −t option, the sieve−test tool can be configured to print detailed trace information on the Sieve script execution to a file or standard output. For example, the encountered commands, the performed tests and the matched values can be printed. The runtime trace can be configured using the −T option, which can be specified multiple times. It can be used as follows: −Tlevel=... Set the detail level of the trace debugging. One of the following values can be supplied: actions (default) Only print executed action commands, like keep, fileinto, reject and redirect. commands Print any executed command, excluding test commands. tests Print all executed commands and performed tests. matching Print all executed commands, performed tests and the values matched in those tests. −Tdebug Print debug messages as well. This is usually only useful for developers and is likely to produce messy output. −Taddresses Print byte code addresses for the current trace output. Normally, only the current Sieve source code position (line number) is printed. The byte code addresses are equal to those listed in a binary dump produced using the −d option or by the sieve−dump(1) command.
DEBUG SIEVE EXTENSIONTo improve script debugging, the Sieve command line tools such as sieve−test support a custom Sieve language extension called 'vnd.dovecot.debug'. It adds the debug_print command that allows printing debug messages to stdout. Example: require "vnd.dovecot.debug"; if header :contains "subject" "hello" {
debug_print "Subject header contains hello!"; } Other tools like sievec and sieve−dump also recognize the vnd.dovecot.debug extension. In contrast, the actual Sieve plugin for the Dovecot LDA (dovecot−lda(1)) does not allow the use of the debug extension. So, keep in mind that scripts and compiled binaries that refer to de debug extension will fail to be run by the Sieve plugin itself. Note that it is not necessary to enable nor possible to disable the availability of the debug extension with the −x option.
EXIT STATUSsieve−test will exit with one of the following values: 0 Delivery was successful. (EX_OK, EXIT_SUCCES) 1 Operation failed. This is returned for almost all failures. (EXIT_FAILURE) 64 Invalid parameter given. (EX_USAGE)
FILES/usr/local/etc/dovecot/dovecot.conf Dovecot's main configuration file. /usr/local/etc/dovecot/conf.d/90−sieve.conf Sieve interpreter settings (included from Dovecot's main configuration file)
REPORTING BUGSReport bugs, including doveconf −n output, to the Dovecot Mailing List <dovecot@dovecot.org>. Information about reporting Dovecot and Pigeonhole bugs is available at: http://dovecot.org/bugreport.html
SEE ALSOdovecot(1), dovecot−lda(1), sieve−dump(1), sievec(1), pigeonhole(7) 0
Johanes Gumabo
Data Size : 24,441 byte
man-sieve-test.1Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 2 / 200,871
Visitor ID : :
Visitor IP : 18.191.147.146 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.