Repository navigation
fix(mail): TLS SNI (Let's Encrypt) + implicit-TLS port coverage - #48
Merged
Merged
Conversation
Two field-reported issues: - TLS certs (e.g. Let's Encrypt) were mislabelled "self-signed": the probe verified against the dial address (127.0.0.1) instead of the host FQDN, so a valid cert issued for the public hostname never matched. checkPort now takes a separate serverName (the host's FQDN via os.Hostname) for SNI + verification while still dialing loopback. - Port coverage missed implicit-TLS ports: added 465 (submissions) and 995 (pop3s) so a modern implicit-TLS setup (465/993 without 587/143) is shown. - Web: a closed port now renders as a neutral chip instead of an alarming red "fail" — a closed optional port is informational, not an error. Also guards PeerCertificates[0] against an empty slice (defensive, no panic in the collector).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Field-reported issues on the mail tab (mail.kiefer-networks.de):
127.0.0.1; the cert is issued for the public FQDN, so it never matched → mislabelled untrusted. NowcheckPortverifies against the host FQDN (os.Hostname) for SNI while still dialing loopback → valid certs show trusted + real expiry.465(submissions) and995(pop3s). This server uses 25/465/993 (implicit TLS, no 587/143), so 465 was open but never probed.PeerCertificates[0]against an empty slice (no panic in the collector).Verified:
go build/GOOS=linux build/go vet/mail pkg tests,golangci-lint(linux) 0 issues, web lint+build clean.