diff --git a/.hgignore b/.hgignore index 681d58ac8a179505f8038afe2fefd555f8ea7739..a091e78e4f139d7f853e6ccb5acc5e847407d13a 100644 --- a/.hgignore +++ b/.hgignore @@ -56,7 +56,7 @@ m4/lt~obsolete.m4 **/.deps src/sieve-tools/sievec -src/sieve-tools/sieved +src/sieve-tools/sieve-dump src/sieve-tools/sieve-test src/sieve-tools/sieve-filter diff --git a/NEWS b/NEWS index 2ba7d29bdb06420fcb9c35bd372b9f1f5683f9a9..4ee2dcc44ffc75bac04df6a118c3a2f9ca9455a8 100644 --- a/NEWS +++ b/NEWS @@ -34,6 +34,8 @@ v0.2.0 [TO BE RELEASED] Stephan Bosch <stephan@rename-it.nl> most notable example is that when the LDA Sieve plugin is trying to store a binary for a global script, the resulting failure message also points the administrator towards pre-compiling the script with sievec. + * Renamed the sieved tool to sieve-dump. The original name was somewhat + confusing. - Multiscript: fixed duplicate implicit keep caused by erroneous execution state update. - Prevented assertion failure due to currupt binary string representation. diff --git a/README b/README index 399af5779bfd62987f2ba8d387ec73e9ee136057..dd188b190979db3c8022e1d09f618c8a46570f8d 100644 --- a/README +++ b/README @@ -173,7 +173,7 @@ sieve-test - This is a universal Sieve test tool for testing the effect of a can be used to test the actual delivery of the message and show the messages that would normally be sent through SMTP. -sieved - Dumps the content of a Sieve binary file for (development) +sieve-dump - Dumps the content of a Sieve binary file for (development) debugging purposes. When installed, man pages are also available for these commands. In this package diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am index 156e434e4dd1abe1c719461ee538199a4de5af3a..eeae3d0992269be6c1782903c88595c5f1434e7a 100644 --- a/doc/man/Makefile.am +++ b/doc/man/Makefile.am @@ -11,7 +11,7 @@ EXTRA_DIST = \ dist_man_MANS = \ sievec.1 \ - sieved.1 \ + sieve-dump.1 \ sieve-test.1 \ $(unfinished_mans) diff --git a/doc/man/sieved.1 b/doc/man/sieve-dump.1 similarity index 86% rename from doc/man/sieved.1 rename to doc/man/sieve-dump.1 index 724eea85d0b2097128f1959f3158520a97b61672..30bde1647130577c337486715cd7121d91daec35 100644 --- a/doc/man/sieved.1 +++ b/doc/man/sieve-dump.1 @@ -1,19 +1,19 @@ -.TH "SIEVED" "1" "11 July 2010" +.TH "SIEVE-DUMP" "1" "11 July 2010" .SH NAME -sieved \- Sieve script binary dump tool for the Dovecot secure IMAP server +sieve\-dump \- Sieve script binary dump tool for the Dovecot secure IMAP server .SH SYNOPSIS -sieved [\fB\-c\fR \fIconfig\-file\fR] [\fB\-x\fR "\fIextension extension ...\fR"] \fIsieve\-binary\fR [\fIout\-file\fR] +sieve\-dump [\fB\-c\fR \fIconfig\-file\fR] [\fB\-x\fR "\fIextension extension ...\fR"] \fIsieve\-binary\fR [\fIout\-file\fR] .br .SH DESCRIPTION .PP -The \fBsieved\fP command is part of the Pigeonhole Sieve implementation for the Dovecot secure +The \fBsieve\-dump\fP command is part of the Pigeonhole Sieve implementation for the Dovecot secure IMAP server. Sieve (RFC 5228) is a simple and highly extensible language for filtering e\-mail messages. It can be implemented for any type of mail access protocol, mail architecture and operating system. The language cannot execute external programs and in its basic form it does not provide the means to cause infinite loops, making it suitable for running securely on mail servers where mail users have no permission run arbitrary programs. .PP -Using the \fBsieved\fP command, Sieve binaries, which are produced for instance by +Using the \fBsieve\-dump\fP command, Sieve binaries, which are produced for instance by \fBsievec\fP(1), can be transformed into a human\-readable textual representation. This can provide valuable insight in how the Sieve script is executed. This is also particularly useful to view corrupt binaries that can result from bugs in the Sieve implementation. This tool is @@ -30,7 +30,7 @@ arbitrary data. For the base language implementation two blocks are used: the fi a specification of all required language extensions and the second containing the main Sieve program. Compiled Sieve programs are represented as flat byte code and therefore the dump of the main program is a disassembly listing of the interpreter operations. Extensions can define -new operations and use additional blocks. Therefore, the output of \fBsieved\fP depends greatly +new operations and use additional blocks. Therefore, the output of \fBsieve\-dump\fP depends greatly on the language extensions used when compiling the binary. .SH OPTIONS .TP diff --git a/doc/man/sieve-filter.1 b/doc/man/sieve-filter.1 index 2cac97c46161bafd0676a6f3e402912d389208cd..5733eb9bf0a095f7075f01b0c296e5f9b1f175f0 100644 --- a/doc/man/sieve-filter.1 +++ b/doc/man/sieve-filter.1 @@ -149,7 +149,7 @@ Dovecot was written by Timo Sirainen <tss@iki.fi>. .SH "SEE ALSO" .BR sievec (1), -.BR sieved (1), +.BR sieve\-dump (1), .BR sieve\-test (1) .PP Dovecot website: http://www.dovecot.org diff --git a/doc/man/sieve-test.1 b/doc/man/sieve-test.1 index c2dc2098760eb8dd63ae105b4def446c60d1deb6..031fe121308429fad20faa874d0875c3c491d960 100644 --- a/doc/man/sieve-test.1 +++ b/doc/man/sieve-test.1 @@ -60,7 +60,7 @@ Enable Sieve debugging. .TP \fB\-d\fP \fIdump\-file\fP Causes a dump of the generated code to be written to the specified file. This is identical to the -dump produced by \fBsieved\fR(1). Using '\-' as filename causes the dump to be written to \fBstdout\fP. +dump produced by \fBsieve\-dump\fR(1). Using '\-' as filename causes the dump to be written to \fBstdout\fP. .TP \fB\-e\fP Turns on true execution of the set of actions that results from running the script. In combination @@ -144,7 +144,7 @@ Print debug messages as well. This is usually only useful for developers and pro \fB\-Taddresses\fP Print byte code addresses for the current trace output. Normally, only the current Sieve source code position is printed. The byte code addresses are equal to those listed in a binary dump produced -using the \fB\-d\fP option or by the \fBsieved(1)\fP command. +using the \fB\-d\fP option or by the \fBsieve\-dump(1)\fP command. .SH DEBUG SIEVE EXTENSION .PP @@ -162,7 +162,7 @@ if header :contains "subject" "hello" { .PP } .PP -Other tools like \fBsievec\fP and \fBsieved\fP also recognize the vnd.dovecot.debug extension. In contrast, +Other tools like \fBsievec\fP and \fBsieve\-dump\fP also recognize the vnd.dovecot.debug extension. In contrast, the actual Sieve plugin for the Dovecot LDA 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. .PP @@ -175,7 +175,7 @@ Pigeonhole for Dovecot was written by Stephan Bosch <stephan@rename\-it.nl>. Dovecot was written by Timo Sirainen <tss@iki.fi>. .SH "SEE ALSO" .BR sievec (1), -.BR sieved (1) +.BR sieve\-dump (1) .PP Dovecot website: http://www.dovecot.org .PP diff --git a/doc/man/sievec.1 b/doc/man/sievec.1 index bce1dc2454b47fef4183c814e52030a77a027c95..dffd0f640a5516d90e1c66f1675c77d2152de767 100644 --- a/doc/man/sievec.1 +++ b/doc/man/sievec.1 @@ -38,7 +38,7 @@ is a directory. .PP The \fBsievec\fP command is also useful to verify Sieve scripts before using. Additionally, with the \fB\-d\fP option it can output a textual (and thus human\-readable) dump of the generated Sieve -code to the specified file. The output is then identical to what the \fBsieved\fP(1) command produces +code to the specified file. The output is then identical to what the \fBsieve\-dump\fP(1) command produces for a stored binary file. This output is mainly useful to find bugs in the compiler that yield corrupt binaries. .SH OPTIONS @@ -50,7 +50,7 @@ Alternative Dovecot configuration file path. Don't write the binary to \fIout\-file\fP, but write a textual dump of the binary in stead. In this context, the \fIout\-file\fP value '\-' has special meaning: it causes the the textual dump to be written to \fBstdout\fP. The \fIout\-file\fP argument may also be omitted, which has -the same effect as '\-'. The output is identical to what the \fBsieved\fP(1) command produces for +the same effect as '\-'. The output is identical to what the \fBsieve\-dump\fP(1) command produces for a compiled Sieve binary file. Note that this option is not allowed when the \fIout\-file\fP argument is a directory. .TP @@ -70,7 +70,7 @@ Pigeonhole for Dovecot was written by Stephan Bosch <stephan@rename\-it.nl>. .PP Dovecot was written by Timo Sirainen <tss@iki.fi>. .SH "SEE ALSO" -.BR sieved (1), +.BR sieve\-dump (1), .BR sieve\-test (1) .PP Dovecot website: http://www.dovecot.org diff --git a/src/sieve-tools/Makefile.am b/src/sieve-tools/Makefile.am index 7f409bd2249a6465dafff87e3a796fa6b6227665..48e8d687a40ed2cdceeeab78a22d7052ef8d1098 100644 --- a/src/sieve-tools/Makefile.am +++ b/src/sieve-tools/Makefile.am @@ -1,6 +1,6 @@ SUBDIRS = debug -bin_PROGRAMS = sievec sieved sieve-test +bin_PROGRAMS = sievec sieve-dump sieve-test if BUILD_UNFINISHED bin_PROGRAMS += sieve-filter @@ -32,12 +32,12 @@ sievec_SOURCES = \ # Sieve Dump Tool -sieved_LDFLAGS = -export-dynamic -sieved_LDADD = $(libs_ldadd) -sieved_DEPENDENCIES = $(libs_deps) +sieve_dump_LDFLAGS = -export-dynamic +sieve_dump_LDADD = $(libs_ldadd) +sieve_dump_DEPENDENCIES = $(libs_deps) -sieved_SOURCES = \ - sieved.c +sieve_dump_SOURCES = \ + sieve-dump.c # Sieve Test Tool diff --git a/src/sieve-tools/sieved.c b/src/sieve-tools/sieve-dump.c similarity index 90% rename from src/sieve-tools/sieved.c rename to src/sieve-tools/sieve-dump.c index 495faaf643dd67465ba591124b90191446577dc1..1e9d8a0046ca375250ed0c6f31c668b17a72768e 100644 --- a/src/sieve-tools/sieved.c +++ b/src/sieve-tools/sieve-dump.c @@ -30,8 +30,8 @@ static void print_help(void) { printf( -"Usage: sieved [-P <plugin>] [-x <extensions>]\n" -" <sieve-binary> [<out-file>]\n" +"Usage: sieve-dump [-P <plugin>] [-x <extensions>]\n" +" <sieve-binary> [<out-file>]\n" ); } @@ -47,7 +47,7 @@ int main(int argc, char **argv) int exit_status = EXIT_SUCCESS; int c; - sieve_tool = sieve_tool_init("sieved", &argc, &argv, "P:x:", FALSE); + sieve_tool = sieve_tool_init("sieve-dump", &argc, &argv, "P:x:", FALSE); binfile = outfile = NULL;