diff options
author | stuebinm | 2022-04-04 17:21:50 +0200 |
---|---|---|
committer | stuebinm | 2022-04-04 19:56:46 +0200 |
commit | afcaf310b923d55e41d6120d1ccaade136e66691 (patch) | |
tree | 2c82d30c807b5b09f9527550ef490cc6de8db0be /flora | |
parent | a68b67e186fa189f592476d287540445568d1822 (diff) |
flora: add a simple mailserver setup
mostly to get a working sendmail and also play around with stuff
Diffstat (limited to 'flora')
-rw-r--r-- | flora/configuration.nix | 1 | ||||
-rw-r--r-- | flora/services/mail.nix | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/flora/configuration.nix b/flora/configuration.nix index ada156e..fde327b 100644 --- a/flora/configuration.nix +++ b/flora/configuration.nix @@ -13,6 +13,7 @@ ./services/dockerhub.nix ./services/blog.nix ./services/znc.nix + ./services/mail.nix ]; # Use the GRUB 2 boot loader. 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; + }; +} |