MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / DNSRecord

Function DNSRecord

internal/dkim/dkim.go:134–138  ·  view source on GitHub ↗

DNSRecord renders the TXT record the user must publish. Returns the hostname (left of the apex) and the record value. Example for selector "e2a202605" + domain "mail.acme.com": name = "e2a202605._domainkey.mail.acme.com" value = "v=DKIM1; k=rsa; p=MIIBIjANBgkq..."

(selector, domain, publicKeyDNS string)

Source from the content-addressed store, hash-verified

132// name = "e2a202605._domainkey.mail.acme.com"
133// value = "v=DKIM1; k=rsa; p=MIIBIjANBgkq..."
134func DNSRecord(selector, domain, publicKeyDNS string) (string, string) {
135 name := fmt.Sprintf("%s._domainkey.%s", selector, domain)
136 value := fmt.Sprintf("v=DKIM1; k=rsa; p=%s", publicKeyDNS)
137 return name, value
138}
139
140// ExtractPublicKeyFromTXT pulls the "p=" payload out of a TXT record's
141// raw value, trimming any whitespace mail systems sometimes inject when

Callers 2

domainViewMethod · 0.92
TestDNSRecord_FormatFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestDNSRecord_FormatFunction · 0.56