בס״ד

Email Tools

An email authentication check reads the DNS records that decide whether a domain's mail is trusted: the MX records naming the servers that accept its mail, the SPF record listing authorised sending IPs, the DKIM public keys that verify message signatures, and the DMARC policy telling receivers what to do when SPF and DKIM fail.

How do I check SPF and DMARC from the command line?

$ curl https://dnsx.dev/dns/mx/gmail.com
$ curl https://dnsx.dev/spf/gmail.com
$ curl https://dnsx.dev/dmarc/gmail.com

What does an email authentication check tell you?

An email authentication check answers two questions about a domain: can other people send mail that appears to come from it, and will mail that genuinely comes from it be delivered. SPF, DKIM and DMARC are the three records that decide both. Without them, the visible From address of an email is simply a text field an attacker can set to anything.

A domain is properly protected when SPF lists every legitimate sending source and ends in -all or ~all, DKIM signs outbound mail with a key published in DNS, and DMARC is set to p=reject or p=quarantine with alignment enforced. Any one of the three alone is insufficient: SPF breaks on forwarding, DKIM alone does not tell receivers what to do with failures, and DMARC has nothing to enforce without at least one of the other two.

How many DNS lookups is an SPF record allowed?

Ten. RFC 7208 §4.6.4 caps SPF evaluation at ten DNS-querying mechanisms. The mechanisms that count are include, a, mx, ptr and exists, plus the redirect modifier. They count recursively: every include spends one lookup itself and then charges you for everything inside it.

The mechanisms ip4, ip6 and all require no DNS query and are free. Exceeding ten produces a permerror, and RFC 7208 requires receivers to treat a permerror as though the domain published no SPF record at all, so an over-long SPF record is worse than a short one and can be worse than none. The usual fix is SPF flattening: replacing deep include chains with the ip4 and ip6 ranges they resolve to.

A separate and often-missed limit in the same section caps void lookups (queries returning NXDOMAIN or an empty answer) at two.

What does the DMARC policy p=none, p=quarantine or p=reject mean?

The p= tag tells receiving mail servers what to do with a message that fails DMARC alignment. p=none takes no action and only generates reports. It is a monitoring mode, not protection. p=quarantine asks receivers to accept the message but treat it as suspicious, which in practice means the spam folder. p=reject asks receivers to refuse the message at SMTP time, so it is never delivered anywhere.

Only p=reject actually stops domain spoofing. The standard rollout is to publish p=none with a rua= reporting address, read the aggregate reports until every legitimate sender is aligned, then move to p=quarantine and finally p=reject. The sp= tag sets a separate policy for subdomains, and pct= applies the policy to a percentage of mail during a staged rollout.

How do I find my DKIM selector?

The DKIM selector is the label that appears before ._domainkey in the DNS name holding the public key. In google._domainkey.example.com the selector is google. There is no way to enumerate selectors from DNS, because a TXT record can only be looked up by exact name, which is why every DKIM checker asks you for one.

The reliable method is to read it off a message the domain has actually sent: open the raw headers, find the DKIM-Signature header, and take the value of its s= tag. Failing a sample message, the selector is usually predictable from the provider: google for Google Workspace, selector1 and selector2 for Microsoft 365, k1 for Mailchimp and Klaviyo, s1 and s2 for SendGrid, zmail for Zoho, and default for many self-hosted servers.

Why are my emails going to spam even though SPF and DMARC pass?

Authentication proves a message is genuinely from your domain. It says nothing about whether recipients want it, and the filters that decide the spam folder weigh reputation far more heavily than authentication. Passing SPF, DKIM and DMARC is a prerequisite for inbox placement, not a cause of it.

The common causes with authentication already correct are: a sending IP or domain listed on a DNSBL; a new domain or IP with no sending history, sent at volume; low engagement and high complaint rates from recipients; missing or broken one-click unsubscribe headers, which Google and Yahoo have required for bulk senders since February 2024; a mismatch between the From domain and the links in the body; and missing reverse DNS or forward-confirmed reverse DNS on the sending IP.

