From afcaf310b923d55e41d6120d1ccaade136e66691 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Mon, 4 Apr 2022 17:21:50 +0200 Subject: flora: add a simple mailserver setup mostly to get a working sendmail and also play around with stuff --- flora/services/mail.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 flora/services/mail.nix (limited to 'flora/services') diff --git a/flora/services/mail.nix b/flora/services/mail.nix new file mode 100644 index 0000000..d41f0e8 --- /dev/null +++ b/flora/services/mail.nix @@ -0,0 +1,26 @@ +{ config, lib, pkgs, inputs, ... }: + +{ + imports = [ inputs.simple-nixos-mailserver.nixosModule ]; + + + + mailserver = { + enable = true; + fqdn = "mail.stuebinm.eu"; + domains = [ "stuebinm.eu" ]; + + # A list of all login accounts. To create the password hashes, use + # nix run nixpkgs.apacheHttpd -c htpasswd -nbB "" "super secret password" | cut -d: -f2 + loginAccounts = { + "hello@stuebinm.eu" = { + hashedPasswordFile = "/var/mailstate/hello-password"; + aliases = ["postmaster@stuebinm.eu" "abuse@stuebinm.eu"]; + }; + }; + + # Use Let's Encrypt certificates. Note that this needs to set up a stripped + # down nginx and opens port 80. + certificateScheme = 3; + }; +} -- cgit v1.2.3