Commit Graph

997 Commits

Author SHA1 Message Date
Martin Weinelt 6ff4a50f02 Add support for DKIM key management
After bumping the generation of new DKIM keys to RSA 2048 in NixOS 25.11
key rotation for existing users could not be done safely.

To resolve this situation we now support multiple generations of
selectors per domain to enable proper DKIM key transitions as described
in RFC6376 3.1. The added documentation introduces and motivates DKIM
and guides the user through a DKIM key rotation.

Additionally, DKIM key material can now also be treated as a managed
secrets when autogenerated state on the mail server host is undesirable.

This change is fully backwards compatible in behavior and will continue
to use the previously generated DKIM key without any additional
configuration up until the point when DKIM selectors are configured
explicitly.
2026-03-11 22:37:49 +01:00
Martin Weinelt ea775773d9 docs: fail build on warnings 2026-03-11 17:01:39 +01:00
Martin Weinelt 489fbc4e0e Merge branch 'setup-guide-next' into 'master'
docs/setup-{guide,example}: refresh the whole guide

See merge request simple-nixos-mailserver/nixos-mailserver!488
2026-03-11 02:04:26 +00:00
Martin Weinelt 4089d73b51 docs/setup-{guide,example}: refresh the whole guide
- add many motivation, helpful comments and important details
- improve formatting through use of more native sphinx/rst elements, like
  the csv-table for DNS records
- clarify the basic requirements
- use dig for uncached DNS propagation checks against an authoritative
  nameserver
- explain the basic feature set of the setup example
- adjust DNS TTLs; 1h is a common duration in modern setups and does not
  hurt caching much
- remove mention of the announce mailinglist, users can just expect
  releases to be ready around branch-off
2026-03-11 02:58:55 +01:00
Martin Weinelt 88889601b9 Merge branch 'docs-update' into 'master'
docs: update how-to guides, split off integrations

See merge request simple-nixos-mailserver/nixos-mailserver!490
2026-03-11 00:54:08 +00:00
Martin Weinelt 1c57aab586 treewide: fix typos and other minor issues 2026-03-11 01:50:14 +01:00
Martin Weinelt d04d1a565b docs: reorganize how-to section, create integrations section
Radicale and Roundcube don't fit so well with the other how to's in
that they configure additional external services instead of directly
modifying the NixOS mailserver setup.

We also sort the How-To section alphabetically. his unclutters the nav
somewhat
2026-03-11 01:50:14 +01:00
Martin Weinelt 5e43dafc96 docs: update Flakes example
and add a small example how to deploy with nixos-rebuild.
2026-03-11 01:50:13 +01:00
Martin Weinelt b83621011f docs: update autodiscovery guide 2026-03-11 01:50:13 +01:00
Martin Weinelt 8d996b109d docs: update Roundcube guide
Adds a short explanation what roundcube even is.

Extract and extend the roundcube example showing plugin and spellchecking
support. We also inherit a plausible maximum attachment size based on
Postfix's message_size_limit. The nginx vhost forces TLS and manages
certificates using the ACME integration.
2026-03-11 01:50:13 +01:00
Martin Weinelt cff7a27cfe docs: update Radicale guide
We now explain what Radicale even is and classify reusing the hashed
passwords of login accounts as limitation because it requires using
compatible password hashes.

This is difficult because compatible password hashes need an overlap
between libxcrypt and Radicales choice of libraries: libpass, argon2 and
bcrypt.

Extract the source code into a proper .nix file so we get source linting
and formatting for free. Pruned from bad practices of the past, like
global `with lib`.
2026-03-10 02:02:53 +01:00
Martin Weinelt 1240173034 Merge branch 'fix-rspamd-doc' into 'master'
docs: fix rspamd syntax

See merge request simple-nixos-mailserver/nixos-mailserver!310
2026-03-09 21:00:17 +00:00
Martin Weinelt 77205f744e Merge branch 'flake-update' into 'master'
flake.lock: Update

See merge request simple-nixos-mailserver/nixos-mailserver!489
2026-03-09 12:36:54 +00:00
Martin Weinelt 3758b622f2 flake.lock: Update
Flake lock file updates:

• Updated input 'git-hooks':
    'github:cachix/git-hooks.nix/39f53203a8458c330f61cc0759fe243f0ac0d198' (2026-03-04)
  → 'github:cachix/git-hooks.nix/8baab586afc9c9b57645a734c820e4ac0a604af9' (2026-03-07)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/d2acf504d602c98f5ec2518dacea4f35e5a4e50f' (2026-03-05)
  → 'github:NixOS/nixpkgs/0c6c0dd2469abaa216599bb19bbf77a328af6564' (2026-03-09)
