Compiling ========= If you downloaded the sources using Mercurial, you will need to execute ./autogen.sh first to build the automake structure in your source tree. This process requires autotools and libtool to be installed. If you installed Dovecot from sources, Pigeonhole's configure script should be able to find the installed dovecot-config automatically: ./configure make sudo make install If your system uses a $prefix different than the default /usr/local, the configure script can still find the installed dovecot-config automatically when supplied with the proper --prefix argument: ./configure --prefix=/usr make sudo make install If this doesn't work, you can use --with-dovecot= configure option, where the path points to a directory containing dovecot-config file. This can point to an installed file: ./configure --with-dovecot=/usr/local/lib/dovecot make sudo make install or to a Dovecot source directory that is already compiled: ./configure --with-dovecot=../dovecot-2.1.0 make sudo make install The following additional parameters may be of interest for the configuration of the Pigeonhole build: --with-managesieve=yes Controls whether Pigeonhole ManageSieve is compiled and installed, which is the default. --with-unfinished-features=no Controls whether unfinished features and extensions are built. Enabling this will enable the compilation of code that is considered unfinished and highly experimental and may therefore introduce bugs and unexpected behavior. In fact, it may not compile at all. Enable this only when you are eager to test some of the new development functionality. Configuration ============= The Pigeonhole package provides the following items: - The Sieve interpreter plugin for Dovecot's Local Delivery Agent (LDA): This facilitates the actual Sieve filtering upon delivery. - The ManageSieve Service: This implements the ManageSieve protocol through which users can remotely manage Sieve scripts on the server. The functionality of these items is described in more detail in the README file. In this file and in this section their configuration is described. Example configuration files are provided in the doc/example-config directory of this package. Sieve Interpreter - Basic Configuration --------------------------------------- To use Sieve, you will first need to make sure you are using Dovecot LDA or Dovecot LMTP for delivering incoming mail to users' mailboxes. Then, you need to enable the Sieve interpreter plugin for LDA/LMTP in your dovecot.conf: protocol lda { .. mail_plugins = sieve # ... other plugins like quota } protocol lmtp { .. mail_plugins = sieve # ... other plugins like quota } The Sieve interpreter recognizes the following configuration options in the plugin section of the config file (default values are shown if applicable): sieve = ~/.dovecot.sieve The location of the user's main active script. sieve_default = The location of the default personal sieve script file, which gets executed ONLY if user's private Sieve script does no exist, e.g. /var/lib/dovecot/default.sieve. This is usually a global script, so be sure to pre-compile this script manually using the sievec command line tool, as explained in the README file. This setting used to be called `sieve_global_path', but that name is now deprecated. sieve_global_dir = Location for :global include scripts for the Sieve include extension. sieve_dir = ~/sieve Location for :personal include scripts for the Sieve include extension. sieve_extensions = Which Sieve language extensions are available to users. By default, all supported extensions are available, except for deprecated extensions or those that are still under development. Some system administrators may want to disable certain Sieve extensions or enable those that are not available by default. This setting can use '+' and '-' to specify differences relative to the default. For example `sieve_extensions = +imapflags' will enable the deprecated imapflags extension in addition to all extensions were already enabled by default. sieve_global_extensions = Which Sieve language extensions are ONLY avalable in global scripts. This can be used to restrict the use of certain Sieve extensions to administrator control, for instance when these extensions can cause security concerns. This setting has higher precedence than the `sieve_extensions' setting (above), meaning that the extensions enabled with this setting are never available to the user's personal script no matter what is specified for the `sieve_extensions' setting. The syntax of this setting is similar to the `sieve_extensions' setting, with the difference that extensions are enabled or disabled for exclusive use in global scripts. Currently, no extensions are marked as such by default. sieve_plugins = The Pigeonhole Sieve interpreter can have plugins of its own. Using this setting, the used plugins can be specified. Check the Dovecot wiki (wiki2.dovecot.org) or the pigeonhole website (http://pigeonhole.dovecot.org) for available plugins. The sieve_extprograms plugin is included in this release. sieve_user_log = The path to the file where the user log file is written. If not configured, a default location is used. If the main user's personal Sieve (as configured with sieve=) is a file, the logfile is set to .log by default. If it is not a file, the default user log file is ~/.dovecot.sieve.log. recipient_delimiter = + The separator that is expected between the :user and :detail address parts introduced by the subaddress extension. This may also be a sequence of characters (e.g. '--'). The current implementation looks for the separator from the left of the localpart and uses the first one encountered. The :user part is left of the separator and the :detail part is right. This setting is also used by Dovecot's LMTP service. For example: plugin { ... # The location of the user's active script: sieve = ~/.dovecot.sieve # If the user has no personal active script (i.e. if the file # indicated in sieve= does not exist), use this one: sieve_default = /var/lib/dovecot/sieve/default.sieve # The include extension fetches the :personal scripts from this # directory. When ManageSieve is used, this is also where scripts # are uploaded. sieve_dir = ~/sieve # The include extension fetches the :global scripts from this # directory. sieve_global_dir = /var/lib/dovecot/sieve/global/ } Sieve Interpreter - Configurable Limits --------------------------------------- sieve_max_script_size = 1M The maximum size of a Sieve script. The compiler will refuse to compile any script larger than this limit. If set to 0, no limit on the script size is enforced. sieve_max_actions = 32 The maximum number of actions that can be performed during a single script execution. If set to 0, no limit on the total number of actions is enforced. sieve_max_redirects = 4 The maximum number of redirect actions that can be performed during a single script execution. If set to 0, no redirect actions are allowed. Sieve Interpreter - Script Locations ------------------------------------ The location of Sieve scripts is not limited to the file system. The Sieve interpreter can be extended to retrieve Sieve scripts from other sources as well, such as a database. Currently, all settings that are used to obtain the location of a single Sieve script, such as sieve=, sieve_default=, sieve_dir= and sieve_global_dir= accept the following extended syntax: location = [:]path[;