Commit graph

718 commits

Author SHA1 Message Date
Martin Weinelt b74cbe79bb nixos/postfix-tlspol: make tlsrpt depend on tlsrpt service
Without the tlsrpt service we can just fall back to QUERY and not push
around TLSRPT results.

https://github.com/Zuplu/postfix-tlspol/blob/v1.8.20/internal/server.go#L323-L329
(cherry picked from commit 9ccec77537)
2025-10-29 15:01:01 +00:00
Wolfgang Walther 5cbdb94f3a
treewide: remove redundant parentheses
Auto-fixed by nixf-diagnose.

(cherry picked from commit 91a8fee3aa)
2025-10-05 12:59:25 +02:00
Wolfgang Walther 1c6af9ba0a
treewide: remove unused with
Auto-fixed by nixf-diagnose.

(cherry picked from commit c283f32d29)
2025-10-05 12:38:28 +02:00
Alyssa Ross 5266a6d938 nixos/public-inbox: fix inboxdir option
This wasn't consistently used — sometimes the default value was
hardcoded.

(cherry picked from commit 0fdcb36005)
2025-09-01 15:44:38 +02:00
Martin Weinelt f36fdd634d postfix-tlspol: 1.8.15 -> 1.8.16
https://github.com/Zuplu/postfix-tlspol/releases/tag/v1.8.16
(cherry picked from commit 609cad27ad)
2025-08-31 14:22:08 +00:00
Martin Weinelt a10ae85d3a nixos/tlsrpt: configure explicit http_script
Make sure we get curl into the system, since when the tlsrpt rua is an
HTTP URL we need to be able to deliver to that.

(cherry picked from commit e030814446)
2025-07-30 13:36:27 +00:00
Martin Weinelt 007eb35d91 nixos/tlsrpt: fix permissions to execute postdrop
Calling to sendmail without AF_NETLINK causes:

> sendmail: fatal: inet_addr_local[getifaddrs]: getifaddrs: Address family not supported by protocol

and without AF_INET/AF_INET6:

> sendmail: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol
> sendmail: warning: inet_protocols: disabling IPv4 name/address support: Address family not supported by protocol

Move the configurePostfix option one level up, since it now also
reconfigures the reportd systemd unit.

(cherry picked from commit b438f32b2a)
2025-07-28 14:16:59 +00:00
Martin Weinelt c3246b01ba nixos/tlsrpt: fix restart trigger
Triggering on a symlink target does not work.

(cherry picked from commit c3c5a3bfd0)
2025-07-28 14:16:59 +00:00
Martin Weinelt 6a90d84e44 nixos/tlsrpt: fix default postfix sendmail path
It is not in the PATH for the reportd, since it is a SUID wrapper.

(cherry picked from commit 1f9431801f)
2025-07-28 14:16:59 +00:00
Martin Weinelt 3856b699f3
postfix-tlspol: adopt package and module
(cherry picked from commit e6445e42fa)
2025-07-26 16:25:15 -04:00
Martin Weinelt c50fcdd313
nixos/postfix-tlspol: only preset dns resolver with useLocalResolver
This is the best indicator we have about whether to use a local resolver.

In the meantime I'm lobbying upstream to read /etc/resolv.conf.

(cherry picked from commit b201963951)
2025-07-26 16:25:15 -04:00
Wolfgang Walther aefcb0d50d
treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
Wolfgang Walther a46262ae77
treewide: run treefmt with mdcr/nixfmt 2025-07-24 14:58:15 +02:00
Martin Weinelt 8fc5cfb293 nixos/tlsrpt: fix permissions for postfix
Same as with other services giving postfix access, this needs to happen
for the postfix user. Adding supplementary group permissions to the
systemd unit does not propagate to child processes that ultimately call
the unix domain socket.

(cherry picked from commit e48d12554c)
2025-07-24 01:09:37 +00:00
Martin Weinelt 1c9bc79b61 nixos/postfix-tlspol: fix default settings and config reload
Reloading was insufficient for changing the dns resolver address, so we
make config changes a restart trigger instead.

(cherry picked from commit e57363be15)
2025-07-10 00:09:39 +00:00
Martin Weinelt 5a50dd291e
nixos/postfix-tlspol: fix config reload
Since we only pass a symlink to ExecStart we need to pass the backing
file as a reload trigger.

