From bd7720d342ee7a86a445dfbcc68e9669124fc59a Mon Sep 17 00:00:00 2001
From: Aki Tuomi <aki.tuomi@open-xchange.com>
Date: Wed, 23 Nov 2022 11:07:54 +0200
Subject: [PATCH] man: Use built man pages

---
 configure.ac                         |   1 +
 doc/Makefile.am                      |  21 ++-
 doc/man/Makefile.am                  |  51 +-----
 doc/man/doveadm-sieve.1.in           | 125 -------------
 doc/man/global-options-formatter.inc |  46 -----
 doc/man/global-options.inc           |  21 ---
 doc/man/option-A.inc                 |  27 ---
 doc/man/option-S-socket.inc          |  10 --
 doc/man/option-u-user.inc            |  20 ---
 doc/man/pigeonhole.7.in              |  99 -----------
 doc/man/reporting-bugs.inc           |   6 -
 doc/man/sed.sh                       |  34 ----
 doc/man/sieve-dump.1.in              | 122 -------------
 doc/man/sieve-filter.1.in            | 253 --------------------------
 doc/man/sieve-test.1.in              | 257 ---------------------------
 doc/man/sievec.1.in                  | 142 ---------------
 16 files changed, 30 insertions(+), 1205 deletions(-)
 delete mode 100644 doc/man/doveadm-sieve.1.in
 delete mode 100644 doc/man/global-options-formatter.inc
 delete mode 100644 doc/man/global-options.inc
 delete mode 100644 doc/man/option-A.inc
 delete mode 100644 doc/man/option-S-socket.inc
 delete mode 100644 doc/man/option-u-user.inc
 delete mode 100644 doc/man/pigeonhole.7.in
 delete mode 100644 doc/man/reporting-bugs.inc
 delete mode 100644 doc/man/sed.sh
 delete mode 100644 doc/man/sieve-dump.1.in
 delete mode 100644 doc/man/sieve-filter.1.in
 delete mode 100644 doc/man/sieve-test.1.in
 delete mode 100644 doc/man/sievec.1.in

diff --git a/configure.ac b/configure.ac
index 6efd517ed..965d945e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,6 +57,7 @@ AC_SUBST(LIBDOVECOT_INCLUDE)
 
 sieve_docdir='${dovecot_docdir}/sieve'
 AC_SUBST(sieve_docdir)
+AM_MISSING_PROG([WGET], [wget])
 
 # Extensions under development
 #
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 5131ece60..18e89226d 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -12,7 +12,26 @@ if BUILD_DOCS
 sieve_doc_DATA = $(docfiles)
 endif
 
+BUILT_SOURCES = pigeonhole-man
+
+MAN_URL=https://doc.dovecot.org/assets/3.0/pigeonhole-man.txz
+
+AM_V_Q = $(am__v_Q_$(V))
+am__v_Q_ = $(am__v_Q_$(AM_DEFAULT_VERBOSITY))
+am__v_Q_0 = -q
+am__v_Q_1 =
+
+pigeonhole-man:
+	$(AM_V_at)$(WGET) -nv -O- $(MAN_URL) | xz -d | $(am__untar) \
+		&& touch pigeonhole-man || rm -f pigeonhole-man
+
+all-local:
+	$(AM_V_at)if [ ! -e man/doveadm-sieve.1 ]; then \
+		rm -f pigeonhole-man; \
+		$(MAKE) pigeonhole-man; \
+	fi
+
 EXTRA_DIST = \
 	devel \
+	pigeonhole-man \
 	$(docfiles)
-
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
index 83ceec52b..36cb62226 100644
--- a/doc/man/Makefile.am
+++ b/doc/man/Makefile.am
@@ -1,46 +1,13 @@
-pkgsysconfdir = $(sysconfdir)/dovecot
-rundir = ${prefix}/var/run/dovecot
-
-SUFFIXES = .1.in .1 .7.in .7
-
-dist_man1_MANS = \
+static_mans = \
 	sieved.1
 
-nodist_man1_MANS = \
-	doveadm-sieve.1 \
-	sievec.1 \
-	sieve-dump.1 \
-	sieve-test.1 \
-	sieve-filter.1
-
-nodist_man7_MANS = \
-	pigeonhole.7
-
-man_includefiles = \
-	$(srcdir)/global-options-formatter.inc \
-	$(srcdir)/global-options.inc \
-	$(srcdir)/option-A.inc \
-	$(srcdir)/option-S-socket.inc \
-	$(srcdir)/option-u-user.inc \
-	$(srcdir)/reporting-bugs.inc
-
-EXTRA_DIST = \
-	doveadm-sieve.1.in \
-	sievec.1.in \
-	sieve-dump.1.in \
-	sieve-test.1.in \
-	sieve-filter.1.in \
-	pigeonhole.7.in \
-	sed.sh \
-	$(man_includefiles)
-
-CLEANFILES = $(nodist_man1_MANS) $(nodist_man7_MANS)
-
-.1.in.1: $(man_includefiles) Makefile
-	$(AM_V_GEN)$(SHELL) $(srcdir)/sed.sh $(srcdir) $(rundir) $(pkgsysconfdir) \
-		$(pkglibexecdir) < $< > $@
-.7.in.7: $(man_includefiles) Makefile
-	$(AM_V_GEN)$(SHELL) $(srcdir)/sed.sh $(srcdir) $(rundir) $(pkgsysconfdir) \
-		$(pkglibexecdir) < $< > $@
+dist_man1_MANS := $(wildcard *.1)
+dist_man7_MANS := $(wildcard *.7)
 
+distclean-local:
+	for page in *.1 *.7; do \
+	  if ! echo "$(static_mans)" | grep -qF "$$page"; then \
+	    rm -f $$page; \
+	  fi \
+	done
 
