Skip to content

Dovecot2

services.dovecot2.configFile

Config file used for the whole dovecot configuration. Type: null or path

Default

null

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.createMailUser

Whether to enable automatically creating the user given in {option}services.dovecot.user and the group given in {option}services.dovecot.group.. Type: boolean

Default

true

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.enable

Whether to enable the dovecot 2.x POP3/IMAP server. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.enableDHE

Whether to enable ssl_dh and generation of primes for the key exchange. Type: boolean

Default

true

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.enableImap

Whether to enable starting the IMAP listener (when Dovecot is enabled). Type: boolean

Default

true

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.enableLmtp

Whether to enable starting the LMTP listener (when Dovecot is enabled). Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.enablePAM

Whether to enable creating a own Dovecot PAM service and configure PAM user logins. Type: boolean

Default

true

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.enablePop3

Whether to enable starting the POP3 listener (when Dovecot is enabled). Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.enableQuota

Whether to enable the dovecot quota service. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.extraConfig

Additional entries to put verbatim into Dovecot's config file. Type: strings concatenated with "\n"

Default

""

Example

"mail_debug = yes"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.group

Dovecot group name. Type: string

Default

"dovecot2"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.imapsieve.mailbox

Configure Sieve filtering rules on IMAP actions Type: list of (submodule)

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.imapsieve.mailbox.*.after

When an IMAP event of interest occurs, this sieve script is executed after any user script respectively.

This setting each specify the location of a single sieve script. The semantics of this setting is similar to sieve_after: the specified scripts form a sequence together with the user script in which the next script is only executed when an (implicit) keep action is executed.

Type: null or path

Default

null

Example

./report-spam.sieve

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.imapsieve.mailbox.*.before

When an IMAP event of interest occurs, this sieve script is executed before any user script respectively.

This setting each specify the location of a single sieve script. The semantics of this setting is similar to sieve_before: the specified scripts form a sequence together with the user script in which the next script is only executed when an (implicit) keep action is executed.

Type: null or path

Default

null

Example

./report-spam.sieve

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.imapsieve.mailbox.*.causes

Only execute the administrator Sieve scripts for the mailbox configured with services.dovecot2.imapsieve.mailbox..name when one of the listed IMAPSIEVE causes apply.

This has no effect on the user script, which is always executed no matter the cause.

Type: list of (one of "APPEND", "COPY", "FLAG")

Default

[ ]

Example

