diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-01-17 01:15:04 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-01-17 01:15:04 +0100 |
commit | 71a2425ed95120a6de3a41bb233b1066779d4c26 (patch) | |
tree | 007f2756abab644604577352da28b1fd4c20df44 /modules/private/mail/relay.nix | |
parent | 981fa80354fd6f00f49446777c38f77bd8a65f65 (diff) | |
download | Nix-71a2425ed95120a6de3a41bb233b1066779d4c26.tar.gz Nix-71a2425ed95120a6de3a41bb233b1066779d4c26.tar.zst Nix-71a2425ed95120a6de3a41bb233b1066779d4c26.zip |
Add e-mail checks monitoring
Diffstat (limited to 'modules/private/mail/relay.nix')
-rw-r--r-- | modules/private/mail/relay.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/private/mail/relay.nix b/modules/private/mail/relay.nix index e0aa387..6ac3df8 100644 --- a/modules/private/mail/relay.nix +++ b/modules/private/mail/relay.nix | |||
@@ -126,8 +126,12 @@ | |||
126 | ) config.myEnv.mail.postfix.backup_domains | 126 | ) config.myEnv.mail.postfix.backup_domains |
127 | ); | 127 | ); |
128 | virtual_map = { | 128 | virtual_map = { |
129 | virtual = pkgs.writeText "postfix-virtual" ( | 129 | virtual = let |
130 | cfg = config.myEnv.monitoring.email_check.eldiron; | ||
131 | address = "${cfg.mail_address}@${cfg.mail_domain}"; | ||
132 | in pkgs.writeText "postfix-virtual" ( | ||
130 | builtins.concatStringsSep "\n" ( | 133 | builtins.concatStringsSep "\n" ( |
134 | ["${address} 1"] ++ | ||
131 | lib.attrsets.mapAttrsToList ( | 135 | lib.attrsets.mapAttrsToList ( |
132 | n: v: lib.optionalString v.external '' | 136 | n: v: lib.optionalString v.external '' |
133 | script_${n}@mail.immae.eu 1 | 137 | script_${n}@mail.immae.eu 1 |