diff options
author | V <v@unfathomable.blue> | 2021-06-09 15:43:16 +0200 |
---|---|---|
committer | V <v@unfathomable.blue> | 2021-08-17 03:09:34 +0200 |
commit | ec0965e2672899d25a5a3a8c072de3ea734076a2 (patch) | |
tree | ddf53e6cc5ae47fa1a925f7a7d6414ba03718a84 /fleet/hosts/trieste/lists.nix | |
parent | db7c54f92f386a94db8af7a12626d2657b4dd640 (diff) |
fleet: init
Co-authored-by: edef <edef@unfathomable.blue> Change-Id: I36d2c4cca542ed91630b1b832f3c7a7b97b33c65
Diffstat (limited to 'fleet/hosts/trieste/lists.nix')
-rw-r--r-- | fleet/hosts/trieste/lists.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/fleet/hosts/trieste/lists.nix b/fleet/hosts/trieste/lists.nix new file mode 100644 index 0000000..a4e9a69 --- /dev/null +++ b/fleet/hosts/trieste/lists.nix @@ -0,0 +1,58 @@ +# SPDX-FileCopyrightText: V <v@unfathomable.blue> +# SPDX-License-Identifier: OSL-3.0 + +{ lib, pkgs, ... }: + +with lib; + +{ + # Block HTML e-mail + # FIXME(V): This is global, and will affect anyone sending HTML mail to e.g. postmaster@ + # We should fix this, and limit it to just the list: this is possible using http://mlmmj.org/docs/readme-access/ + # Unfortunately this doesn't let us pick an error message, though. So maybe not. + services.postfix = { + enableHeaderChecks = true; + headerChecks = [ + { + pattern = ''/^Content-Type: text\/html/''; # This feels kind of brittle, but should work in 99% of cases. + action = "REJECT HTML e-mail is not allowed on this list. See https://useplaintext.email/ for more information."; + } + ]; + }; + + services.mlmmj = { + enablePostfix = true; + enablePublicInbox = true; + + control.customheaders = [ "X-Clacks-Overhead: GNU Terry Pratchett" ]; + + lists."lists.unfathomable.blue" = { + ripple-announce = { + description = "Progress updates and other major announcements about Ripple"; + moderators = [ + "v@unfathomable.blue" + "edef@unfathomable.blue" + ]; + # FIXME(V): This doesn't have quite the effect I was looking for. + # It submits non-moderator posts for review, rather than outright rejecting them as I'd wanted. + # Perhaps this is good, though, as it allows guest posts? + # Downside is there's no immediate rejection, so the user is left with the impression that their mail disappeared… + # Maybe http://mlmmj.org/docs/readme-access/ would be more appropriate? + control.modonlypost = true; + }; + ripple-devel.description = "Technical discourse and patches for Ripple"; + ripple-discuss.description = "General discussion about Ripple"; + # TODO(V): ripple-commits, read-only commit notifications + }; + }; + + # By default, the index 404s with the rather confusing message "no inboxes, yet", even when there are inboxes configured. + services.public-inbox.settings.publicinbox.wwwlisting = "all"; + + services.caddy.config = '' + lists.unfathomable.blue { + import common + reverse_proxy unix//run/public-inbox/httpd.sock + } + ''; +} |