diff --git a/doc/man/doveadm-sieve.1.in b/doc/man/doveadm-sieve.1.in
deleted file mode 100644
index aed9337a0..000000000
--- a/doc/man/doveadm-sieve.1.in
+++ /dev/null
@@ -1,125 +0,0 @@
-.\" Copyright (c) 2010-2018 Pigeonhole authors, see the included COPYING file
-.TH DOVEADM\-SIEVE 1 "2016-02-29" "Pigeonhole for Dovecot v2.4" "Pigeonhole"
-.SH NAME
-doveadm\-sieve \- Commands related to handling Sieve scripts
-.\"------------------------------------------------------------------------
-.SH SYNOPSIS
-.BR doveadm " [" \-Dv "] [" \-f
-.IR formatter "] " sieve_cmd " [" options "] [" arguments ]
-.\"------------------------------------------------------------------------
-.SH DESCRIPTION
-.PP
-The
-.B doveadm sieve
-commands are part of the Pigeonhole Project (\fBpigeonhole\fR(7)), which adds
-Sieve (RFC 5228) and ManageSieve (RFC 5804) support to the Dovecot secure IMAP
-and POP3 server (\fBdovecot\fR(1)). The
-.B doveadm sieve
-commands can be used to manage Sieve filtering.
-.\"------------------------------------------------------------------------
-@INCLUDE:global-options-formatter@
-.\" --- command specific options --- "/.
-.PP
-Command specific
-.IR options :
-.\"-------------------------------------
-@INCLUDE:option-A@
-.\"-------------------------------------
-@INCLUDE:option-S-socket@
-.\"-------------------------------------
-@INCLUDE:option-u-user@
-.\"------------------------------------------------------------------------
-.SH ARGUMENTS
-.TP
-.I scriptname
-Is the name of a
-.IR Sieve\ script ,
-as visible to ManageSieve clients.
-.IP
-NOTE: For Sieve scripts that are stored on disk, this is the filename without the
-".sieve" extension.
-.\"------------------------------------------------------------------------
-.SH COMMANDS
-.SS sieve put
-.B doveadm sieve put
-[\fB\-A\fP|\fB\-u\fP \fIuser\fP]
-[\fB\-S\fP \fIsocket_path\fP]
-.RB [ \-a ]
-.IR scriptname
-.PP
-This command puts one new Sieve script in the script storage. The script
-is read from standard input. If the script compiles successfully, it is stored
-under the provided 
-.IR scriptname\ . 
-If the
-.B \-a
-option is present, the Sieve script is subsequently marked as the active script
-for execution at delivery.
-.\"------------------------------------------------------------------------
-.SS sieve get
-.B doveadm sieve get
-[\fB\-A\fP|\fB\-u\fP \fIuser\fP]
-[\fB\-S\fP \fIsocket_path\fP]
-.I scriptname
-.PP
-This command retrieves the Sieve script named
-.IR scriptname .
-.\"------------------------------------------------------------------------
-.SS sieve delete
-.B doveadm sieve delete
-[\fB\-A\fP|\fB\-u\fP \fIuser\fP]
-[\fB\-S\fP \fIsocket_path\fP]
-.RB [ \-a ]
-.IR scriptname\  ...
-.PP
-This command deletes one or more Sieve scripts. The deleted script may not be the
-active script, unless the 
-.B \-a
-option is present.
-.\"------------------------------------------------------------------------
-.SS sieve list
-.B doveadm sieve list
-[\fB\-A\fP|\fB\-u\fP \fIuser\fP]
-[\fB\-S\fP \fIsocket_path\fP]
-.I scriptname
-.PP
-Use this command to get an overview of existing Sieve scripts.
-.\"------------------------------------------------------------------------
-.SS sieve rename
-.B doveadm sieve rename
-[\fB\-A\fP|\fB\-u\fP \fIuser\fP]
-[\fB\-S\fP \fIsocket_path\fP]
-.I old_name
-.I new_name
-.PP
-The
-.B sieve rename
-command is used to rename the Sieve script
-.I old_name
-to
-.IR new_name .
-.\"------------------------------------------------------------------------
-.SS sieve activate
-.B doveadm sieve activate
-[\fB\-A\fP|\fB\-u\fP \fIuser\fP]
-[\fB\-S\fP \fIsocket_path\fP]
-.IR scriptname
-.PP
-This command marks the Sieve script named 
-.I scriptname
-as the active script for execution at delivery.
-.\"------------------------------------------------------------------------
-.SS sieve deactivate
-.B doveadm sieve deactivate
-[\fB\-A\fP|\fB\-u\fP \fIuser\fP]
-[\fB\-S\fP \fIsocket_path\fP]
-.I scriptname
-.PP
-This command deactivates Sieve processing.
-.\"------------------------------------------------------------------------
-@INCLUDE:reporting-bugs@
-.\"------------------------------------------------------------------------
-.SH SEE ALSO
-.BR doveadm (1)
-.BR dovecot\-lda (1),
-.BR pigeonhole (7)
diff --git a/doc/man/global-options-formatter.inc b/doc/man/global-options-formatter.inc
deleted file mode 100644
index cb792e117..000000000
--- a/doc/man/global-options-formatter.inc
+++ /dev/null
@@ -1,46 +0,0 @@
-.SH OPTIONS
-Global
-.BR doveadm (1)
-.IR options :
-.TP
-.B \-D
-Enables verbosity and debug messages.
-.TP
-.BI \-f\  formatter
-Specifies the
-.I formatter
-for formatting the output.
-Supported formatters are:
-.RS
-.TP
-.B flow
-prints each line with
-.IB key = value
-pairs.
-.TP
-.B pager
-prints each
-.IR key :\  value
-pair on its own line and separates records with form feed character
-.RB ( ^L ).
-.TP
-.B tab
-prints a table header followed by tab separated value lines.
-.TP
-.B table
-prints a table header followed by adjusted value lines.
-.RE
-.TP
-.BI \-o\  setting = value
-Overrides the configuration
-.I setting
-from
-.I @pkgsysconfdir@/dovecot.conf
-and from the userdb with the given
-.IR value .
-In order to override multiple settings, the
-.B \-o
-option may be specified multiple times.
-.TP
-.B \-v
-Enables verbosity, including progress counter.
diff --git a/doc/man/global-options.inc b/doc/man/global-options.inc
deleted file mode 100644
index bf99294d4..000000000
--- a/doc/man/global-options.inc
+++ /dev/null
@@ -1,21 +0,0 @@
-.SH OPTIONS
-Global
-.BR doveadm (1)
-.IR options :
-.TP
-.B \-D
-Enables verbosity and debug messages.
-.TP
-.BI \-o\  setting = value
-Overrides the configuration
-.I setting
-from
-.I @pkgsysconfdir@/dovecot.conf
-and from the userdb with the given
-.IR value .
-In order to override multiple settings, the
-.B \-o
-option may be specified multiple times.
-.TP
-.B \-v
-Enables verbosity, including progress counter.
diff --git a/doc/man/option-A.inc b/doc/man/option-A.inc
deleted file mode 100644
index 256e93996..000000000
--- a/doc/man/option-A.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-.TP
-.B \-A
-If the
-.B \-A
-option is present, the
-.I command
-will be performed for all users.
-Using this option in combination with system users from
-.B userdb { driver = passwd }
-is not recommended, because it contains also users with a lower UID than
-the one configured with the
-.I first_valid_uid
-setting.
-.sp
-When the SQL userdb module is used make sure that the
-.I iterate_query
-setting in
-.I @pkgsysconfdir@/dovecot\-sql.conf.ext
-matches your database layout.
-When using the LDAP userdb module, make sure that the
-.IR iterate_attrs " and " iterate_filter
-settings in
-.I @pkgsysconfdir@/dovecot-ldap.conf.ext
-match your LDAP schema.
-Otherwise
-.BR doveadm (1)
-will be unable to iterate over all users.
diff --git a/doc/man/option-S-socket.inc b/doc/man/option-S-socket.inc
deleted file mode 100644
index 2e0e3743d..000000000
--- a/doc/man/option-S-socket.inc
+++ /dev/null
@@ -1,10 +0,0 @@
-.TP
-.BI \-S\  socket_path
-The option\(aqs argument is either an absolute path to a local UNIX domain
-socket, or a hostname and port
-.RI ( hostname : port ),
-in order to connect a remote host via a TCP socket.
-.sp
-This allows an administrator to execute
-.BR doveadm (1)
-mail commands through the given socket.
diff --git a/doc/man/option-u-user.inc b/doc/man/option-u-user.inc
deleted file mode 100644
index e8611452b..000000000
--- a/doc/man/option-u-user.inc
+++ /dev/null
@@ -1,20 +0,0 @@
-.TP
-.BI \-u\  user/mask
-Run the
-.I command
-only for the given
-.IR user .
-It\(aqs also possible to use
-.RB \(aq * \(aq
-and
-.RB \(aq ? \(aq
-wildcards (e.g. \-u *@example.org).
-.br
-When neither the
-.B \-A
-option nor
-.BI \-u\  user
-was specified, the
-.I command
-will be executed with the environment of the
-currently logged in user.
diff --git a/doc/man/pigeonhole.7.in b/doc/man/pigeonhole.7.in
deleted file mode 100644
index 75f8903f6..000000000
--- a/doc/man/pigeonhole.7.in
+++ /dev/null
@@ -1,99 +0,0 @@
-.\" Copyright (c) 2010-2018 Pigeonhole authors, see the included COPYING file
-.TH "PIGEONHOLE" 7 "2015-02-21" "Pigeonhole for Dovecot v2.4" "Pigeonhole"
-.\"------------------------------------------------------------------------
-.SH NAME
-pigeonhole \- Overview of the Pigeonhole project\(aqs Sieve support for the
-Dovecot secure IMAP and POP3 server
-.\"------------------------------------------------------------------------
-.SH DESCRIPTION
-.PP
-The Pigeonhole project <http://pigeonhole.dovecot.org> adds support for the
-Sieve language (RFC 5228) and the ManageSieve protocol (RFC 5804) to the
-Dovecot Secure IMAP and POP3 Server (\fBdovecot\fR(1)). In the literal sense,
-a pigeonhole is a a hole or recess inside a dovecot for pigeons to nest in.
-It is, however, also the name for one of a series of small, open compartments
-in a cabinet used for filing or sorting mail. As a verb, it describes the act
-of putting an item into one of those pigeonholes. The name \(dqPigeonhole\(dq
-therefore well describes an important part of the functionality that this
-project adds to Dovecot: sorting and filing e\-mail messages.
-.PP
-The Sieve language is used to specify how e\-mail needs to be processed. By
-writing Sieve scripts, users can customize how messages are delivered, e.g.
-whether they are forwarded or stored in special folders. Unwanted messages can
-be discarded or rejected, and, when the user is not available, the Sieve
-interpreter can send an automated reply. Above all, the Sieve language is meant
-to be simple, extensible and system independent. And, unlike most other mail
-filtering script languages, it does not allow users to execute arbitrary
-programs. This is particularly useful to prevent virtual users from having full
-access to the mail store. The intention of the language is to make it impossible
-for users to do anything more complex (and dangerous) than write simple mail
-filters.
-.PP
-Using the ManageSieve protocol, users can upload their Sieve scripts remotely,
-without needing direct filesystem access through FTP or SCP. Additionally, a
-ManageSieve server always makes sure that uploaded scripts are valid, preventing
-compile failures at mail delivery.
-.PP
-The Pigeonhole project provides the following items:
-.IP \(bu 4
-The LDA Sieve plugin for Dovecot\(aqs Local Delivery Agent (LDA)
-(\fBdovecot\-lda\fR(1)) that facilitates the actual Sieve filtering upon
-delivery.
-.IP \(bu
-The ManageSieve service that implements the ManageSieve protocol through which
-users can remotely manage Sieve scripts on the server.
-.IP \(bu
-A plugin for Dovecot\(aqs
-.BR doveadm (1)
-command line tool that adds new the new
-.BR doveadm-sieve (1)
-commands for management of Sieve filtering.
-.PP
-The functionality and configuration of the LDA Sieve plugin and the ManageSieve
-service is described in detail in the README and INSTALL files contained in the
-Pigeonhole package and in the Dovecot documentation
-<https://doc.dovecot.org/configuration_manual/sieve/>.
-.PP
-The following command line tools are available outside of
-.BR doveadm :
-.TP
-.BR sievec (1)
-Compiles Sieve scripts into a binary representation for later execution.
-.TP
-.BR sieve\-test (1)
-The universal Sieve test tool for testing the effect of a Sieve script on a
-particular message.
-.TP
-.BR sieve\-filter (1)
-Filters all messages in a particular source mailbox through a Sieve script.
-.TP
-.BR sieve\-dump (1)
-Dumps the content of a Sieve binary file for (development) debugging purposes.
-.\"------------------------------------------------------------------------
-@INCLUDE:reporting-bugs@
-.\"------------------------------------------------------------------------
-.SH AUTHOR
-Pigeonhole <http://pigeonhole.dovecot.org> and its manual pages were written by
-the Pigeonhole authors <http://pigeonhole.dovecot.org/doc/AUTHORS>, mainly
-Stephan Bosch <stephan at rename\-it.nl>, and are licensed under the terms of the
-LGPLv2.1 license, which is the same license as Dovecot, see
-<http://dovecot.org/doc/COPYING> for details.
-.\"------------------------------------------------------------------------
-.SH "SEE ALSO"
-.BR dovecot (1),
-.BR dovecot\-lda (1),
-.BR doveadm (1),
-.BR doveadm-sieve (1),
-.BR sieve\-dump (1),
-.BR sieve\-test (1),
-.BR sieve\-filter (1),
-.BR sievec (1)
-.\"-------------------------------------
-.PP
-Additional resources:
-.IP "Dovecot website"
-http://www.dovecot.org
-.IP "Dovecot documentation"
-https://doc.dovecot.org/configuration_manual/sieve/
-.IP "Pigeonhole website"
-http://pigeonhole.dovecot.org
diff --git a/doc/man/reporting-bugs.inc b/doc/man/reporting-bugs.inc
deleted file mode 100644
index 1823ca2cd..000000000
--- a/doc/man/reporting-bugs.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-.SH REPORTING BUGS
-Report bugs, including
-.I doveconf \-n
-output, to the Dovecot Mailing List <dovecot@dovecot.org>.
-Information about reporting bugs is available at:
-http://dovecot.org/bugreport.html
diff --git a/doc/man/sed.sh b/doc/man/sed.sh
deleted file mode 100644
index 6da39636e..000000000
--- a/doc/man/sed.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-
-SRCDIR="${1:-`pwd`}"
-RUNDIR="${2:-/usr/local/var/run/dovecot}"
-PKGSYSCONFDIR="${3:-/usr/local/etc/dovecot}"
-PKGLIBEXECDIR="${4:-/usr/local/libexec/dovecot}"
-
-sed -e "/^@INCLUDE:global-options@$/{
-		r ${SRCDIR}/global-options.inc
-		d
-	}" \
-	-e "/^@INCLUDE:global-options-formatter@$/{
-		r ${SRCDIR}/global-options-formatter.inc
-		d
-	}" \
-	-e "/^@INCLUDE:option-A@$/{
-		r ${SRCDIR}/option-A.inc
-		d
-	}" \
-	-e "/^@INCLUDE:option-S-socket@$/{
-		r ${SRCDIR}/option-S-socket.inc
-		d
-	}" \
-	-e "/^@INCLUDE:option-u-user@$/{
-		r ${SRCDIR}/option-u-user.inc
-		d
-	}" \
-	-e "/^@INCLUDE:reporting-bugs@$/{
-		r ${SRCDIR}/reporting-bugs.inc
-		d
-	}" | sed -e "s|@pkgsysconfdir@|${PKGSYSCONFDIR}|" \
-	-e "s|@rundir@|${RUNDIR}|" \
-	-e "s|@pkglibexecdir@|${PKGLIBEXECDIR}|"
-
diff --git a/doc/man/sieve-dump.1.in b/doc/man/sieve-dump.1.in
deleted file mode 100644
index f9e23aa20..000000000
--- a/doc/man/sieve-dump.1.in
+++ /dev/null
@@ -1,122 +0,0 @@
-.\" Copyright (c) 2010-2018 Pigeonhole authors, see the included COPYING file
-.TH "SIEVE\-DUMP" 1 "2016-04-05" "Pigeonhole for Dovecot v2.4" "Pigeonhole"
-.\"------------------------------------------------------------------------
-.SH NAME
-sieve\-dump \- Pigeonhole\(aqs Sieve script binary dump tool
-.\"------------------------------------------------------------------------
-.SH SYNOPSIS
-.B sieve\-dump
-.RI [ options ]
-.I sieve\-binary
-.RI [ out\-file ]
-.\"------------------------------------------------------------------------
-.SH DESCRIPTION
-.PP
-The \fBsieve\-dump\fP command is part of the Pigeonhole Project
-(\fBpigeonhole\fR(7)), which adds Sieve (RFC 5228) support to the Dovecot
-secure IMAP and POP3 server (\fBdovecot\fR(1)).
-.PP
-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 intended mainly for
-development purposes, so normally system administrators and users will not need
-to use this tool.
-.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
-\fBsieve\-dump\fP depends greatly on the language extensions used when compiling
-the binary.
-.\"------------------------------------------------------------------------
-.SH OPTIONS
-.TP
-.BI \-c\  config\-file
-Alternative Dovecot configuration file path.
-.TP
-.B \-D
-Enable Sieve debugging.
-.TP
-.B \-h
-Produce per\-block hexdump output of the whole binary instead of the normal
-human\-readable output.
-.TP
-.BI \-o\  setting = value
-Overrides the configuration
-.I setting
-from
-.I @pkgsysconfdir@/dovecot.conf
-and from the userdb with the given
-.IR value .
-In order to override multiple settings, the
-.B \-o
-option may be specified multiple times.
-.TP
-.BI \-u\  user
-Run the Sieve script for the given \fIuser\fP. When omitted, the
-.I command
-will be executed with the environment of the currently logged in user.
-.TP
-.BI \-x\  extensions
-Set the available extensions. The parameter is a space\-separated list of the
-active extensions. By prepending the extension identifiers with \fB+\fP or
-\fB\-\fP, extensions can be included or excluded relative to the configured set
-of active extensions. If no extensions have a \fB+\fP or \fB\-\fP prefix, only
-those extensions that are explicitly listed will be enabled. Unknown extensions
-are ignored and a warning is produced.
-
-For example \fB\-x\fP \(dq+editheader \-enotify\(dq will enable the editheader
-extension and disable the enotify extension. The rest of the active extensions
-depends on the \fIsieve_extensions\fP and
-\fIsieve_global_extensions\fP settings. By default, i.e.
-when \fIsieve_extensions\fP and \fIsieve_global_extensions\fP remain
-unconfigured, all supported extensions are available, except for deprecated
-extensions or those that are still under development.
-
-.\"------------------------------------------------------------------------
-.SH ARGUMENTS
-.TP
-.I sieve\-binary
-Specifies the Sieve binary file that needs to be dumped.
-.TP
-.I out\-file
-Specifies where the output must be written. This argument is optional. If
-omitted, the output is written to \fBstdout\fR.
-.\"------------------------------------------------------------------------
-.SH "EXIT STATUS"
-.B sieve\-dump
-will exit with one of the following values:
-.TP 4
-.B 0
-Dump was successful. (EX_OK, EXIT_SUCCESS)
-.TP
-.B 1
-Operation failed. This is returned for almost all failures.
-(EXIT_FAILURE)
-.TP
-.B 64
-Invalid parameter given. (EX_USAGE)
-.\"------------------------------------------------------------------------
-.SH FILES
-.TP
-.I @pkgsysconfdir@/dovecot.conf
-Dovecot\(aqs main configuration file.
-.TP
-.I @pkgsysconfdir@/conf.d/90\-sieve.conf
-Sieve interpreter settings (included from Dovecot\(aqs main configuration file)
-.\"------------------------------------------------------------------------
-@INCLUDE:reporting-bugs@
-.\"------------------------------------------------------------------------
-.SH "SEE ALSO"
-.BR dovecot (1),
-.BR dovecot\-lda (1),
-.BR sieve\-filter (1),
-.BR sieve\-test (1),
-.BR sievec (1),
-.BR pigeonhole (7)
diff --git a/doc/man/sieve-filter.1.in b/doc/man/sieve-filter.1.in
deleted file mode 100644
index 79ea11aa6..000000000
--- a/doc/man/sieve-filter.1.in
+++ /dev/null
@@ -1,253 +0,0 @@
-.\" Copyright (c) 2010-2018 Pigeonhole authors, see the included COPYING file
-.TH "SIEVE\-FILTER" 1 "2016-04-05" "Pigeonhole for Dovecot v2.4" "Pigeonhole"
-.SH NAME
-sieve\-filter \- Pigeonhole\(aqs Sieve mailbox filter tool
-
-.PP
-\fBWARNING: \fRThis tool is still experimental. Read this manual carefully, and
-backup any important mail before using this tool. Also note that some of the
-features documented here are not actually implemented yet; this is clearly
-indicated where applicable.
-.\"------------------------------------------------------------------------
-.SH SYNOPSIS
-.B sieve\-filter
-.RI [ options ]
-.I script\-file
-.I source\-mailbox
-.RI [ discard\-action ]
-.SH DESCRIPTION
-.PP
-The \fBsieve\-filter\fP command is part of the Pigeonhole Project
-(\fBpigeonhole\fR(7)), which adds Sieve (RFC 5228) support to the Dovecot
-secure IMAP and POP3 server (\fBdovecot\fR(1)).
-.PP
-The Sieve language was originally meant for filtering messages upon delivery.
-However, there are occasions when it is desirable to filter messages that are
-already stored in a mailbox, for instance when a bug in a Sieve script caused
-many messages to be delivered incorrectly. Using the sieve\-filter tool it is
-possible to apply a Sieve script on all messages in a particular
-\fIsource\-mailbox\fP, making it possible to delete messages, to store them in a
-different mailbox, to change their content, and to change the assigned IMAP
-flags and keywords. Attempts to send messages to the outside world are ignored
-by default for obvious reasons, but, using the proper command line options, it
-is possible to capture and handle outgoing mail as well.
-.PP
-If no options are specified, the sieve\-filter command runs in a simulation mode
-in which it only prints what would be performed, without actually doing
-anything. Use the \fB\-e\fP option to activate true script execution. Also, the
-\fIsource\-mailbox\fP is opened read\-only by default, meaning that it normally
-always remains unchanged. Use the \fB\-W\fP option to allow changes in the
-\fIsource\-mailbox\fP.
-.PP
-Even with the \fB\-W\fP option enabled, messages in the \fIsource\-mailbox\fP
-are only potentially modified or moved to a different folder. Messages are never
-lost unless a \fIdiscard\-action\fP argument other than \fBkeep\fP (the default)
-is specified. If the Sieve filter decides to store the message in the
-\fIsource\-mailbox\fP, where it obviously already exists, it is never duplicated
-there. In that case, the IMAP flags of the original message can be modified by
-the Sieve interpreter using the \fIimap4flags\fP extension, provided that
-\fB\-W\fP is specified. If the message itself is modified by the Sieve
-interpreter (e.g. using the \fIeditheader\fP extension), a new message is stored
-and the old one is expunged. However, if \fB-W\fP is omitted, the original
-message is left untouched and the modifications are discarded.
-
-.SS CAUTION
-Although this is a very useful tool, it can also be very destructive when used
-improperly. A small bug in your Sieve script in combination with the wrong
-command line options could cause it to discard the wrong e\-mails. And, even if
-the \fIsource\-mailbox\fP is opened in read\-only mode to prevent such mishaps,
-it can still litter other mailboxes with spurious copies of your e\-mails if
-your Sieve script decides to do so. Therefore, users are advised to read this
-manual carefully and to use the simulation mode first to check what the script
-will do. And, of course:
-.PP
-\fBMAKING A BACKUP IS IMPERATIVE FOR ANY IMPORTANT MAIL!\fP
-
-.\"------------------------------------------------------------------------
-.SH OPTIONS
-.TP
-.BI \-c\  config\-file
-Alternative Dovecot configuration file path.
-.TP
-.B \-C
-Force compilation. By default, the compiled binary is stored on disk. When this
-binary is found during the next execution of \fBsieve\-filter\fP 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 \fBsievec\fP(1) for more information about
-Sieve compilation.
-.TP
-.B \-D
-Enable Sieve debugging.
-.TP
-.B \-e
-Turns on execution mode. By default, the sieve\-filter command runs in
-simulation mode in which it changes nothing, meaning that no mailbox is altered
-in any way and no actions are performed. It only prints what would be done.
-Using this option, the sieve\-filter command becomes active and performs the
-requested actions.
-.TP
-.BI \-m\  default\-mailbox
-The mailbox where the (implicit) \fBkeep\fP Sieve action stores messages. This
-is equal to the \fIsource\-mailbox\fP by default. Specifying a different folder
-will have the effect of moving (or copying if \fB\-W\fP is omitted) all kept
-messages to the indicated folder, instead of just leaving them in the
-\fIsource\-mailbox\fP. Refer to the explanation of the \fIsource\-mailbox\fP
-argument for more information on mailbox naming.
-.TP
-.BI \-o\  setting = value
-Overrides the configuration
-.I setting
-from
-.I @pkgsysconfdir@/dovecot.conf
-and from the userdb with the given
-.IR value .
-In order to override multiple settings, the
-.B \-o
-option may be specified multiple times.
-.TP
-.BI \-q\  output\-mailbox\  \fB[not\ implemented\ yet]\fP
-Store outgoing e\-mail into the indicated \fIoutput\-mailbox\fP. By default,
-the sieve\-filter command ignores Sieve actions such as redirect, reject,
-vacation and notify, but using this option outgoing messages can be appended to
-the indicated mailbox. This option has no effect in simulation mode. Flags of
-redirected messages are not preserved.
-.TP
-.BI \-Q\  mail\-command\  \fB[not\ implemented\ yet]\fP
-Send outgoing e\-mail (e.g. as produced by redirect, reject and vacation)
-through the specified program. By default, the sieve\-filter command ignores
-Sieve actions such as redirect, reject, vacation and notify, but using this
-option outgoing messages can be fed to the \fBstdin\fP of an external shell
-command. This option has no effect in simulation mode. Unless you really know
-what you are doing, \fBDO NOT USE THIS TO FEED MAIL TO SENDMAIL!\fP.
-.TP
-.BI \-s\  script\-file\  \fB[not\ implemented\ yet]\fP
-Specify additional scripts to be executed before the main script. Multiple
-\fB\-s\fP arguments are allowed and the specified scripts are executed
-sequentially in the order specified at the command line.
-.TP
-.BI \-u\  user
-Run the Sieve script for the given \fIuser\fP. When omitted, the
-.I command
-will be executed with the environment of the currently logged in user.
-.TP
-.B \-v
-Produce verbose output during filtering.
-.TP
-.B \-W
-Enables write access to the \fIsource\-mailbox\fP. This allows (re)moving the
-messages from the \fIsource\-mailbox\fP, changing their contents, and changing
-the assigned IMAP flags and keywords.
-.TP
-.BI \-x\  extensions
-Set the available extensions. The parameter is a space\-separated list of the
-active extensions. By prepending the extension identifiers with \fB+\fP or
-\fB\-\fP, extensions can be included or excluded relative to the configured set
-of active extensions. If no extensions have a \fB+\fP or \fB\-\fP prefix, only
-those extensions that are explicitly listed will be enabled. Unknown extensions
-are ignored and a warning is produced.
-
-For example \fB\-x\fP \(dq+editheader \-enotify\(dq will enable the editheader
-extension and disable the enotify extension. The rest of the active extensions
-depends on the \fIsieve_extensions\fP and
-\fIsieve_global_extensions\fP settings. By default, i.e.
-when \fIsieve_extensions\fP and \fIsieve_global_extensions\fP remain
-unconfigured, all supported extensions are available, except for deprecated
-extensions or those that are still under development.
-
-.\"------------------------------------------------------------------------
-.SH ARGUMENTS
-.TP
-.I script\-file
-Specifies the Sieve script to (compile and) execute.
-
-Note that this tool looks for a pre\-compiled binary file with a \fI.svbin\fP
-extension and with basename and path identical to the specified script. Use the
-\fB\-C\fP option to disable this behavior by forcing the script to be compiled
-into a new binary.
-.TP
-.I source\-mailbox
-Specifies the source mailbox containing the messages that the Sieve filter will
-act upon.
-
-This is the name of a mailbox, as visible to IMAP clients, except in UTF-8
-format. The hierarchy separator between a parent and child mailbox is commonly
-.RB \(aq / \(aq
-or
-.RB \(aq . \(aq,
-but this depends on your selected mailbox storage format and
-namespace configuration. The mailbox names may also require a namespace prefix.
-
-This mailbox is not modified unless the \fB\-W\fP option is specified.
-.TP
-.I discard\-action
-Specifies what is done with messages in the \fIsource\-mailbox\fP that where not
-kept or otherwise stored by the Sieve script; i.e. those messages that would
-normally be discarded if the Sieve script were executed at delivery.
-The \fIdiscard\-action\fP parameter accepts one of the following values:
-.RS 7
-.TP
-.BR keep\  (default)
-Keep discarded messages in source mailbox.
-.TP
-.BI move\  mailbox
-Move discarded messages to the indicated \fImailbox\fP. This is for instance
-useful to move messages to a Trash mailbox. Refer to the explanation of
-the \fIsource\-mailbox\fP argument for more information on mailbox naming.
-.TP
-.B delete
-Flag discarded messages as \\DELETED.
-.TP
-.B expunge
-Expunge discarded messages, meaning that these are removed irreversibly when the
-tool finishes filtering.
-.RE
-.IP
-When the \fB\-W\fP option is not specified, the \fIsource\-mailbox\fP is
-immutable and the specified \fIdiscard\-action\fP has no effect. This means that
-messages are at most \fIcopied\fP to a new location. In contrast, when the
-\fB\-W\fP is specified, messages that are successfully stored somewhere else by
-the Sieve script are \fBalways\fP expunged from the \fIsource\-mailbox\fP, with
-the effect that these are thus \fImoved\fP to the new location. This happens
-irrespective of the specified \fIdiscard\-action\fP. Remember: only discarded
-messages are affected by the specified \fIdiscard\-action\fP.
-
-.\"------------------------------------------------------------------------
-
-.SH EXAMPLES
-
-.TP
-[...]
-
-.\"------------------------------------------------------------------------
-.SH "EXIT STATUS"
-.B sieve\-filter
-will exit with one of the following values:
-.TP 4
-.B 0
-Sieve filter applied successfully. (EX_OK, EXIT_SUCCESS)
-.TP
-.B 1
-Operation failed. This is returned for almost all failures.
-(EXIT_FAILURE)
-.TP
-.B 64
-Invalid parameter given. (EX_USAGE)
-.\"------------------------------------------------------------------------
-.SH FILES
-.TP
-.I @pkgsysconfdir@/dovecot.conf
-Dovecot\(aqs main configuration file.
-.TP
-.I @pkgsysconfdir@/conf.d/90\-sieve.conf
-Sieve interpreter settings (included from Dovecot\(aqs main configuration file)
-.\"------------------------------------------------------------------------
-@INCLUDE:reporting-bugs@
-.\"------------------------------------------------------------------------
-.SH "SEE ALSO"
-.BR dovecot (1),
-.BR dovecot\-lda (1),
-.BR sieve\-dump (1),
-.BR sieve\-test (1),
-.BR sievec (1),
-.BR pigeonhole (7)
diff --git a/doc/man/sieve-test.1.in b/doc/man/sieve-test.1.in
deleted file mode 100644
index c7d6bd4cc..000000000
--- a/doc/man/sieve-test.1.in
+++ /dev/null
@@ -1,257 +0,0 @@
-.\" Copyright (c) 2010-2018 Pigeonhole authors, see the included COPYING file
-.TH "SIEVE\-TEST" 1 "2016-04-05" "Pigeonhole for Dovecot v2.4" "Pigeonhole"
-.SH NAME
-sieve\-test \- Pigeonhole\(aqs Sieve script tester
-.\"------------------------------------------------------------------------
-.SH SYNOPSIS
-.B sieve\-test
-.RI [ options ]
-.I script\-file
-.I mail\-file
-.\"------------------------------------------------------------------------
-.SH DESCRIPTION
-.PP
-The \fBsieve\-test\fP command is part of the Pigeonhole Project
-(\fBpigeonhole\fR(7)), which adds Sieve (RFC 5228) support to the Dovecot
-secure IMAP and POP3 server (\fBdovecot\fR(1)).
-.PP
-Using the \fBsieve\-test\fP 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 \fB\-e\fP option is specified, it does not actually
-execute these actions, meaning that it does not store or forward the message
-anywere. Instead, it prints a detailed list of what actions would normally take
-place. Note that, even when \fB\-e\fP is specified, no messages are ever
-transmitted to remote SMTP recipients. The outgoing messages are always printed
-to \fBstdout\fP instead.
-.PP
-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.
-.\"------------------------------------------------------------------------
-.SH OPTIONS
-.TP
-.BI \-a\  orig\-recipient\-address
-The original envelope recipient address. This is what Sieve\(aqs envelope test
-will compare to when the \(dqto\(dq envelope part is requested. Some tests and
-actions will also use this as the script owner\(aqs e\-mail address. If this
-option is omitted, the recipient address is retrieved from the
-\(dqEnvelope-To:\(dq, or \(dqTo:\(dq message headers. If none of these headers
-is present either, the recipient address defaults to
-\fIrecipient@example.com\fP.
-.TP
-.BI \-c\  config\-file
-Alternative Dovecot configuration file path.
-.TP
-.B \-C
-Force compilation. By default, the compiled binary is stored on disk. When this
-binary is found during the next execution of \fBsieve\-test\fP 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 \fBsievec\fP(1) for more information about
-Sieve compilation.
-.TP
-.B \-D
-Enable Sieve debugging.
-.TP
-.BI \-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 \fBsieve\-dump\fR(1). Using \(aq\-\(aq as
-filename causes the dump to be written to \fBstdout\fP.
-.TP
-.BI \-e
-Enables true execution of the set of actions that results from running the
-script. In combination with the \fB\-l\fP 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 \fBstdout\fP.
-.TP
-.BI \-f\  envelope\-sender
-The envelope sender address (return path). This is what Sieve\(aqs envelope test
-will compare to when the \(dqfrom\(dq envelope part is requested. Also, this is
-where response messages are \(aqsent\(aq to. If this option is omitted, the sender
-address is retrieved from the \(dqReturn-Path:\(dq, \(dqSender:\(dq or
-\(dqFrom:\(dq message headers. If none of these headers is present either,
-the sender envelope address defaults to \fIsender@example.com\fP.
-.TP
-.BI \-l\  mail\-location
-The location of the user\(aqs mail store. The syntax of this option\(aqs
-\fImail\-location\fP 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 \fB\-e\fP to test the actual delivery of messages. If
-\fB\-l\fP is omitted when \fB\-e\fP is specified, mail store actions like
-fileinto and keep are skipped.
-.TP
-.BI \-m\  default\-mailbox
-The mailbox where the keep action stores the message. This is \(dqINBOX\(dq
-by default.
-.TP
-.BI \-o\  setting = value
-Overrides the configuration
-.I setting
-from
-.I @pkgsysconfdir@/dovecot.conf
-and from the userdb with the given
-.IR value .
-In order to override multiple settings, the
-.B \-o
-option may be specified multiple times.
-.TP
-.BI \-r\  recipient\-address
-The final envelope recipient address. Some tests and actions will
-use this as the script owner\(aqs e\-mail address. For example, this is what is
-used by the vacation action to check whether a reply is appropriate. If the
-\fB\-r\fP option is omitted, the original envelope recipient address will be used
-instead (see \fB\-a\fP option for more info).
-.TP
-.BI \-s\  script\-file
-Specify additional scripts to be executed before the main script. Multiple
-\fB\-s\fP arguments are allowed and the specified scripts are executed
-sequentially in the order specified at the command
-line.
-.TP
-.BI \-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 \fBstdout\fP.
-.TP
-.BI \-T\  trace\-option
-Configures runtime trace debugging, which is enabled with the \fP\-t\fP option.
-Refer to the runtime trace debugging section below.
-.TP
-.BI \-u\  user
-Run the Sieve script for the given \fIuser\fP. When omitted, the
-.I command
-will be executed with the environment of the currently logged in user.
-.TP
-.BI \-x\  extensions
-Set the available extensions. The parameter is a space\-separated list of the
-active extensions. By prepending the extension identifiers with \fB+\fP or
-\fB\-\fP, extensions can be included or excluded relative to the configured set
-of active extensions. If no extensions have a \fB+\fP or \fB\-\fP prefix, only
-those extensions that are explicitly listed will be enabled. Unknown extensions
-are ignored and a warning is produced.
-
-For example \fB\-x\fP \(dq+editheader \-enotify\(dq will enable the editheader
-extension and disable the enotify extension. The rest of the active extensions
-depends on the \fIsieve_extensions\fP and
-\fIsieve_global_extensions\fP settings. By default, i.e.
-when \fIsieve_extensions\fP and \fIsieve_global_extensions\fP remain
-unconfigured, all supported extensions are available, except for deprecated
-extensions or those that are still under development.
-
-.\"------------------------------------------------------------------------
-.SH ARGUMENTS
-.TP
-.I script\-file
-Specifies the script to (compile and) execute.
-
-Note that this tool looks for a pre\-compiled binary file with a \fI.svbin\fP
-extension and with basename and path identical to the specified script. Use the
-\fB\-C\fP option to disable this behavior by forcing the script to be compiled
-into a new binary.
-.TP
-.I mail\-file
-Specifies the file containing the e\-mail message to test with.
-.\"------------------------------------------------------------------------
-.SH USAGE
-.SS RUNTIME TRACE DEBUGGING
-.PP
-Using the \fB\-t\fP option, the \fBsieve\-test\fP 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.
-.PP
-The runtime trace can be configured using the \fB\-T\fP option, which can be
-specified multiple times. It can be used as follows:
-
-.TP 2
-\fB\-Tlevel=...\fP
-Set the detail level of the trace debugging. One of the following values can
-be supplied:
-.RS 2
-.TP 3
-\fIactions\fP (default)
-Only print executed action commands, like keep, fileinto, reject and redirect.
-.TP
-\fIcommands\fP
-Print any executed command, excluding test commands.
-.TP
-\fItests\fP
-Print all executed commands and performed tests.
-.TP
-\fImatching\fP
-Print all executed commands, performed tests and the values matched in those
-tests.
-.RE
-.TP 2
-\fB\-Tdebug\fP
-Print debug messages as well. This is usually only useful for developers and
-is likely to produce messy output.
-.TP
-\fB\-Taddresses\fP
-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
-\fB\-d\fP option or by the \fBsieve\-dump(1)\fP command.
-.\"------------------------------------------------------------------------
-.SS DEBUG SIEVE EXTENSION
-.PP
-To improve script debugging, this Sieve implementation supports a custom Sieve
-language extension called \(aqvnd.dovecot.debug\(aq. It adds the \fBdebug_log\fP
-command that allows logging debug messages.
-.PP
-Example:
-.PP
-require \(dqvnd.dovecot.debug\(dq;
-.PP
-if header :contains \(dqsubject\(dq \(dqhello\(dq {
-.PP
-  debug_log \(dqSubject header contains hello!\(dq;
-.PP
-}
-.PP
-Tools such as \fBsieve\-test\fP, \fBsievec\fP and \fBsieve\-dump\fP have support
-for the vnd.dovecot.debug extension enabled by default and it is not necessary
-to enable nor possible to disable the availability of the debug extension with
-the \fB\-x\fP option. The logged messages are written to \fBstdout\fP in this
-case.
-
-In contrast, for the actual Sieve plugin for the Dovecot LDA
-(\fBdovecot\-lda\fR(1)) the vnd.dovecot.debug extension needs to be enabled
-explicitly using the \fIsieve_extensions\fP setting. The messages are then
-logged to the user's private script log file. If used in a global script, the
-messages are logged through the default Dovecot logging facility.
-.\"------------------------------------------------------------------------
-.SH "EXIT STATUS"
-.B sieve\-test
-will exit with one of the following values:
-.TP 4
-.B 0
-Execution was successful. (EX_OK, EXIT_SUCCESS)
-.TP
-.B 1
-Operation failed. This is returned for almost all failures.
-(EXIT_FAILURE)
-.TP
-.B 64
-Invalid parameter given. (EX_USAGE)
-.\"------------------------------------------------------------------------
-.SH FILES
-.TP
-.I @pkgsysconfdir@/dovecot.conf
-Dovecot\(aqs main configuration file.
-.TP
-.I @pkgsysconfdir@/conf.d/90\-sieve.conf
-Sieve interpreter settings (included from Dovecot\(aqs main configuration file)
-.\"------------------------------------------------------------------------
-@INCLUDE:reporting-bugs@
-.\"------------------------------------------------------------------------
-.SH "SEE ALSO"
-.BR dovecot (1),
-.BR dovecot\-lda (1),
-.BR sieve\-dump (1),
-.BR sieve\-filter (1),
-.BR sievec (1),
-.BR pigeonhole (7)
diff --git a/doc/man/sievec.1.in b/doc/man/sievec.1.in
deleted file mode 100644
index 74aae05c4..000000000
--- a/doc/man/sievec.1.in
+++ /dev/null
@@ -1,142 +0,0 @@
-.\" Copyright (c) 2010-2018 Pigeonhole authors, see the included COPYING file
-.TH "SIEVEC" 1 "2016-04-05" "Pigeonhole for Dovecot v2.4" "Pigeonhole"
-.\"------------------------------------------------------------------------
-.SH NAME
-sievec \- Pigeonhole\(aqs Sieve script compiler
-.\"------------------------------------------------------------------------
-.SH SYNOPSIS
-.B sievec
-.RI [ options ]
-.I script\-file
-.RI [ out\-file ]
-.\"------------------------------------------------------------------------
-.SH DESCRIPTION
-.PP
-The \fBsievec\fP command is part of the Pigeonhole Project
-(\fBpigeonhole\fR(7)), which adds Sieve (RFC 5228) support to the Dovecot
-secure IMAP and POP3 server (\fBdovecot\fR(1)).
-.PP
-Using the \fBsievec\fP command, Sieve scripts can be compiled into a binary
-representation. The resulting binary can be used directly to process e\-mail
-messages during the delivery process. The delivery of mail messages and \- by
-means of the LDA Sieve plugin \- also the execution of Sieve scripts is
-performed by Dovecot\(aqs local delivery agent (LDA) called \fBdovecot\-lda\fP(1).
-Usually, it is not necessary to compile the Sieve script manually using
-\fBsievec\fP, because \fBdovecot\-lda\fP will do this automatically if the binary
-is missing. However, in some cases \fBdovecot\-lda\fP does not have permission to
-write the compiled binary to disk, forcing it to recompile the script every time
-it is executed. Using the \fBsievec\fP tool, this can be performed manually by
-an authorized user to increase performance.
-.PP
-The Pigeonhole Sieve implementation recognizes files with a \fB.sieve\fP
-extension as Sieve scripts and corresponding files with a \fB.svbin\fP extension
-as the associated compiled binary. This means for example that Dovecot\(aqs LDA
-process will first look for a binary file \(dqdovecot.svbin\(dq when it needs to
-execute \(dqdovecot.sieve\(dq. It will compile a new binary when it is missing
-or outdated.
-.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 \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
-.TP
-.BI \-c\  config\-file
-Alternative Dovecot configuration file path.
-.TP
-.B \-d
-Don\(aqt write the binary to \fIout\-file\fP, but write a textual dump of the
-binary instead. 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 \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
-.B \-D
-Enable Sieve debugging.
-.TP
-.BI \-o\  setting = value
-Overrides the configuration
-.I setting
-from
-.I @pkgsysconfdir@/dovecot.conf
-and from the userdb with the given
-.IR value .
-In order to override multiple settings, the
-.B \-o
-option may be specified multiple times.
-.TP
-.BI \-u\  user
-Run the Sieve script for the given \fIuser\fP. When omitted, the
-.I command
-will be executed with the environment of the currently logged in user.
-.TP
-.BI \-x\  extensions
-Set the available extensions. The parameter is a space\-separated list of the
-active extensions. By prepending the extension identifiers with \fB+\fP or
-\fB\-\fP, extensions can be included or excluded relative to the configured set
-of active extensions. If no extensions have a \fB+\fP or \fB\-\fP prefix, only
-those extensions that are explicitly listed will be enabled. Unknown extensions
-are ignored and a warning is produced.
-
-For example \fB\-x\fP \(dq+editheader \-enotify\(dq will enable the editheader
-extension and disable the enotify extension. The rest of the active extensions
-depends on the \fIsieve_extensions\fP and
-\fIsieve_global_extensions\fP settings. By default, i.e.
-when \fIsieve_extensions\fP and \fIsieve_global_extensions\fP remain
-unconfigured, all supported extensions are available, except for deprecated
-extensions or those that are still under development.
-
-.\"------------------------------------------------------------------------
-.SH ARGUMENTS
-.TP
-.I script\-file
-Specifies the script to be compiled. If the \fIscript\-file\fP argument is a
-directory, all files in that directory with a \fI.sieve\fP extension are
-compiled into a corresponding \fI.svbin\fP binary file. The compilation is not
-halted upon errors; it attempts to compile as many scripts in the directory as
-possible. Note that the \fB\-d\fP option and the \fIout\-file\fP argument are
-not allowed when the \fIscript\-file\fP argument is a directory.
-.TP
-.I out\-file
-Specifies where the (binary) output is to be written. This argument is optional.
-If this argument is omitted, a binary compiled from <scriptname>.sieve is saved
-as <scriptname>.svbin. If this argument is omitted and \fB\-b\fP is specified,
-the binary dump is output to \fBstdout\fP.
-.\"------------------------------------------------------------------------
-.SH "EXIT STATUS"
-.B sievec
-will exit with one of the following values:
-.TP 4
-.B 0
-Compile was successful. (EX_OK, EXIT_SUCCESS)
-.TP
-.B 1
-Operation failed. This is returned for almost all failures.
-(EXIT_FAILURE)
-.TP
-.B 64
-Invalid parameter given. (EX_USAGE)
-.\"------------------------------------------------------------------------
-.SH FILES
-.TP
-.I @pkgsysconfdir@/dovecot.conf
-Dovecot\(aqs main configuration file.
-.TP
-.I @pkgsysconfdir@/conf.d/90\-sieve.conf
-Sieve interpreter settings (included from Dovecot\(aqs main configuration file)
-.\"------------------------------------------------------------------------
-@INCLUDE:reporting-bugs@
-.\"------------------------------------------------------------------------
-.SH "SEE ALSO"
-.BR dovecot (1),
-.BR dovecot\-lda (1),
-.BR sieve\-dump (1),
-.BR sieve\-filter (1),
-.BR sieve\-test (1),
-.BR pigeonhole (7)
-- 
GitLab