diff options
-rw-r--r-- | machines/mailserver.nix | 7 | ||||
-rw-r--r-- | modules/module-list.nix | 1 | ||||
-rw-r--r-- | modules/services/postfix/default.nix | 1 | ||||
-rw-r--r-- | modules/services/postfix/restrictions.nix (renamed from modules/postfix/restrictions.nix) | 4 |
4 files changed, 6 insertions, 7 deletions
diff --git a/machines/mailserver.nix b/machines/mailserver.nix index 86f6edac..7d4bd397 100644 --- a/machines/mailserver.nix +++ b/machines/mailserver.nix @@ -35,10 +35,7 @@ ''}"; in { - imports = [ - ../common.nix - ../modules/postfix/restrictions.nix # XXX: Refactor and remove! - ]; + imports = [ ../common.nix ]; services.spamassassin.enable = true; @@ -49,7 +46,7 @@ in { fileSystems."/".label = "root"; boot.loader.grub.device = "nodev"; - openlab.postfix.restrictions = { + labernix.postfix.restrictions = { sender = [ "reject_authenticated_sender_login_mismatch" "reject_unknown_sender_domain" diff --git a/modules/module-list.nix b/modules/module-list.nix index 864019b1..5137c672 100644 --- a/modules/module-list.nix +++ b/modules/module-list.nix @@ -1,3 +1,4 @@ [ ./config/labernix-pkgs.nix + ./services/postfix ] diff --git a/modules/services/postfix/default.nix b/modules/services/postfix/default.nix new file mode 100644 index 00000000..4103a41b --- /dev/null +++ b/modules/services/postfix/default.nix @@ -0,0 +1 @@ +import ./restrictions.nix # TODO: Dummy for now, implement me! diff --git a/modules/postfix/restrictions.nix b/modules/services/postfix/restrictions.nix index 8f2412ca..fbb47f10 100644 --- a/modules/postfix/restrictions.nix +++ b/modules/services/postfix/restrictions.nix @@ -14,7 +14,7 @@ let ''; }; config = let - cfg = config.openlab.postfix.restrictions.${name}; + cfg = config.labernix.postfix.restrictions.${name}; in mkIf (cfg != null) '' smtpd_${name}_restrictions = ${concatStringsSep ", " cfg} ''; @@ -49,5 +49,5 @@ let ''; }; in { - options.openlab.postfix.restrictions = mapAttrs mkRestriction restrictions; + options.labernix.postfix.restrictions = mapAttrs mkRestriction restrictions; } |