2026-03-09 13:27:02 +01:00
Martin Weinelt c292d31ee7 Merge branch 'dkim-dns-binding-no-service' into 'master'
docs: remove service type key from DKIM DNS binding

See merge request simple-nixos-mailserver/nixos-mailserver!487
2026-03-08 21:56:45 +00:00
Martin Weinelt 6cee3e2360 docs: remove service type key from DKIM DNS binding
Stop explicitly restriciting us to email services. This would require
an update for tlsrpt (s=email:tlsrpt) use but the benefit of restricting
key use like that has limited practical benefit, when there are so very\
few services defined.

Not setting the service type key defaults it to all services (s=*).
2026-03-08 22:53:11 +01:00
Martin Weinelt 80ce71e236 docs/advanced-cofnigurations: expand recommendations
Mention FTS and TLSRPT and explain what these setups are good for and
when they might be required.
2026-03-08 04:36:58 +01:00
Martin Weinelt e193287dc1 Fix inline code block in mailserver.forwards option description
It should surround the whole attribute set, not leave out the opening
bracket.

Closes: #345
2026-03-08 03:03:41 +01:00
Martin Weinelt c04152fa90 Merge branch 'flake-update' into 'master'
flake.lock: Update

See merge request simple-nixos-mailserver/nixos-mailserver!485
2026-03-06 02:11:56 +00:00
Martin Weinelt b600abd389 flake.lock: Update
Flake lock file updates:

• Updated input 'git-hooks':
    'github:cachix/git-hooks.nix/a8ca480175326551d6c4121498316261cbb5b260' (2026-02-01)
  → 'github:cachix/git-hooks.nix/39f53203a8458c330f61cc0759fe243f0ac0d198' (2026-03-04)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/fff0554c67696d76a0cdd9cfe14403fbdbf1f378' (2026-02-09)
  → 'github:NixOS/nixpkgs/d2acf504d602c98f5ec2518dacea4f35e5a4e50f' (2026-03-05)
2026-03-06 03:05:29 +01:00
Martin Weinelt 3938a7518a docs: fix typo and wording in release notes 2026-03-05 15:51:57 +01:00
Martin Weinelt e458653769 Merge branch 'docs-update' into 'master'
Update release notes

See merge request simple-nixos-mailserver/nixos-mailserver!483
2026-03-05 12:22:17 +00:00
Martin Weinelt 85967440af docs: configure ACME HTTP-01 with nginx in setup example 2026-03-05 12:52:04 +01:00
Martin Weinelt c300fdeb63 docs: mention password file option in release notes 2026-03-05 12:51:45 +01:00
Martin Weinelt 9b5e4d9753 Merge branch 'unhashed-password' into 'master'
Add support for plaintext password files

See merge request simple-nixos-mailserver/nixos-mailserver!474
2026-03-05 11:16:40 +00:00
Ryan Gibb 12ae5dd89b support unhashed password files 2026-03-05 11:06:01 +00:00
Martin Weinelt e1afec5b08 tests: wait for rspamd-milter.sock in ldap and internal tests
I've hit more races in these tests recently while running the test suite
on a much faster host system.
2026-03-04 16:02:47 +01:00
Martin Weinelt ff91d3cf68 pre-commit: fix nixfmt-rfc-style name deprecation
> warning: nixfmt-rfc-style is now the same as pkgs.nixfmt which should
> be used instead.
2026-03-04 16:01:52 +01:00
Martin Weinelt 25eae48a09 tests: fix eicar test string escape
This fixes a warning issued by the Lix evaluator:

> warning: \P is an ill-defined escape. You can drop the \ and simply
> write P instead. Use --extra-deprecated-features broken-string-escape
> to silence this warning.
2026-03-04 15:53:30 +01:00
Martin Weinelt ea4dc17f4b Merge branch 'setup-guide-spf-mx' into 'master'
docs: suggest mx to refer to mailserver in spf record

See merge request simple-nixos-mailserver/nixos-mailserver!481
2026-02-26 00:13:36 +00:00
Martin Weinelt bd03afc003 Merge branch 'rspamd-duplicate-systemd' into 'master'
postfix: fix duplicate systemd dependencies on rspamd

See merge request simple-nixos-mailserver/nixos-mailserver!479
2026-02-26 00:10:48 +00:00
Martin Weinelt 034ca15318 docs: suggest mx to refer to mailserver in spf record
Much more foolproof in simple setups, because it allows all servers
mentioned in a domains MX record to also send out mail, without having to
track them here manually again.
2026-02-26 01:03:53 +01:00
Martin Weinelt 781e833633 Merge branch 'flake-update' into 'master'
flake.lock: Update

