From 8167fe985a9d97ec4fd9c5b1c2d559deba100642 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 5 Oct 2015 03:01:21 +0200 Subject: [PATCH] define spam-ml in krebs/3modules --- krebs/3modules/default.nix | 17 +++++++++++++++++ tv/2configs/exim-smarthost.nix | 8 -------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix index 9ec9d0a8a..6db39701a 100644 --- a/krebs/3modules/default.nix +++ b/krebs/3modules/default.nix @@ -105,6 +105,23 @@ let combined-hosts = (mapAttrsToList (name: value: value.extraZones) cfg.hosts ); in lib.mapAttrs' (name: value: nameValuePair (("zones/" + name)) ({ text=value; })) all-zones; + krebs.exim-smarthost.internet-aliases = let + format = from: to: + # TODO assert is-retiolum-mail-address to; + { inherit from; + to = if typeOf to == "list" + then concatMapStringsSep "," (getAttr "mail") to + else to.mail; }; + in mapAttrsToList format (with config.krebs.users; let + spam-ml = [ + lass + makefu + tv + ]; + in { + "spam@krebsco.de" = spam-ml; + }); + services.openssh.hostKeys = let inherit (config.krebs.build.host.ssh) privkey; in mkIf (privkey != null) (mkForce [privkey]); diff --git a/tv/2configs/exim-smarthost.nix b/tv/2configs/exim-smarthost.nix index 811c8e4c7..07acd593b 100644 --- a/tv/2configs/exim-smarthost.nix +++ b/tv/2configs/exim-smarthost.nix @@ -26,14 +26,6 @@ # TODO lists@smtp.retiolum [consul] { from = "postmaster@krebsco.de"; to = tv.mail; } - - { from = "spam@krebsco.de"; - to = pkgs.lib.concatStringsSep "," [ - tv.mail - "lass@mors.retiolum" - makefu.mail - ]; - } ]; system-aliases = [ { from = "mailer-daemon"; to = "postmaster"; }