canarymail

v0.1.0
io.github.CloudCorpRecords/canarymail Checked 3 days ago Published 18 days ago

Email authentication checks: DMARC, SPF and DKIM, SPF building, bounce and report analysis.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

check_domain Check a domain's email authentication

Use this when someone asks whether a domain's email authentication is set up correctly, why mail from a domain fails DMARC, SPF or DKIM, or which DNS records to publish for it. Reads the domain's live DMARC, SPF and DKIM records and returns what is wrong with each, plus the records to add or change. Pass a DKIM selector when you know it. Without one, common selectors are tried. Takes a domain name only, not a mailbox address or an IP address.

ParameterTypeDescription
domain *stringThe domain to check, such as example.com. A URL is cut down to its host.
selectorstringThe DKIM selector, the s= value in a DKIM-Signature header. Leave it out to try common ones.

build_spf Build an SPF record

Use this when someone lists the services that send their email and wants the SPF record to publish, or wants a sender added to the SPF record they already have. Takes provider names such as Google Workspace or Mailchimp, include terms such as include:spf.example.com, or IP addresses, and returns one merged record with its count of DNS lookups against the limit of ten. Pass the domain when you know it, so the result includes the senders already in its published record.

ParameterTypeDescription
senders *arrayThe platforms that send this domain's mail: provider names such as Google Workspace or Mailchimp, or include terms such as include:spf.example.com.
allstringHow the record ends. A new record ends in ~all unless you pass -all. A record the domain already publishes keeps its own ending unless you pass one.
domainstringThe domain the record is for. When given, the SPF record it publishes today is read and the senders are added to it, so nothing already in it is lost.
ip4arrayIPv4 addresses or ranges that send this domain's mail directly, such as 192.0.2.10 or 192.0.2.0/24.
ip6arrayIPv6 addresses or ranges that send this domain's mail directly, such as 2001:db8::1 or 2001:db8::/32.

explain_bounce Explain a bounce or SMTP error

Use this when someone pastes a bounce message, an SMTP reply such as 550 5.7.26, or an Authentication-Results header and asks what it means or how to fix it. Returns what the receiving server refused, what to change, when it clears, and the page that explains it. Works from the pasted text alone and reads no DNS records.

ParameterTypeDescription
text *stringThe bounce message, the SMTP reply or the Authentication-Results line, as pasted. When the bounce runs past 4,000 characters, pass the lines with the error code and the reason.

analyze_report Read a DMARC aggregate report

Use this when someone has a DMARC aggregate report and wants to know which senders passed and which failed. The report is the XML, .gz or .zip file that receivers such as Google and Yahoo email to the address in a domain's rua tag. In ChatGPT, pass the uploaded file. Elsewhere, pass the report XML as text. Returns totals per report and each sending IP address with its SPF, DKIM and DMARC results. The result gives a next step for the report's domain and a link to a live check of that domain's DNS records. Nothing from the report is stored.

ParameterTypeDescription
fileobjectThe report file the user uploaded in ChatGPT: the .xml, .xml.gz or .zip a mailbox provider emailed them.
report_xmlstringThe report XML as text, from <feedback> to </feedback>. Use this when there is no uploaded file, or when the user pasted the XML.