postfix-tlspol: 1.10.0 -> 1.11.0 (#538782)

This commit is contained in:
Martin Weinelt
2026-07-05 21:10:42 +00:00
committed by GitHub
3 changed files with 29 additions and 10 deletions
+15 -5
View File
@@ -164,6 +164,20 @@ in
};
users.groups.postfix-tlspol = { };
systemd.sockets.postfix-tlspol = {
wantedBy = [ "sockets.target" ];
socketConfig = {
Accept = false;
ListenStream = [
(lib.removePrefix "unix:" cfg.settings.server.address)
];
SocketUser = "postfix-tlspol";
SocketGroup = "postfix-tlspol";
SocketMode = cfg.settings.server.socket-permissions;
DirectoryMode = "0755";
};
};
systemd.services.postfix-tlspol = {
after = [
"nss-lookup.target"
@@ -173,7 +187,6 @@ in
"nss-lookup.target"
"network-online.target"
];
wantedBy = [ "multi-user.target" ];
description = "Postfix DANE/MTA-STS TLS policy socketmap service";
documentation = [ "https://github.com/Zuplu/postfix-tlspol" ];
@@ -217,9 +230,6 @@ in
RestrictAddressFamilies = [
"AF_INET"
"AF_INET6"
]
++ lib.optionals (lib.hasPrefix "unix:" cfg.settings.server.address) [
"AF_UNIX"
];
RestrictNamespaces = true;
RestrictRealtime = true;
@@ -237,7 +247,7 @@ in
RuntimeDirectory = "postfix-tlspol";
RuntimeDirectoryMode = "1750";
WorkingDirectory = "/var/cache/postfix-tlspol";
UMask = "0117";
UMask = "0077";
};
};
})
+12 -3
View File
@@ -9,7 +9,10 @@
containers.machine = {
services.postfix.enable = true;
services.postfix-tlspol.enable = true;
services.postfix-tlspol = {
enable = true;
settings.server.metrics-address = "127.0.0.1:8642";
};
services.dnsmasq = {
enable = true;
@@ -26,13 +29,19 @@
with subtest("Interact with the service"):
machine.succeed("postfix-tlspol -purge")
response = json.loads((machine.succeed("postfix-tlspol -query localhost")))
response = machine.log(machine.succeed("postfix-tlspol -query localhost"))
response = json.loads(machine.succeed("postfix-tlspol -query localhost"))
machine.log(json.dumps(response, indent=2))
assert response["dane"]["policy"] == "", f"Unexpected DANE policy for localhost: {response["dane"]["policy"]}"
assert response["mta-sts"]["policy"] == "TEMP", f"Unexpected MTA-STS policy for localhost: {response["mta-sts"]["policy"]}"
machine.log(machine.execute("systemd-analyze security postfix-tlspol.service | grep -v ")[1])
with subtest("Metrics listener"):
machine.log(machine.succeed("curl --silent --fail http://localhost:8642/metrics | grep --quiet postfix_tlspol_queries_total"))
with subtest("Hardening"):
machine.log(machine.execute("systemd-analyze security postfix-tlspol.service | grep -v ")[1])
'';
}
+2 -2
View File
@@ -7,13 +7,13 @@
buildGoModule (finalAttrs: {
pname = "postfix-tlspol";
version = "1.10.0";
version = "1.11.0";
src = fetchFromGitHub {
owner = "Zuplu";
repo = "postfix-tlspol";
tag = "v${finalAttrs.version}";
hash = "sha256-JwggXJM8FDMG4oGRcVjVw1J/toTzc/kxrjdENFT9oGs=";
hash = "sha256-mdnCa0xrexkKWHdtCeSXxwMnx9xNKAdkZlHIhqxD/P4=";
};
vendorHash = null;