See merge request simple-nixos-mailserver/nixos-mailserver!480
2026-02-09 17:51:47 +00:00
Martin Weinelt 9a104e245d flake.lock: Update
Flake lock file updates:

• Updated input 'git-hooks':
    'github:cachix/git-hooks.nix/50b9238891e388c9fdc6a5c49e49c42533a1b5ce' (2025-11-24)
  → 'github:cachix/git-hooks.nix/a8ca480175326551d6c4121498316261cbb5b260' (2026-02-01)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/6a49303095abc094ee77dc243a9e351b642e8e75' (2025-11-28)
  → 'github:NixOS/nixpkgs/fff0554c67696d76a0cdd9cfe14403fbdbf1f378' (2026-02-09)
2026-02-09 18:39:47 +01:00
Martin Weinelt 4345460d30 flake.nix: Update flake-compat repo 2026-01-29 19:14:06 +01:00
teutat3s 9b90a9837a rspamd: fix duplicate systemd dependencies
These are also declared in mail-server/systemd.nix.
2025-12-28 20:40:33 +01:00
Martin Weinelt 7d433bf898 Merge branch 'dovecot-hybrid-curve' into 'master'
dovecot: update TLS requirements

See merge request simple-nixos-mailserver/nixos-mailserver!477
2025-12-21 12:54:46 +00:00
Martin Weinelt 3579eb0001 dovecot: restrict TLS cipher suites 2025-12-19 04:00:47 +01:00
Martin Weinelt 1415623586 dovecot: support X25519MLKEM768 hybrid kex 2025-12-19 03:13:47 +01:00
Martin Weinelt 616a57af55 Merge branch 'certmgmt-next' into 'master'
Switch to NixOS ACME module for certificate management

Closes #256 and #267

See merge request simple-nixos-mailserver/nixos-mailserver!457
2025-12-19 01:58:52 +00:00
Martin Weinelt e437760341 treewide: replace/remove dovecot2 service name
The unit name is now dovecot.service.
2025-12-19 02:52:55 +01:00
Martin Weinelt 4bbe0d7bab Fix option reference in aliasesRegExp option 2025-12-19 02:36:28 +01:00
Martin Weinelt ff9b046f0f Stop recommending bcrypt everywhere
By passing no method to mkpasswd we make it select the strongest cipher
that libxcrypt recommends.

Replaces the example hashes with yescrypt hashes, which is the current
default.
2025-12-19 02:36:28 +01:00
Martin Weinelt 33ba1ff52b Switch to NixOS ACME module for certificate management
Drop most of the existing certificate handling, because we're effectively
duplicating functionality that NixOS offers for free with better
design, testing and maintainance than what we could provide downstream.

The remaining two options are to reference an
existing `security.acme.certs` configuration through
`mailserver.x509.useACMEHost` or to provide existing key material via
`mailserver.x509.certificateFile` and `mailserver.x509.privateKeyFile`.

Support for automatic creation of self-signed certificates has been
removed, because it is undesirable in public mail setups.

The updated setup guide now displays the recommended configuration that
relies on the NixOS ACME module, but requires further customization to
select a suitable challenge.

Co-Authored-By: Emily <git@emilylange.de>
2025-12-19 02:36:28 +01:00
Martin Weinelt 18ee2a44ed docs: extract setup example into .nix file and include
That way we get linting of the code for free.
2025-12-19 02:17:32 +01:00
Martin Weinelt e2a99f33ea docs: allow referencing module options 2025-12-15 16:02:24 +01:00
Martin Weinelt 1ccd57f177 Merge branch 'dkim-ed25519-warn' into 'master'
Warn about ED25519 DKIM usage

See merge request simple-nixos-mailserver/nixos-mailserver!473
2025-12-03 12:02:16 +00:00
Martin Weinelt 0d27ef2912 Merge branch 'master' into 'master'
docs: fix some typos in migrations guide

See merge request simple-nixos-mailserver/nixos-mailserver!472
2025-12-01 22:17:23 +00:00
Martin Weinelt 7d359e3ff5 Warn about ED25519 DKIM usage
There currently seems to be mixed support out there and we need to
support dual-signing first before we can recommend rolling out ED25519
DKIM keys.
2025-12-01 23:16:02 +01:00
yeoldegrove f67ed85b3f docs: fix some typos 2025-12-01 22:16:18 +01:00