# Pigeonhole settings¶

## Global settings¶

### managesieve_client_workarounds¶

• Default: <empty>

• Value: none exists

Enables various workarounds for ManageSieve clients. Currently there are none.

### managesieve_implementation_string¶

• Default: Dovecot Pigeonhole

• Value: String

To fool ManageSieve clients that are focused on CMU’s timesieved you can specify the IMPLEMENTATION capability that the Dovecot reports to clients (e.g. Cyrus timsieved v2.2.13).

### managesieve_logout_format¶

• Default: bytes=%i/%o

• Value: String

Specifies the string pattern used to compose the logout message of an authenticated session. The following substitutions are available:

 %i Total number of bytes read from client. %o Total number of bytes sent to client.

### managesieve_max_compile_errors¶

The maximum number of compile errors that are returned to the client upon script upload or script verification.

### managesieve_max_line_length¶

The maximum ManageSieve command line length in bytes. This setting is directly borrowed from IMAP. But, since long command lines are very unlikely with ManageSieve, changing this will not be very useful.

### managesieve_notify_capability¶

• Default: dynamically determined

• Value: String

NOTIFY capabilities reported by the ManageSieve service before authentication. If left unassigned, these will be assigned dynamically according to what the Sieve interpreter supports by default (after login this may differ depending on the authenticated user).

### managesieve_sieve_capability¶

• Default: fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext

• Value:

SIEVE capabilities reported by the ManageSieve service before authentication. If left unassigned, these will be assigned dynamically according to what the Sieve interpreter supports by default (after login this may differ depending on the authenticated user).

## Sieve Plugin settings¶

### sieve¶

Changed in version v0.3.1:
• Default: file:~/sieve;active=~/.dovecot.sieve

• Value: String

The location of the user’s main Sieve script or script storage. The LDA Sieve plugin uses this to find the active script for Sieve filtering at delivery. The Sieve include extension uses this location for retrieving :personal scripts.

This location is also where the ManageSieve service will store the user’s scripts, if supported by the location type. For the file location type, the location will then be the path to the storage directory for all the user’s personal Sieve scripts. ManageSieve maintains a symbolic link pointing to the currently active script (the script executed at delivery). The location of this symbolic link can be configured using the ;active=<path> option.

For Pigeonhole versions before v0.3.1, this setting can only be a filesystem path pointing to a script file, or - when ManageSieve is used - it is the location of the symbolic link pointing to the active script in the storage directory. That storage directory is then configured using the deprecated sieve_dir setting.

For specifics for this see Script Locations.

### sieve_after¶

• Default: <empty>

• Value: String

This setting can be specified multiple times by adding a number after the setting name, such as sieve_after2 and so on.

Location of scripts that need to be executed after the user’s personal script. If a file location path points to a directory, all the Sieve scripts contained therein (with the proper .sieve extension) are executed. The order of execution within that directory is determined by the file names, using a normal 8bit per-character comparison. Multiple script locations can be specified by appending an increasing number to the setting name. The Sieve scripts found from these locations are added to the script execution sequence in the specified order. Reading the numbered sieve_before settings stops at the first missing setting, so no numbers may be skipped.

### sieve_before¶

• Default: <empty>

• Value: String

This setting can be specified multiple times by adding a number after the setting name, such as sieve_before2 and so on.

See sieve_after for details, this setting behaves the same way, except the scripts are run before user’s personal scripts.

### sieve_default¶

• Default: <empty>

• Value: String

New in version v0.3.

