Do key and certificate belong together?
A certificate contains the public key. Derive it from the private key as well, and both checksums must be identical:
This comparison works for RSA, EC and Ed25519. The often quoted comparison via -modulus only works for RSA — on an EC certificate it produces an error that is easily misread as “does not match”.
With a mismatched pair Postfix logs private key in … does not match public key in …: disabling TLS support and stops offering TLS — senders then see 454 4.7.0 TLS not available.
Does the CSR belong to the key?
When several keys are lying around and it is unclear which one the request was made with — the same checksum from the CSR:
Is the chain complete?
-untrusted passes the intermediates, the root comes from the system store — exactly as for the sender verifying your server. Typical errors:
unable to get local issuer certificate— an intermediate is missing or the wrong one.certificate has expired— the certificate or a link in the chain has expired.self-signed certificate— no issuer other than itself.
For a private CA instead of the system roots: openssl verify -CAfile own-ca.pem -untrusted chain.pem cert.pem.
Name, issuer and validity
The MX hostname must appear under Subject Alternative Name — hardly any client still evaluates the CN in the subject. Why it has to be the name from the MX record and not the website's is covered in Set up the MX certificate.
Does it expire within the next 30 days? Exit code 1 means yes — which makes it easy to use in a monitoring script:
The fingerprint to compare with what the CA shows: openssl x509 -in cert.pem -noout -fingerprint -sha256.
Is the server serving the new certificate?
Forget a reload and the service keeps working with the old one. What senders actually see comes straight from the server:
If the fingerprint matches the file's, the switch is complete. The same check with every detail — chain, SAN, key, TLS version — is what the MX check does.