What do SPF, DKIM, DMARC and MX mean?

SPF (Sender Policy Framework)

A DNS TXT record that lists IP addresses and domains authorized to send email for your domain. Receiving servers check SPF to verify the sending server is permitted, helping prevent spoofing.

DKIM (DomainKeys Identified Mail)

DKIM adds a cryptographic signature to outgoing email. The matching public key is published in DNS at selector._domainkey, letting receivers verify the message was not altered in transit and was sent by an authorised server. Defined in RFC 6376.

DMARC Policy

A DMARC policy tells receiving servers what to do when SPF and DKIM both fail alignment: p=none reports only, p=quarantine sends to spam, p=reject blocks at SMTP time. The rua= tag sets the aggregate report address. Defined in RFC 7489.

MX Records

An MX record names a mail server that accepts email for a domain, paired with a priority number. Sending servers try the lowest number first and fall back to higher ones. An MX target must be a hostname with an A or AAAA record, never a CNAME or a literal IP address.

Email Deliverability

Email deliverability is the rate at which a domain's mail reaches the inbox rather than the spam folder or a rejection. It depends on authentication (SPF, DKIM, DMARC), sender reputation, DNSBL listings, recipient engagement and consistent sending volume. Authentication is necessary but it is not enough on its own.

SPF Lookup Limit

The SPF lookup limit is ten DNS-querying mechanisms per evaluation (RFC 7208 §4.6.4). include, a, mx, ptr, exists and redirect all count and nest recursively; ip4, ip6 and all are free. Exceeding ten returns permerror, which receivers treat as no SPF record at all.

Frequently Asked Questions

What is SPF?
SPF (Sender Policy Framework) is an email authentication protocol that allows domain owners to specify which mail servers are authorized to send email on behalf of their domain. It works by publishing a DNS TXT record that lists approved IP addresses and hostnames. When a receiving mail server gets an email, it checks the SPF record to verify the sending server is authorized. SPF helps prevent email spoofing and phishing by rejecting emails from unauthorized sources.
What is DMARC?
DMARC (Domain-based Message Authentication, Reporting & Conformance) is an email authentication protocol that builds on SPF and DKIM. It allows domain owners to publish a policy specifying how receiving servers should handle emails that fail authentication checks. DMARC policies include "none" (monitor only), "quarantine" (send to spam), and "reject" (block entirely). DMARC also provides reporting so domain owners can see who is sending email using their domain.
How do MX records work?
MX (Mail Exchange) records are DNS records that specify which mail servers accept email for a domain. Each MX record has a priority value (lower numbers = higher priority) and a hostname pointing to the mail server. When someone sends an email to your domain, the sending server queries your MX records, then attempts delivery to the highest-priority server first. If that server is unavailable, it falls back to lower-priority servers, providing redundancy for email delivery.
What does DMARC policy "reject" vs "quarantine" mean?
A DMARC policy of "reject" instructs receiving mail servers to completely block emails that fail both SPF and DKIM authentication -- these emails are never delivered. A "quarantine" policy tells receivers to accept the email but treat it as suspicious, typically placing it in the spam or junk folder. The "none" policy takes no action but still generates reports. Organizations typically start with "none" for monitoring, move to "quarantine" for testing, and finally adopt "reject" for maximum protection against spoofing.
How do I improve email deliverability?
To improve email deliverability: (1) Set up SPF records listing all authorized sending servers, (2) Configure DKIM to digitally sign outgoing emails, (3) Publish a DMARC policy starting with "none" and gradually moving to "reject", (4) Ensure your mail server IP isn't on blocklists, (5) Use proper MX records with redundant mail servers, (6) Maintain consistent sending patterns and volumes, and (7) Set up reverse DNS (PTR records) for your mail server IPs. Our email checker tool can verify your SPF, DMARC, and MX configuration.

Related Tools