nixos/mlmmj: use appropriate postfix options
instead of extra* should make the module more interoperable with others
This commit is contained in:
parent
7596e7a495
commit
d56f72178e
1 changed files with 22 additions and 12 deletions
|
@ -117,17 +117,29 @@ in
|
||||||
services.postfix = {
|
services.postfix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
recipientDelimiter= "+";
|
recipientDelimiter= "+";
|
||||||
extraMasterConf = ''
|
masterConfig.mlmmj = {
|
||||||
mlmmj unix - n n - - pipe flags=ORhu user=mlmmj argv=${pkgs.mlmmj}/bin/mlmmj-receive -F -L ${spoolDir}/$nexthop
|
type = "unix";
|
||||||
'';
|
private = true;
|
||||||
|
privileged = true;
|
||||||
|
chroot = false;
|
||||||
|
wakeup = 0;
|
||||||
|
command = "pipe";
|
||||||
|
args = [
|
||||||
|
"flags=ORhu"
|
||||||
|
"user=mlmmj"
|
||||||
|
"argv=${pkgs.mlmmj}/bin/mlmmj-receive"
|
||||||
|
"-F"
|
||||||
|
"-L"
|
||||||
|
"${spoolDir}/$nexthop"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
extraAliases = concatMapLines (alias cfg.listDomain) cfg.mailLists;
|
extraAliases = concatMapLines (alias cfg.listDomain) cfg.mailLists;
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = "propagate_unmatched_extensions = virtual";
|
||||||
transport_maps = hash:${stateDir}/transports
|
|
||||||
virtual_alias_maps = hash:${stateDir}/virtuals
|
virtual = concatMapLines (virtual cfg.listDomain) cfg.mailLists;
|
||||||
propagate_unmatched_extensions = virtual
|
transport = concatMapLines (transport cfg.listDomain) cfg.mailLists;
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.mlmmj ];
|
environment.systemPackages = [ pkgs.mlmmj ];
|
||||||
|
@ -136,10 +148,8 @@ in
|
||||||
${pkgs.coreutils}/bin/mkdir -p ${stateDir} ${spoolDir}/${cfg.listDomain}
|
${pkgs.coreutils}/bin/mkdir -p ${stateDir} ${spoolDir}/${cfg.listDomain}
|
||||||
${pkgs.coreutils}/bin/chown -R ${cfg.user}:${cfg.group} ${spoolDir}
|
${pkgs.coreutils}/bin/chown -R ${cfg.user}:${cfg.group} ${spoolDir}
|
||||||
${concatMapLines (createList cfg.listDomain) cfg.mailLists}
|
${concatMapLines (createList cfg.listDomain) cfg.mailLists}
|
||||||
echo "${concatMapLines (virtual cfg.listDomain) cfg.mailLists}" > ${stateDir}/virtuals
|
${pkgs.postfix}/bin/postmap /etc/postfix/virtual
|
||||||
echo "${concatMapLines (transport cfg.listDomain) cfg.mailLists}" > ${stateDir}/transports
|
${pkgs.postfix}/bin/postmap /etc/postfix/transport
|
||||||
${pkgs.postfix}/bin/postmap ${stateDir}/virtuals
|
|
||||||
${pkgs.postfix}/bin/postmap ${stateDir}/transports
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
systemd.services.mlmmj-maintd = {
|
systemd.services.mlmmj-maintd = {
|
||||||
|
|
Loading…
Reference in a new issue