postfix: migrate more options to services.postfix.config

I'm working on deprecating the top-level options, that configure main.cf
upstream in nixpkgs. With this change we stay ahead of the curve.

The `networks_style` option already defaults to `host` since Postfix 3.0,
so I dropped the setting.

```
$ postconf -d | grep networks_style
mynetworks_style = ${{$compatibility_level} <level {2} ? {subnet} : {host}}
````
This commit is contained in:
Martin Weinelt 2025-06-16 06:17:39 +02:00
parent 5c1b9921e6
commit c8f809fa76
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -248,8 +248,6 @@ in
services.postfix = {
enable = true;
hostname = "${cfg.sendingFqdn}";
networksStyle = "host";
mapFiles."valias" = valiases_file;
mapFiles."regex_valias" = regex_valiases_file;
mapFiles."vaccounts" = vaccounts_file;
@ -271,8 +269,8 @@ in
"${certificatePath}"
];
# Extra Config
mydestination = "";
myhostname = cfg.sendingFqdn;
mydestination = ""; # disable local mail delivery
recipient_delimiter = cfg.recipientDelimiter;
smtpd_banner = "${cfg.fqdn} ESMTP NO UCE";
disable_vrfy_command = true;