From 5a9e7203d6b7c886253d28073007ad9696cc7eda Mon Sep 17 00:00:00 2001
From: Stephan Bosch <stephan@rename-it.nl>
Date: Tue, 11 Nov 2008 23:12:34 +0100
Subject: [PATCH] Created man page for the sieved command.

---
 Makefile.am      |  3 ++-
 doc/man/sieved.1 | 42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 1 deletion(-)
 create mode 100644 doc/man/sieved.1

diff --git a/Makefile.am b/Makefile.am
index ff4a55a65..1b655eb97 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,7 +9,8 @@ EXTRA_DIST = \
 	ChangeLog
 
 dist_man_MANS = \
-	doc/man/sievec.1
+	doc/man/sievec.1 \
+	doc/man/sieved.1
 
 if MAINTAINER_MODE
 ChangeLog: .hg/dirstate
diff --git a/doc/man/sieved.1 b/doc/man/sieved.1
new file mode 100644
index 000000000..17a273595
--- /dev/null
+++ b/doc/man/sieved.1
@@ -0,0 +1,42 @@
+.TH "SIEVED" "1" "11 November 2008"
+.SH NAME
+sieved \- Sieve script binary dump tool for the Dovecot secure IMAP server
+.SH SYNOPSIS
+sieved \fIsieve-binary\fR [\fIoutfile\fR]
+.br
+.SH DESCRIPTION
+.PP
+The \fBsieved\fP command is part of the 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
+.BR sievec (1)
+, can be transformed to 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.
+.PP
+The \fIsieve-binary\fR argument specifies the Sieve binary file that needs to be dumped. The
+optional \fIoutfile\fR argument specifies where the output must be written. If omitted, the
+output is written to \fBstdout\fR.
+.PP
+The format of the output is not explained here in detail, but it should be relatively easy
+to understand. The Sieve binaries comprise a set of data blocks, each of which can contain
+arbitrary data. For the base language implementation two blocks are used: the first containing
+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
+on the language extensions used when compiling the binary. 
+.SH AUTHOR
+.PP
+The Sieve implementation 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 sievec (1),
+.BR sieve-test (1)
+
-- 
GitLab