nixpkgs/nixos/modules/services/mail
George Shammas 142d83f90e
nixos/postfix: postalias should not use source file permissions
Our postfix-setup service ensures that the directory is only writable by root.

postalias by default drops permissions to the user of the source file. In the
case of NixOS that file is in the nix store and thus always owned by root and
everything works.

The problem is that when using a nixos-container with user namespaces (`-U`)
then the nix store is owned by nobody/nogroup, and postfix-setup.service will be
unable to create or modify `aliases.db`.

Since the file would otherwise be owned by root, we should tell postfix to not
assume the user and permissions of the `aliases` file by setting -o and -p

From postalias(1)

> -o Do not release root privileges when processing a non-root input file. By
> default, postalias(1) drops root privileges and runs as the source file owner
> instead.

> -p Do not inherit the file access permissions from the input file when
> creating a new file. Instead, create a new file with default access
> permissions (mode 0644).
2023-09-16 08:22:45 -04:00
..
clamsmtp.nix
davmail.nix davmail: enable sandboxing options 2023-06-17 11:32:42 +02:00
dkimproxy-out.nix nixos/*: convert more partially-md option descriptions 2022-08-31 16:32:14 +02:00
dovecot.nix nixos/*: remove trailing period in mkEnableOptions 2023-02-08 15:23:34 +01:00
dspam.nix
exim.nix nixos/exim: apply privilege restrictions 2023-06-05 20:04:48 +02:00
goeland.nix Apply suggestion 2023-01-20 14:39:35 +01:00
listmonk.nix nixos/listmonk: fixing datatype of options 2023-09-09 15:21:32 +02:00
maddy.nix treewide: stop using types.string 2023-08-08 21:31:21 +08:00
mail.nix nixos/*: convert internal option descriptions to MD 2022-08-31 16:32:54 +02:00
mailcatcher.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
mailhog.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
mailman.md nixos/mailman: convert manual chapter to MD 2023-01-10 10:31:56 +01:00
mailman.nix nixos/mailman: set RemainAfterExit for settings 2023-05-19 12:03:41 +02:00
mlmmj.nix nixos/*: automatically convert option docs 2022-08-06 20:39:12 +02:00
nullmailer.nix nixos/nullmailer: allow users in the nullmailer group to send mails 2023-07-13 17:02:19 +02:00
offlineimap.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
opendkim.nix
opensmtpd.nix
pfix-srsd.nix nixos/*: convert straggler options to MD 2022-08-31 17:27:38 +02:00
postfix.nix nixos/postfix: postalias should not use source file permissions 2023-09-16 08:22:45 -04:00
postfixadmin.nix nixos/*: automatically convert option docs to MD 2022-08-03 22:46:41 +02:00
postgrey.nix nixos/*: md-convert hidden plaintext options 2022-08-31 16:32:54 +02:00
postsrsd.nix
public-inbox.nix nixos/public-inbox: set ProtectHome=tmpfs 2023-06-20 17:19:09 +00:00
roundcube.nix nixos: fix typos 2023-05-19 22:31:04 -04:00
rspamd.nix treewide: use use lib.optionalAttrs instead of 'then {}' 2023-06-06 22:54:31 +02:00
rss2email.nix nixos/rss2email: remove unnecessary cfg file indirection to fix test (#200108) 2022-11-10 20:06:32 +01:00
schleuder.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
spamassassin.nix nixos/spamassassin: add DMARC module to default config 2023-06-25 17:35:16 +00:00
stalwart-mail.nix nixos/stalwart-mail: fixed broken link 2023-09-08 23:59:03 +02:00
sympa.nix nixos/*: automatically convert option descriptions 2022-08-31 16:32:53 +02:00
zeyple.nix nixos/zeyple: init 2023-03-21 00:14:03 +02:00