The location of the default personal sieve script file which gets executed ONLY if user’s private Sieve script does not exist, e.g. file:/var/lib/dovecot/default.sieve (check the multiscript section 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 here. This setting used to be called sieve_global_path, but that name is now deprecated.

### sieve_default_name¶

• Defalt: <empty>

• Value: String

New in version v0.4.8.

The name by which the default Sieve script is visible to ManageSieve clients. Normally, it is not visible at all.

### sieve_dir¶

• Default: ~/sieve

• Value: String

Deprecated since version 0.3.1.

Directory for :personal include scripts for the include extension. 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 a script called name. When using ManageSieve, this is also the directory where scripts are uploaded. For recent Pigeonhole versions, this location is configured as part of the sieve setting.

### sieve_discard¶

• Default: <empty>

• Value: String

New in version v0.4.16.

The location of a Sieve script that is run for any message that is about to be discarded; i.e., it is not delivered anywhere by the normal Sieve execution. This only happens when the “implicit keep” is canceled, by e.g. the “discard” action, and no actions that deliver the message are executed. This “discard script” can prevent discarding the message, by executing alternative actions. If the discard script does nothing, the message is still discarded as it would be when no discard script is configured.

### sieve_extensions¶

• Default: See description.

• Value: String

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 here. 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 in addition to all extensions enabled by default.

### sieve_global¶

• Default: <empty>

• Value: String

New in version v0.3.1.

Location for :global include scripts for the Sieve include extension. This setting used to be called plugin-sievei-setting-sieve_global_dir, but that name is now deprecated.

### sieve_global_dir¶

• Default: <empty>

• Value: :ref:string

Deprecated since version v0.3.1.

Directory for :global include scripts for the include extension. 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 a script called name. For recent Pigeonhole versions, a more generic version of this setting is called sieve_global and allows locations other than file system directories.

### sieve_global_extensions¶

New in version v0.3.

Which Sieve language extensions are only available 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, 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_global_path¶

• Default: <empty>

• Value: String

Deprecated since version 0.2.

The deprecated name for the sieve_default setting.

### sieve_implicit_extensions¶

• Default: <empty>

• Value: String

Which Sieve language extensions are implicitly available to users. The extensions listed in this setting do not need to be enabled explicitly using the Sieve “require” command. This behavior directly violates the Sieve standard, but can be necessary for compatibility with some existing implementations of Sieve (notably jSieve). Do not use this setting unless you really need to! The syntax and semantics of this setting are otherwise identical to the sieve_extensions setting.

### sieve_max_script_size¶

• Default: 1M

• Value: Size

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¶

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¶

Changed in version v0.3.

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.

### sieve_plugins¶

• Default: <empty>

• Value: Space separated list of String

The Pigeonhole Sieve interpreter can have plugins of its own. Using this setting, the used plugins can be specified. Check the Sieve plugin section for available plugins.

### sieve_redirect_envelope_from¶

• Default: sender

• Value: see table

New in version v0.4.4.

Specifies what envelope sender address is used for redirected messages. Normally, the Sieve redirect command copies the sender address for the redirected message from the processed message. So, the redirected message appears to originate from the original sender.

The following values are supported for this setting:

sender

The sender address is used (default)

recipient

The final recipient address is used

orig_recipient

The original recipient is used

user_email (v0.4.14+)

The user’s primary address is used. This is configured with the sieve_user_email setting. If that setting is not configured, user_email is equal to sender (the default).

postmaster

<user@domain>

Redirected messages are always sent from user@domain. The angle brackets are mandatory. The null <> address is also supported.

When the envelope sender of the processed message is the null address <>, the envelope sender of the redirected message is also always <>, irrespective of what is configured for this setting.

### sieve_subaddress_sep¶

• Default: +

• Value: String

Removed in version v0.2.

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 has been replaced with recipient_delimiter.

### sieve_trace_dir¶

• Default: <empty>

• Value: String

The directory where trace files are written. Trace debugging is disabled if this setting is not configured or if the directory does not exist. If the path is relative or it starts with ~/ it is interpreted relative to the current user’s home directory.

See Trace Debugging.

### sieve_trace_level¶

• Default: <empty>

• Values: actions, commands, tests, matching

The verbosity level of the trace messages. Trace debugging is disabled if this setting is not configured. Possible values are:

actions

Only print executed action commands, like keep, fileinto, reject and redirect.

commands

Print any executed command, excluding test commands.

tests

Print all executed commands and performed tests.

matching

Print all executed commands, performed tests and the values matched in those tests.

See Trace Debugging.

### sieve_trace_debug¶

• Default: no

• Value: Boolean

Enables highly verbose debugging messages that are usually only useful for developers.

See Trace Debugging.

### sieve_trace_addresses¶

• Default: no

• Value: Boolean

Enables showing byte code addresses in the trace output, rather than only the source line numbers.

See Trace Debugging.

### sieve_user_email¶

• Default: <empty>

• Value: String

New in version v0.4.14.

The primary e-mail address for the user. This is used as a default when no other appropriate address is available for sending messages. If this setting is not configured, either the postmaster or null <> address is used as a sender, depending on the action involved. This setting is important when there is no message envelope to extract addresses from, such as when the script is executed in IMAP.

### sieve_user_log¶

• Default: ~/.dovecot.sieve.log

• Value: String

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 <filename>.log by default. If it is not a file, the default user log file is ~/.dovecot.sieve.log`.