1 import ./make-test-python.nix {
4 nodes.machine = { pkgs, ... }: {
5 imports = [ common/user-account.nix ];
8 enableSubmissions = true;
10 smtpd_tls_security_level = "none";
14 environment.systemPackages = let
15 checkConfig = pkgs.writeScriptBin "check-config" ''
16 #!${pkgs.python3.interpreter}
22 with open("/etc/postfix/master.cf") as masterCf:
24 if state == 1 and line.startswith("submissions"):
26 elif state == 2 and line.startswith(" ") and "smtpd_tls_security_level=encrypt" in line:
28 elif state == 2 and not line.startswith(" "):
38 machine.wait_for_unit("postfix.service")
39 machine.succeed("check-config")