Use services.postfix.virtual option

SNM used to define virtual_alias_maps in extraConfig which collides with
the same parameter defined by the standard services.postfix.virtual
option. This led to *lots* of warnings during postfix startup like

```
May 02 18:29:58 nun postfix/master[24758]: warning: /etc/postfix/main.cf, line 47: overriding earlier entry: virtual_alias_maps=hash:/etc/postfix/virtual
```

Refraining from overriding virtual_alias_maps has the additional
advantage that virtual aliases defined by other modules dont' stop
working with SNM.
This commit is contained in:
Christian Kauhaus 2019-05-03 11:25:23 +00:00 committed by Robin Raymond
parent 184975be76
commit bce95d0229
1 changed files with 2 additions and 1 deletions

View File

@ -127,6 +127,8 @@ in
sslCert = certificatePath; sslCert = certificatePath;
sslKey = keyPath; sslKey = keyPath;
enableSubmission = true; enableSubmission = true;
virtual =
(lib.concatStringsSep "\n" (all_valiases_postfix ++ catchAllPostfix));
extraConfig = extraConfig =
'' ''
@ -143,7 +145,6 @@ in
virtual_mailbox_base = ${mailDirectory} virtual_mailbox_base = ${mailDirectory}
virtual_mailbox_domains = ${vhosts_file} virtual_mailbox_domains = ${vhosts_file}
virtual_mailbox_maps = ${mappedFile "valias"} virtual_mailbox_maps = ${mappedFile "valias"}
virtual_alias_maps = ${mappedFile "valias"}
virtual_transport = lmtp:unix:/run/dovecot2/dovecot-lmtp virtual_transport = lmtp:unix:/run/dovecot2/dovecot-lmtp
# sasl with dovecot # sasl with dovecot