Commit graph

13 commits

Author SHA1 Message Date
Martin Weinelt 6403717045
Reapply "nixos/dovecot: improve and harden systemd unit"
This reverts commit a794031c59.

With the following additions:

Allow `CAP_KILL`, so the dovecot master process may interrupt its child
processes.

Allow new privileges, so dovecot and call the setuid sendmail executable.

Allow AF_NETLINK sockets, so dovecot sieve handling can use the
getifaddrs syscall.

Finally, we now asssert, that no options are set on the legacy dovecot2
systemd unit name, to make the user aware they need to update their
overrides.
2025-07-06 14:39:40 +02:00
Martin Weinelt a794031c59
Revert "nixos/dovecot: improve and harden systemd unit" 2025-07-06 02:13:07 +02:00
Sizhe Zhao a72c8b8f69
nixosTests.dovecot: handleTest -> runTest 2025-07-04 20:59:41 +08:00
Martin Weinelt 1f92c7c42a
nixos/dovecot: improve and harden systemd unit
Remove the major version from the unit name and add an alias for the old
dovecot2 name.

Then restricts what the dovecot service can do, which is very interesting
given that the unit runs as root and spawns less-privileged processes
from there.
2025-07-02 04:45:22 +02:00
Sizhe Zhao e304a8352a
nixosTests.dovecot: fix eval 2025-06-07 21:16:24 +08:00
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Robert Hensing aa0f27abb0 treewide: machine -> nodes.machine 2022-03-28 14:11:58 +02:00
ajs124 90f6033984 nixos/tests/dovecot: set mailUser and mailGroup 2021-04-16 00:43:11 +02:00
Andreas Rammhold 653f805f09 nixos/tests/dovecot: enable dovecot_pigeonhole plugin
This plugin is used commonly enough that we should ensure it still
builds (and dovecot works) after loading it.

This is not yet perfect as we aren't testing any of it's functionality
but at least we ensure that dovecot continues to do the regular job.
2021-01-04 18:17:26 +01:00
Jörg Thalheim cf3328e7e3
treewide: use runtimeShell in nixos/
This is needed for cross-compilation.
2020-04-07 07:26:47 +01:00
Franz Pletz b118137d43
nixosTests.dovecot: port test to python 2019-11-24 01:36:49 +01:00
Léo Gaspard 4fddb8b9c3
dovecot module: test dovecot's LDA
That's apparently not enough to catch the bug I ran into with the update
to 2.3.1, but at least it will check the LDA appears to work.
2018-04-12 01:35:14 +02:00
aszlig 3ba2095a42
nixos/dovecot: Fix createMailUser implementation
This option got introduced in 7904499542
and it didn't check whether mailUser and mailGroup are null, which they
are by default.

Now we're only creating the user if createMailUser is set in conjunction
with mailUser and the group if mailGroup is set as well.

I've added a NixOS VM test so that we can verify whether dovecot works
without any additional options set, so it serves as a regression test
for issue #29466 and other issues that might come up with future changes
to the Dovecot service.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Fixes: #29466
Cc: @qknight, @abbradar, @ixmatus, @siddharthist
2017-09-17 04:57:20 +02:00