Pigeonhole Sieve Configuration ============================== Basic Configuration ------------------- To use Sieve, you will first need to make sure you are using Dovecot or for delivering incoming mail to users' mailboxes. Then, you need to enable the Pigeonhole Sieve plugin in your configuration: ---%<------------------------------------------------------------------------- protocol lda { mail_plugins = $mail_plugins sieve } protocol lmtp { mail_plugins = $mail_plugins sieve } ---%<------------------------------------------------------------------------- The sieve plugin recognizes the following configuration options in the 'plugin' section of the config file (default values are shown if applicable): sieve = ~/.dovecot.sieve : The path to the user's main active Sieve script. When [Pigeonhole.ManageSieve.txt] is used, this is a symbolic link pointing to the active script in the 'sieve_dir' directory. Avoid placing the active Sieve script inside the 'sieve_dir' directory. sieve_default = (v0.3+) : 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'. Check the [Pigeonhole.Sieve.Configuration.txt] for instructions on running global Sieve scripts before and after the user's personal script. This is usually a global script, so be sure to pre-compile the specified script manually in that case using the 'sievec' command line tool, as explained [Pigeonhole.Sieve.Usage.txt]. sieve_global_path = : The deprecated name for the 'sieve_default' setting (Pigeonhole v0.2 and earlier). sieve_global_dir = : Directory for :global include scripts for the include extension [http://tools.ietf.org/html/draft-ietf-sieve-include-05]. The Sieve interpreter only recognizes files that end with a '.sieve' extension, so the include extension expects a file called 'name.sieve' to exist in the 'sieve_global_dir' directory for the following example: : ---%<----------------------------------------------------------------------- require "include"; include :global "name"; ---%<----------------------------------------------------------------------- sieve_dir = ~/: Directory for :personal include scripts for the include extension [http://tools.ietf.org/html/draft-ietf-sieve-include-05]. The Sieve interpreter only recognizes files that end with a '.sieve' extension, so the include extension expects a file called 'name.sieve' to exist in the 'sieve_dir' directory for: : ---%<----------------------------------------------------------------------- require "include"; include :personal "name"; ---%<----------------------------------------------------------------------- : When using [Pigeonhole.ManageSieve.txt], this is also the directory where scripts are uploaded. sieve_extensions = : Which Sieve language extensions are available to users. By default, all supported extensions are available, except for deprecated extensions, extensions that add the ability to change messages, extensions that require explicit configuration or extensions that are still under development. Some system administrators may want to disable certain Sieve extensions or enable those that are not available by default. All supported extensions are listed [Pigeonhole.Sieve.txt]. Normally, all enabled extensions must be listed for this setting, but starting with Sieve version 0.1.7, this setting can use '+' and '-' to specify differences relative to the default. For example 'sieve_extensions = +imapflags' will enable the deprecated imapflags extension [http://tools.ietf.org/html/draft-melnikov-sieve-imapflags-03] in addition to all extensions enabled by default. sieve_global_extensions = (v0.3+) : 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 [Pigeonhole.Sieve.Plugins.txt] for available plugins. 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 [http://tools.ietf.org/html/rfc5233/]. 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 service with identical semantics. 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_global_path = /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/ } ---%<------------------------------------------------------------------------- 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. The meaning of 0 differs based on your version. For versions v0.3.0 and beyond this means that redirect is prohibited. For older versions, however, this means that the number of redirects is /unlimited/, so be careful. Script Locations ---------------- /(Pigeonhole v0.3.1+ only)/ 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 thelocation of a single Sieve script, such as 'sieve=', 'sieve_default=', 'sieve_dir=' and 'sieve_global_dir=' accept the following extended syntax: ---%<------------------------------------------------------------------------- location = [:]path[;