diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-07-02 13:05:44 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-07-02 13:06:15 +0200 |
commit | 8cc7cb6bebeb227c5f9405c05e953f15f949cfff (patch) | |
tree | c92ca8b52a523fb97d4d91862d02803a8fc73236 /modules | |
parent | 36861e9520e7d8beac401dfa222e1fd5f5bd55c5 (diff) | |
download | Nix-8cc7cb6bebeb227c5f9405c05e953f15f949cfff.tar.gz Nix-8cc7cb6bebeb227c5f9405c05e953f15f949cfff.tar.zst Nix-8cc7cb6bebeb227c5f9405c05e953f15f949cfff.zip |
Follow recommendations for mta-sts formatting
Diffstat (limited to 'modules')
-rw-r--r-- | modules/private/websites/moomin.txt | 16 | ||||
-rw-r--r-- | modules/private/websites/tools/mail/mta-sts.nix | 11 |
2 files changed, 21 insertions, 6 deletions
diff --git a/modules/private/websites/moomin.txt b/modules/private/websites/moomin.txt new file mode 100644 index 0000000..036fb1c --- /dev/null +++ b/modules/private/websites/moomin.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | ⠀⠀⠀⠀⠀⠀⠀⢠⢦⡀⠀⡰⣩⠃ | ||
2 | ⠀⠀⠀⠀⠀⠀⠀⠘⣄⠙⠍⠁⠙⠦⡀ | ||
3 | ⠀⠀⠀⠀⠀⠀⠀⠀⡎⠀⠀⡠⠄⠔⠊⠉⠒⠒⠒⢄ | ||
4 | ⠀⠀⠀⠀⠀⠀⠀⢀⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢈⠆ | ||
5 | ⠀⠀⢠⢤⠜⡆⠀⢸⠀⠰⣄⠀⠀⠀⠀⠀⠀⠀⣠⠎ | ||
6 | ⠀⠀⠱⠤⡁⠈⠑⠇⠀⠀⠀⠉⠒⠤⠤⠄⢖⠊⠀⡐⠧⣄⣀ | ||
7 | ⠀⠀⠀⠀⠘⢆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⡉⠀⣀⣨⡷ | ||
8 | ⠀⠀⠀⠀⠀⠈⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢱⠜⠁ | ||
9 | ⠀⠀⠀⠀⠀⠀⢇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣸⠱⡀ | ||
10 | ⠀⠀⠀⠀⠀⠀⠸⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠁⠀⣣ | ||
11 | ⠀⠀⠀⠀⠀⠀⠀⠑⣄⠀⠀⠀⠀⠀⠀⠀⢀⣠⣀⠴⠊⠁ | ||
12 | ⠰⢍⢒⢄⠀⠀⠀⠀⢸⢳⢆⠀⠀⠀⠰⡖⠋⠁ | ||
13 | ⠀⠳⠴⣙⢄⠀⢀⡠⣣⠃⠈⠑⢤⡄⠀⡸⠂ | ||
14 | ⠀⠀⠀⠀⠑⠋⠓⠊⠁⠀⠀⠀⠓⠒⠉ | ||
15 | Credentials: https://twitter.com/thingskatedid/status/1278274012754309120 | ||
16 | Credentials: https://gist.github.com/katef/09581d7c84eddf784508fa430f6ef47a | ||
diff --git a/modules/private/websites/tools/mail/mta-sts.nix b/modules/private/websites/tools/mail/mta-sts.nix index c5d4306..c5f71f0 100644 --- a/modules/private/websites/tools/mail/mta-sts.nix +++ b/modules/private/websites/tools/mail/mta-sts.nix | |||
@@ -18,12 +18,11 @@ let | |||
18 | (lib.attrsets.filterAttrs (n: v: v.mx.enable) config.myEnv.servers); | 18 | (lib.attrsets.filterAttrs (n: v: v.mx.enable) config.myEnv.servers); |
19 | # FIXME: increase the id number in modules/private/dns.nix when this | 19 | # FIXME: increase the id number in modules/private/dns.nix when this |
20 | # file change (date -u +'%Y%m%d%H%M%S'Z) | 20 | # file change (date -u +'%Y%m%d%H%M%S'Z) |
21 | file = domain: pkgs.writeText "mta-sts-${domain.domain}.txt" '' | 21 | file = domain: pkgs.writeText "mta-sts-${domain.domain}.txt" ( |
22 | version: STSv1 | 22 | builtins.concatStringsSep "\r\n" ([ "version: STSv1" "mode: testing" ] |
23 | mode: testing | 23 | ++ (map (v: "mx: ${v}.${domain.mail}") mxes) |
24 | ${builtins.concatStringsSep "\n" (map (v: "mx: ${v}.${domain.mail}") mxes)} | 24 | ++ [ "max_age: 604800" ] |
25 | max_age: 604800 | 25 | )); |
26 | ''; | ||
27 | root = pkgs.runCommand "mta-sts_root" {} '' | 26 | root = pkgs.runCommand "mta-sts_root" {} '' |
28 | mkdir -p $out | 27 | mkdir -p $out |
29 | ${builtins.concatStringsSep "\n" (map (d: | 28 | ${builtins.concatStringsSep "\n" (map (d: |