Postfix
services.postfix.aliasFiles
Aliases' tables to be compiled and placed into /var/lib/postfix/conf.
Type: attribute set of path
Default
{ }
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.aliasMapType
The format the alias map should have. Use regexp if you want to use regular expressions.
Type: one of "hash", "regexp", "pcre"
Default
"hash"
Example
"regexp"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.canonical
Entries for the {manpage}canonical(5)
table.
Type: strings concatenated with "\n"
Default
""
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.config
The main.cf configuration file as key value set.
Type: attribute set of (boolean or string or list of string)
Example
{mail_owner = "postfix";smtp_tls_security_level = "may";}
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.destination
Full (!) list of domains we deliver locally. Leave blank for acceptable Postfix default.
Type: null or (list of string)
Default
null
Example
["localhost"]
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.dnsBlacklistOverrides
contents of check_client_access for overriding dnsBlacklists
Type: strings concatenated with "\n"
Default
""
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.dnsBlacklists
dns blacklist servers to use with smtpd_client_restrictions
Type: list of string
Default
[ ]
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.domain
Domain to use. Leave blank to use hostname minus first component.
Type: string
Default
""
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.enable
Whether to run the Postfix mail server.
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.enableHeaderChecks
Whether to enable postfix header checks
Type: boolean
Default
false
Example
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.enableSmtp
Whether to enable smtp in master.cf.
Type: boolean
Default
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.enableSubmission
Whether to enable smtp submission.
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.enableSubmissions
Whether to enable smtp submission via smtps.
According to RFC 8314 this should be preferred over STARTTLS for submission of messages by end user clients.
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.extraAliases
Additional entries to put verbatim into aliases file, cf. man-page aliases(8).
Type: strings concatenated with "\n"
Default
""
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.extraConfig
Extra lines to be added verbatim to the main.cf configuration file.
Type: strings concatenated with "\n"
Default
""
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.extraHeaderChecks
Extra lines to /etc/postfix/header_checks file.
Type: strings concatenated with "\n"
Default
""
Example
"/^X-Spam-Flag:/ REDIRECT spam@example.com"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.extraMasterConf
Extra lines to append to the generated master.cf file.
Type: strings concatenated with "\n"
Default
""
Example
"submission inet n - n - - smtpd"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.group
What to call the Postfix group (must be used only for postfix).
Type: string
Default
"postfix"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.headerChecks
Postfix header checks.
Type: list of (submodule)
Default
[ ]
Example
[{action = "REDIRECT spam@example.com";pattern = "/^X-Spam-Flag:/";}]
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.headerChecks.*.action
The action to be executed when the pattern is matched
Type: string
Default
"DUNNO"
Example
"BCC mail@example.com"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.headerChecks.*.pattern
A regexp pattern matching the header
Type: string
Default
"/^.*/"
Example
"/^X-Mailer:/"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.hostname
Hostname to use. Leave blank to use just the hostname of machine. It should be FQDN.
Type: string
Default
""
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.localRecipients
List of accepted local users. Specify a bare username, an
"@domain.tld"
wild-card, or a complete
"user@domain.tld"
address. If set, these names end
up in the local recipient map -- see the local(8) man-page -- and
effectively replace the system user database lookup that's otherwise
used by default.
Type: null or (list of string)
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.lookupMX
Whether relay specified is just domain whose MX must be used.
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.mapFiles
Maps to be compiled and placed into /var/lib/postfix/conf.
Type: attribute set of path
Default
{ }
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.masterConfig
An attribute set of service options, which correspond to the service
definitions usually done within the Postfix
{file}master.cf
file.
Type: attribute set of (submodule)
Default
{ }
Example
{submission = {args = ["-o""smtpd_tls_security_level=encrypt"];type = "inet";};}
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.masterConfig.<name>.args
Arguments to pass to the {option}command
. There is no shell
processing involved and shell syntax is passed verbatim to the
process.
Type: list of string
Default
[ ]
Example
["-o""smtp_helo_timeout=5"]
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.masterConfig.<name>.chroot
Whether the service is chrooted to have only access to the
{option}services.postfix.queueDir
and the closure of
store paths specified by the {option}program
option.
Type: boolean
Example
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.masterConfig.<name>.command
A program name specifying a Postfix service/daemon process.
By default it's the attribute {option}name
.
Type: string
Default
"‹name›"
Example
"smtpd"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.masterConfig.<name>.maxproc
The maximum number of processes to spawn for this service. If the
value is 0
it doesn't have any limit. If
null
is given it uses the postfix default of
100
.
Type: signed integer
Example
1
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.masterConfig.<name>.name
The name of the service to run. Defaults to the attribute set key.
Type: string
Default
"‹name›"
Example
"smtp"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.masterConfig.<name>.private
Whether the service's sockets and storage directory is restricted to
be only available via the mail system. If null
is
given it uses the postfix default true
.
Type: boolean
Example
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.masterConfig.<name>.privileged
Type: boolean
Example
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.masterConfig.<name>.type
The type of the service
Type: one of "inet", "unix", "unix-dgram", "fifo", "pass"
Default
"unix"
Example
"inet"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.masterConfig.<name>.wakeup
Automatically wake up the service after the specified number of
seconds. If 0
is given, never wake the service
up.
Type: signed integer
Example
60
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.masterConfig.<name>.wakeupUnusedComponent
If set to false
the component will only be woken
up if it is used. This is equivalent to postfix' notion of adding a
question mark behind the wakeup time in
{file}master.cf
Type: boolean
Example
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.networks
Net masks for trusted - allowed to relay mail to third parties - hosts. Leave empty to use mynetworks_style configuration or use default (localhost-only).
Type: null or (list of string)
Default
null
Example
["192.168.0.1/24"]
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.networksStyle
Name of standard way of trusted network specification to use, leave blank if you specify it explicitly or if you want to use default (localhost-only).
Type: string
Default
""
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.origin
Origin to use in outgoing e-mail. Leave blank to use hostname.
Type: string
Default
""
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.postmasterAlias
Who should receive postmaster e-mail. Multiple values can be added by separating values with comma.
Type: string
Default
"root"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.recipientDelimiter
Delimiter for address extension: so mail to user+test can be handled by ~user/.forward+test
Type: string
Default
""
Example
"+"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.relayDomains
List of domains we agree to relay to. Default is empty.
Type: null or (list of string)
Default
null
Example
["localdomain"]
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.relayHost
Mail relay for outbound mail.
Type: string
Default
""
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.relayPort
SMTP port for relay mail relay.
Type: signed integer
Default
25
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.rootAlias
Who should receive root e-mail. Blank for no redirection. Multiple values can be added by separating values with comma.
Type: string
Default
""
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.setSendmail
Whether to set the system sendmail to postfix's.
Type: boolean
Default
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.setgidGroup
How to call postfix setgid group (for postdrop). Should be uniquely used group.
Type: string
Default
"postdrop"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.sslCert
SSL certificate to use.
Type: string
Default
""
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.sslKey
SSL key to use.
Type: string
Default
""
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.submissionOptions
Options for the submission config in master.cf
Type: attribute set of string
Default
{milter_macro_daemon_name = "ORIGINATING";smtpd_client_restrictions = "permit_sasl_authenticated,reject";smtpd_sasl_auth_enable = "yes";smtpd_tls_security_level = "encrypt";}
Example
{milter_macro_daemon_name = "ORIGINATING";smtpd_client_restrictions = "permit_sasl_authenticated,reject";smtpd_sasl_auth_enable = "yes";smtpd_sasl_type = "dovecot";smtpd_tls_security_level = "encrypt";}
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.submissionsOptions
Options for the submission config via smtps in master.cf.
smtpd_tls_security_level will be set to encrypt, if it is missing or has one of the values "may" or "none".
smtpd_tls_wrappermode with value "yes" will be added automatically.
Type: attribute set of string
Default
{milter_macro_daemon_name = "ORIGINATING";smtpd_client_restrictions = "permit_sasl_authenticated,reject";smtpd_sasl_auth_enable = "yes";}
Example
{milter_macro_daemon_name = "ORIGINATING";smtpd_client_restrictions = "permit_sasl_authenticated,reject";smtpd_sasl_auth_enable = "yes";smtpd_sasl_type = "dovecot";}
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.tlsTrustedAuthorities
File containing trusted certification authorities (CA) to verify certificates of mailservers contacted for mail delivery. This basically sets smtp_tls_CAfile and enables opportunistic tls. Defaults to NixOS trusted certification authorities.
Type: string
Default
"${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.transport
Entries for the transport map, cf. man-page transport(8).
Type: strings concatenated with "\n"
Default
""
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.useSrs
Whether to enable sender rewriting scheme
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.user
What to call the Postfix user (must be used only for postfix).
Type: string
Default
"postfix"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.virtual
Entries for the virtual alias map, cf. man-page virtual(5).
Type: strings concatenated with "\n"
Default
""
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix
services.postfix.virtualMapType
What type of virtual alias map file to use. Use "regexp"
for regular expressions.
Type: one of "hash", "regexp", "pcre"
Default
"hash"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/mail/postfix.nix