Default variables: configuration

Some of debops.dovecot default variables have more extensive configuration than simple strings or lists, here you can find documentation and examples for them.

dovecot_imap_config_map

Configuration dictionary related to the IMAP protocol configuration. Every configuration key is optional and overwrites the default values implicitly used by Dovecot. Each section service imap-login, service imap and protocol imap is defined as a YAML dict with the corresponding key:

login-service

Configuration settings under this key will go into the service imap-login {} section which defines the pre-login process handling. Possible keys are inet_listener and upstream Dovecot options such as service_count or process_min_avail. More information about the login setup can be found at the Dovecot Login Process page.

inet_listener

Will create a network listener definition. Accepts further YAML dicts with the listener name as key.

The listener name itself must reference a dict defining listener properties such as port (network port), allow (address/subnet restrictions) or address (listen address). More information about the inet_listener setup can be found at the Dovecot inet_listeners page.

unix_listener

Will create a Unix socket definition. The key name of the listeners corresponds to the socket path.

The listener name itself must reference a dict defining socket properties such as owner (socket owner), group (socket group) or mode (access mode). More information about the unix_listener setup can be found at the Dovecot unix_listeners page.

service
Configuration settings under this key will go into the service imap {} section which defines the post-login process handling. Possible keys are the upstream Dovecot options such as process_limit or vsz_limit. More information about the IMAP service options can be found at the Dovecot IMAP Service page.
protocol
Configuration settings under this key will go into the protocol imap {} section which defines general protocol behaviour. Possible keys are the upstream Dovecot options such as mail_max_userip_connections or mail_plugins.

Example

Restrict access to the IMAP service to 192.168.1.0/24. Always keep a process waiting for more connections, restrict maximal number of IMAP processes to 512 and allow 15 IMAP connections for each user:

dovecot_imap_config_map:

  login-service:
    inet_listener:
      imap:
        access: [ '192.168.1.0/24' ]

    process_min_avail: 1

  service:
    process_limit: 512

  protocol:
    mail_max_userip_connections: 15

dovecot_imap_listeners

List of IMAP network listener names which will be used to decide which default listeners to create. Their configuration can be customized via dovecot_imap_config_map.

Examples

Possible configuration options for enabling IMAP:

Service dovecot_protocols dovecot_imap_listeners dovecot_pki
Port 143 (plain) [ 'imap' ] [ 'imap' ] False
Port 143 (StartTLS) [ 'imap' ] [ 'imap' ] True
Port 143 (StartTLS) + 995 (SSL) [ 'imap' ] [ 'imap', 'imaps' ] True
Port 995 (SSL) [ 'imap' ] [ 'imaps' ] True

dovecot_pop3_config_map

Configuration dictionary related to the POP3 protocol configuration. Please to the dovecot_imap_config_map for a description of the dict layout.

dovecot_pop3_listeners

List of POP3 network listener names which will be used to decide which default listeners to create. Their configuration can be customized via dovecot_pop3_config_map.

dovecot_lmtp_config_map

Configuration dictionary related to the LMTP protocol configuration. Please refer to the dovecot_imap_config_map for a description of the dict layout.

In contrast to the other protocol maps, LMTP inet_listeners must always be listed in dovecot_lmtp_config_map and define the port property, as Dovecot doesn't define a default port for LMTP network listeners.

dovecot_lmtp_listeners

List of LMTP network and unix listener names which will be created. The LMTP listeners configuration works a bit different from other network protocols. Each listeners mentioned in dovecot_lmtp_listeners must also be defined in dovecot_lmtp_config_map.

dovecot_lda_config_map

Configuration dictionary related to the Dovecot LDA protocol configuration. The only valid key is protocol which references a YAML dict defining the protocol lda {} section. The protocol dict then accepts the upstream Dovecot configuration options such as mail_plugins.

Example

Enable sieve mail plugin with local mail delivery:

dovecot_lda_config_map:

  protocol:
    mail_plugins: '$mail_plugins sieve'

dovecot_managesieve_config_map

Configuration dictionary related to the ManageSieve protocol configuration. Please refer to the dovecot_imap_config_map for a description of the dict layout.

dovecot_managesieve_listeners

List of ManageSieve network listener names which will be used to decide which default listeners to create when managesieve is enabled in dovecot_protocols. Their configuration can be customized via dovecot_managesieve_config_map.

Example

If you want to enable a second ManageSieve listener, you need to add its name to the dovecot_managesieve_listeners list and define its properties in the dovecot_managesieve_config_map. For example to bind a second listener to a specific address on port 2000:

dovecot_managesieve_listeners: [ 'sieve', 'sieve_deprecated' ]

dovecot_managesieve_config_map:

  login-service:
    inet_listeners:
      sieve_deprecated:
        address: 192.168.1.42
        port: 2000

dovecot_postfix_transport

LMTP socket name which will be configured in Postfix to send mails for delivery. The value is a file system path relative to /var/spool/postfix Make sure there is a corresponding LMTP unix_listener defined in dovecot_lmtp_config_map and enabled via dovecot_lmtp_listeners. The LMTP transport target will only be configured in Postfix when 'lmtp' is enabled in dovecot_protocols.

For most people the default configuration will be sufficient.