From 14dc0474b0a959085a1c78031321f6d1ef3a517c Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 2 Feb 2019 15:36:48 +0100 Subject: mail autoconfig --- custom/ymir-nginx.nix | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/custom/ymir-nginx.nix b/custom/ymir-nginx.nix index 975bb344..3d2b7b4c 100644 --- a/custom/ymir-nginx.nix +++ b/custom/ymir-nginx.nix @@ -28,6 +28,53 @@ let root /srv/www/acme/$host/; } ''; + + mail-autoconfig = let + configXML = pkgs.writeTextFile { + name = "mail-autoconfig"; + destination = "/config-v1.1.xml"; + text = '' + + + + 141.li + xmpp.li + yggdrasil.li + praseodym.org + kleen.li + nights.email + Praseodym + Praseodym + + ymir.yggdrasil.li + 143 + STARTTLS + password-cleartext + %EMAILLOCALPART% + + + ymir.yggdrasil.li + 25 + STARTTLS + password-cleartext + %EMAILLOCALPART% + + + ymir.yggdrasil.li + 993 + SSL + password-cleartext + %EMAILLOCALPART% + + + + ''; + }; + in builtins.toFile "mail-autoconfig" '' + location /.well-known/autoconfig/mail { + root ${configXML}; + } + ''; in { services.logrotate = { enable = true; @@ -100,6 +147,7 @@ in { include ${favicon}; include ${acme}; + include ${mail-autoconfig}; root /srv/www/default; } -- cgit v1.2.3