["COPY""APPEND"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.imapsieve.mailbox.*.from

Only execute the administrator Sieve scripts for the mailbox configured with services.dovecot2.imapsieve.mailbox..name when the message originates from the indicated mailbox.

This setting supports wildcards with a syntax compatible with the IMAP LIST command, meaning that this setting can apply to multiple or even all ("*") mailboxes.

Type: null or string

Default

null

Example

"*"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.imapsieve.mailbox.*.name

This setting configures the name of a mailbox for which administrator scripts are configured.

The settings defined hereafter with matching sequence numbers apply to the mailbox named by this setting.

This setting supports wildcards with a syntax compatible with the IMAP LIST command, meaning that this setting can apply to multiple or even all ("*") mailboxes.

Type: string

Example

"Junk"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.mailGroup

Default group to store mail for virtual users. Type: null or string

Default

null

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.mailLocation

Location that dovecot will use for mail folders. Dovecot mail_location option.

Type: string

Default

"maildir:/var/spool/mail/%u"

Example

"maildir:~/mail:INBOX=/var/spool/mail/%u"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.mailPlugins

Additional entries to add to the mail_plugins variable, globally and per protocol Type: submodule

Default

{globally = {enable = [ ];};perProtocol = { };}

Example

{globally = {enable = ["acl"];};perProtocol = {imap = {enable = ["imap_acl"];};};}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.mailPlugins.globally

Additional entries to add to the mail_plugins variable for all protocols Type: submodule

Default

{enable = [ ];}

Example

{enable = ["virtual"];}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.mailPlugins.globally.enable

mail plugins to enable as a list of strings to append to the top-level $mail_plugins configuration variable Type: list of string

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.mailPlugins.perProtocol

Additional entries to add to the mail_plugins variable, per protocol Type: attribute set of (submodule)

Default

{ }

Example

{imap = ["imap_acl"];}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.mailPlugins.perProtocol.<name>.enable

mail plugins to enable as a list of strings to append to the corresponding per-protocol $mail_plugins configuration variable Type: list of string

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.mailUser

Default user to store mail for virtual users. Type: null or string

Default

null

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.mailboxes

Configure mailboxes and auto create or subscribe them. Type: (attribute set of (submodule)) or (list of unspecified value) convertible to it

Default

{ }

Example

{Spam = { specialUse = "Junk"; auto = "create"; };}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.mailboxes.<name>.auto

Whether to automatically create or create and subscribe to the mailbox or not. Type: one of "no", "create", "subscribe"

Default

"no"

Example

"subscribe"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.mailboxes.<name>.autoexpunge

To automatically remove all email from the mailbox which is older than the specified time.

Type: null or string

Default

null

Example

"60d"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.mailboxes.<name>.name

The name of the mailbox. Type: string matching the pattern [^"]+

Default

"‹name›"

Example

"Spam"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.mailboxes.<name>.specialUse

Null if no special use flag is set. Other than that every use flag mentioned in the RFC is valid. Type: null or one of "All", "Archive", "Drafts", "Flagged", "Junk", "Sent", "Trash"

Default

null

Example

"Junk"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.modules

Symlinks the contents of lib/dovecot of every given package into /etc/dovecot/modules. This will make the given modules available if a dovecot package with the module_dir patch applied is being used.

Type: list of package

Default

[ ]

Example

[ pkgs.dovecot_pigeonhole ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.pluginSettings

Plugin settings for dovecot in general, e.g. sieve, sieve_default, etc.

Some of the other knobs of this module will influence by default the plugin settings, but you can still override any plugin settings.

If you override a plugin setting, its value is cleared and you have to copy over the defaults.

Type: attribute set of (string or package)

Default

{ }

Example

{sieve = "file:~/sieve;active=~/.dovecot.sieve";}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.protocols

Additional listeners to start when Dovecot is enabled. Type: list of string

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.quotaGlobalPerUser

Quota limit for the user in bytes. Supports suffixes b, k, M, G, T and %. Type: string

Default

"100G"

Example

"10G"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.quotaPort

The Port the dovecot quota service binds to. If using postfix, add check_policy_service inet:localhost:12340 to your smtpd_recipient_restrictions in your postfix config.

Type: string

Default

"12340"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.showPAMFailure

Whether to enable showing the PAM failure message on authentication error (useful for OTPW). Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.sieve.extensions

Sieve extensions for use in user scripts Type: list of string

Default

[ ]

Example

["notify""imapflags""vnd.dovecot.filter"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.sieve.globalExtensions

Sieve extensions for use in global scripts Type: list of string

Default

[ ]

Example

["vnd.dovecot.environment"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.sieve.pipeBins

Programs available for use by the vnd.dovecot.pipe extension Type: list of path

Default

[ ]

Example

map lib.getExe [(pkgs.writeShellScriptBin "learn-ham.sh" "exec ${pkgs.rspamd}/bin/rspamc learn_ham")(pkgs.writeShellScriptBin "learn-spam.sh" "exec ${pkgs.rspamd}/bin/rspamc learn_spam")]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.sieve.plugins

Sieve plugins to load Type: list of string

Default

[ ]

Example

["sieve_extprograms"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.sieve.scripts

Sieve scripts to be executed. Key is a sequence, e.g. 'before2', 'after' etc. Type: attribute set of path

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.sslCACert

Path to the server's CA certificate key. Type: null or string

Default

null

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.sslServerCert

Path to the server's public key. Type: null or string

Default

null

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.sslServerKey

Path to the server's private key. Type: null or string

Default

null

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix

services.dovecot2.user

Dovecot user name. Type: string

Default

"dovecot2"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/dovecot.nix