nixos/postfix: add services.postfix.canonical opt
This mirrors the services.postfix.transport and services.postfix.virtual options we already have.
This commit is contained in:
parent
afca74b711
commit
d45fc07bc2
@ -11,6 +11,7 @@ let
|
|||||||
|
|
||||||
haveAliases = cfg.postmasterAlias != "" || cfg.rootAlias != ""
|
haveAliases = cfg.postmasterAlias != "" || cfg.rootAlias != ""
|
||||||
|| cfg.extraAliases != "";
|
|| cfg.extraAliases != "";
|
||||||
|
haveCanonical = cfg.canonical != "";
|
||||||
haveTransport = cfg.transport != "";
|
haveTransport = cfg.transport != "";
|
||||||
haveVirtual = cfg.virtual != "";
|
haveVirtual = cfg.virtual != "";
|
||||||
haveLocalRecipients = cfg.localRecipients != null;
|
haveLocalRecipients = cfg.localRecipients != null;
|
||||||
@ -244,6 +245,7 @@ let
|
|||||||
;
|
;
|
||||||
|
|
||||||
aliasesFile = pkgs.writeText "postfix-aliases" aliases;
|
aliasesFile = pkgs.writeText "postfix-aliases" aliases;
|
||||||
|
canonicalFile = pkgs.writeText "postfix-canonical" cfg.canonical;
|
||||||
virtualFile = pkgs.writeText "postfix-virtual" cfg.virtual;
|
virtualFile = pkgs.writeText "postfix-virtual" cfg.virtual;
|
||||||
localRecipientMapFile = pkgs.writeText "postfix-local-recipient-map" (concatMapStrings (x: x + " ACCEPT\n") cfg.localRecipients);
|
localRecipientMapFile = pkgs.writeText "postfix-local-recipient-map" (concatMapStrings (x: x + " ACCEPT\n") cfg.localRecipients);
|
||||||
checkClientAccessFile = pkgs.writeText "postfix-check-client-access" cfg.dnsBlacklistOverrides;
|
checkClientAccessFile = pkgs.writeText "postfix-check-client-access" cfg.dnsBlacklistOverrides;
|
||||||
@ -529,6 +531,15 @@ in
|
|||||||
";
|
";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
canonical = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
default = "";
|
||||||
|
description = ''
|
||||||
|
Entries for the <citerefentry><refentrytitle>canonical</refentrytitle>
|
||||||
|
<manvolnum>5</manvolnum></citerefentry> table.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
virtual = mkOption {
|
virtual = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
@ -941,6 +952,9 @@ in
|
|||||||
(mkIf haveAliases {
|
(mkIf haveAliases {
|
||||||
services.postfix.aliasFiles.aliases = aliasesFile;
|
services.postfix.aliasFiles.aliases = aliasesFile;
|
||||||
})
|
})
|
||||||
|
(mkIf haveCanonical {
|
||||||
|
services.postfix.mapFiles.canonical = canonicalFile;
|
||||||
|
})
|
||||||
(mkIf haveTransport {
|
(mkIf haveTransport {
|
||||||
services.postfix.mapFiles.transport = transportFile;
|
services.postfix.mapFiles.transport = transportFile;
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user