Stalwart: Difference between revisions

Onny (talk | contribs)
Tips and tricks: Auto update TLSA
Onny (talk | contribs)
Tips and tricks: Auto update TLSA
Line 254: Line 254:
Following script is a possible workaounrd. It extracts the ACME cert every five minute, calculates the TLSA hash and compares it with the upstream record. If it doesn't match, it uses [https://github.com/Stenstromen/gotlsaflare gotlsaflare] to update the TLSA record on Cloudflare.
Following script is a possible workaounrd. It extracts the ACME cert every five minute, calculates the TLSA hash and compares it with the upstream record. If it doesn't match, it uses [https://github.com/Stenstromen/gotlsaflare gotlsaflare] to update the TLSA record on Cloudflare.


{{file|/etc/nixos/configuration.nix|nix|3=
<syntaxhighlight lang="nixos">
systemd.services.tlsa-cloudflare-update = {
systemd.services.tlsa-cloudflare-update = {
   description = "Check and update TLSA/DANE record for mx1 from Stalwart ACME Cert";
   description = "Check and update TLSA/DANE record for mx1 from Stalwart ACME Cert";
Line 339: Line 339:
   };
   };
};
};
}}
</syntaxhighlight>