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 = {
|
||||
enable = true;
|
||||
recipientDelimiter= "+";
|
||||
extraMasterConf = ''
|
||||
mlmmj unix - n n - - pipe flags=ORhu user=mlmmj argv=${pkgs.mlmmj}/bin/mlmmj-receive -F -L ${spoolDir}/$nexthop
|
||||
'';
|
||||
masterConfig.mlmmj = {
|
||||
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;
|
||||
|
||||
extraConfig = ''
|
||||
transport_maps = hash:${stateDir}/transports
|
||||
virtual_alias_maps = hash:${stateDir}/virtuals
|
||||
propagate_unmatched_extensions = virtual
|
||||
'';
|
||||
extraConfig = "propagate_unmatched_extensions = virtual";
|
||||
|
||||
virtual = concatMapLines (virtual cfg.listDomain) cfg.mailLists;
|
||||
transport = concatMapLines (transport cfg.listDomain) cfg.mailLists;
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.mlmmj ];
|
||||
|
@ -136,10 +148,8 @@ in
|
|||
${pkgs.coreutils}/bin/mkdir -p ${stateDir} ${spoolDir}/${cfg.listDomain}
|
||||
${pkgs.coreutils}/bin/chown -R ${cfg.user}:${cfg.group} ${spoolDir}
|
||||
${concatMapLines (createList cfg.listDomain) cfg.mailLists}
|
||||
echo "${concatMapLines (virtual cfg.listDomain) cfg.mailLists}" > ${stateDir}/virtuals
|
||||
echo "${concatMapLines (transport cfg.listDomain) cfg.mailLists}" > ${stateDir}/transports
|
||||
${pkgs.postfix}/bin/postmap ${stateDir}/virtuals
|
||||
${pkgs.postfix}/bin/postmap ${stateDir}/transports
|
||||
${pkgs.postfix}/bin/postmap /etc/postfix/virtual
|
||||
${pkgs.postfix}/bin/postmap /etc/postfix/transport
|
||||
'';
|
||||
|
||||
systemd.services.mlmmj-maintd = {
|
||||
|
|
Loading…
Reference in a new issue