(cherry picked from commit 7874cc6005)
2025-06-29 00:29:45 +02:00
Martin Weinelt d12dc3121b
nixos/postfix-tlspol: migrate to static user/group
This fixes postfix' membership in the postfix-tlspol group, since
memberships in a dynamically allocated group don't seem to work out.

Additionally this fixes a typo in the systemd hardening and the test now
prints the results of systemd-analyze security.

(cherry picked from commit df0eb78b31)
2025-06-29 00:29:44 +02:00
Martin Weinelt 7d4cbd07d8
nixos/postfix-tlspol: fix postfix integration
Fixes the group membership for postfix processes in the postfix-tlspol
group.

Makes the postfix.service start up after postfix-tlspol.service, because
it depends on it for the TLS policy lookups.

(cherry picked from commit 64e7fad038)
2025-06-29 00:29:44 +02:00
Wolfgang Walther 25e4fe68b1 nixos/roundcube: fix postgresql.package regression
`config.services.postgresql.package` is now only available when the
PostgreSQL module is actually enabled. If we're not using the local
database, we'll need to fallback to the latest postgresql version, since
we don't know about the remote version.

(cherry picked from commit e780b064a8)
2025-06-22 14:43:55 +00:00
Martin Weinelt b6f372e59a
[Backport release-25.05] tlsrpt-reporter: init at 0.5.0 (#418442) 2025-06-20 15:41:23 +02:00
Martin Weinelt 335a3bd10b nixos/tlsrpt: init
(cherry picked from commit 863d3a151d)
2025-06-20 15:20:02 +02:00
Martin Weinelt 7dbf3f27ef nixos/postfix-tlspol: init
MTA-STS and DANE/TLSA resolver and TLS policy socketmap server for
Postfix.

(cherry picked from commit 7c0f92f70b)
2025-06-20 15:01:56 +02:00
Pol Dellaiera 0eef838fb4
Revert "[Backport release-25.05] nixos/postfix: add slow domain" 2025-06-04 08:16:14 +02:00
Diogo Correia 148a482687
nixos/stalwart-mail: fix incorrect config for webadmin and spam-filter
Stalwart 0.11.0 changed the `config.resource.spam-filter` and
`config.resource.webadmin` keys to be `spam-filter.resource` and
`webadmin.resource` respectively. The NixOS has been updated
accordingly, but unfortunately it has mistakenly used
`config.spam-filter.resource` and `config.webadmin.resource`, which are
incorrect and do not do anything.

This commit changes the default configuration to use the correct keys.

Note that due to infinite recursion, the `optionalAttrs` has been
replaced with `mkIf`.

Additionally, some tests were added to catch this regression in the
future.

Fixes #411351

(cherry picked from commit b7ab1fa981)
2025-06-01 17:23:27 +01:00
liberodark c3d89bc2ea nixos/postfix: add slow domain
(cherry picked from commit b9ecd30d81)
2025-05-27 21:25:09 +00:00
Oliver Schmidt 047a804449 nixos/postsrsd: expose socketPath via module option
Services utilising postsrsd need to connect to it via a Unix socket.
While the path to that socket is static as of now, the discoverability
of that path suffers from the lack of module documentation and a
scattered definition of the individual path components over at least
three lines, even when reading the module source.

By exposing the socket path as a readOnly NixOS option, that value shows
up in the options overview and can be re-used in other parts of NixOS
config.
2025-05-12 09:51:17 +02:00
Alyssa Ross afdbf499ac nixos/mailman: hyperkitty needs mailman-web-setup
qcluster won't be happy if it's started before the database migrations
have been run.

	12:25:47 [Q] ERROR Failed to pull task from broker
	Traceback (most recent call last):
	  File "/nix/store/w5ndmidmkiy02vvgl7cxx1fkzc1pichg-python3-3.12.9-env/lib/python3.12/site-packages/django/db/backends/utils.py", line 89, in _execute
	    return self.cursor.execute(sql, params)
	           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	  File "/nix/store/w5ndmidmkiy02vvgl7cxx1fkzc1pichg-python3-3.12.9-env/lib/python3.12/site-packages/django/db/backends/sqlite3/base.py", line 328, in execute
	    return super().execute(query, params)
	           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	sqlite3.OperationalError: no such table: django_q_ormq
2025-05-05 20:06:00 +02:00
Jeremy Fleischman d1e920fc37
services/postsrsd: updates for postsrsd 2
postsrsd 2 expects a config file, and has some breaking changes that
make it incompatible with some of our old options.
2025-04-28 17:37:16 +02:00
Patrick Steinhardt feddb6a2bc opensmtpd-extras: drop in favor of standalone tables
Upstream has archived the OpenSMTPD-extras repository with 82c49af (add
deprecation notice, 2024-10-22). Instead, it has created a set of
repositories, each containing one of the tables. The old tables aren't
compatible anymore with recent OpenSMTPD versions due to changed
protocols. Other extras, like the queues, don't have an alternative to
the best of my knowledge.

Furthermore, opensmtpd-extras doesn't even build anymore, furthermore
indicating that there aren't any users of this package. Remove the
"opensmtpd-extras" package and raise errors pointing to the new
standalone tables.

Add a release note.
2025-04-28 13:26:53 +02:00
Patrick Steinhardt 132c73dd29 nixos/opensmtpd: adapt to changed filter location
The location of filters for OpenSMTPD has been changed to
"libexec/smtpd". Adapt the service accordingly.
2025-04-28 13:26:53 +02:00
Felix Bühler 7b3170d6b2
nixos/maddy: add package option (#396535) 2025-04-22 23:21:17 +02:00
Nick Cao 5051c4651e
nxios/cyrus-imap: fix cyrus-imap certs options (#392716) 2025-04-07 20:01:10 -04:00
Nguyễn Gia Phong baf2d3e27f
nixos/maddy: add package option 2025-04-06 20:20:18 +09:00
Silvan Mosberger 374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00
Moraxyc 128bdeb3c5
nxios/cyrus-imap: fix cyrus-imap certs options 2025-03-24 21:57:25 +08:00
h7x4 ab0564bd10
treewide: add documentation for nixos systemd units 2025-03-12 18:00:38 +01:00
Izorkin 6f9f983368 dovecot: remove option modules 2025-03-11 10:17:21 +03:00
Izorkin a6a9bb9725 dovecot: remove hard coding path to module dir 2025-03-06 19:47:04 +03:00
shelvacu 1a4575f9db
nixos/modules: Add security.pki.caBundle option and make all services use it for CA bundles (#352244)
Previously some modules used `config.environment.etc."ssl/certs/ca-certificates.crt".source`, some used `"/etc/ssl/certs/ca-certificates.crt"`, and some used `"${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"`. These were all bad in one way or another:

- `config.environment.etc."ssl/certs/ca-certificates.crt".source` relies on `source` being set; if `text` is set instead this breaks, introducing a weird undocumented requirement
- `"/etc/ssl/certs/ca-certificates.crt"` is probably okay but very un-nix. It's a magic string, and the path doesn't change when the file changes (and so you can't trigger service reloads, for example, when the contents change in a new system activation)
- `"${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"` silently doesn't include the options from `security.pki`

Co-authored-by: Shelvacu <git@shelvacu.com>
2025-03-08 08:41:08 +00:00
Kamillaova a1226737a4
nixos/postfixadmin: use config.services.postgresql.settings.port instead of old ...postgresql.port 2025-03-01 15:09:35 +03:00
Kamillaova bab7f1e99e
nixos/postfixadmin: add set -o pipefail for postfixadmin-postgres script 2025-03-01 15:09:34 +03:00
Kamillaova 2de264f209
nixos/postfixadmin: refactor 2025-03-01 15:09:13 +03:00
Kamillaova c0c3fa6a78
nixos/postfixadmin: format with nixfmt-rfc-style 2025-03-01 15:08:14 +03:00
Maximilian Bosch 303bd80713
Merge: nixos/nginx: add locations."name".uwsgiPass option and use it (#346776) 2025-03-01 12:34:20 +01:00
Ilan Joselevich ddef0335cb
nixos/stalwart-mail: support adding secrets (#380588) 2025-02-23 16:00:01 +07:00
Martin Milata 8fa9a9bf44 sympa: remove mmilata from maintainers 2025-02-12 18:37:16 +01:00
Jonas Heinrich f6f3d482cb nixos/stalwart-mail: support adding secrets 2025-02-10 11:50:32 +01:00
Alexander Sieg c9f9155575
nixos/stalwart-mail: add spam-filter.resource setting 2025-02-06 10:20:22 +01:00
Peder Bergebakken Sundt 953f72e76e nixos/*: tag manpage references 2025-01-27 02:47:01 +01:00
Julien Moutinho 69b606d103 nixos/public-inbox: enable confinement 2025-01-26 15:06:05 +01:00