Understanding Email Authentication (SPF, DKIM, DMARC)
Understanding Email Authentication (SPF, DKIM, DMARC)
Understanding Email Authentication (SPF, DKIM, DMARC)
When you add a custom domain to AgentMail, we ask you to add several records to your DNS settings. We understand that this can seem daunting, and we want to be completely transparent about what these records are and why they are necessary.
In short, by adding these records, you are giving AgentMail permission to do two things:
This process is standard practice for any third-party email service, and it does not give us control over your website or any other part of your domain. Let’s break down what each piece does.
To prevent spam and phishing, the modern email ecosystem relies on three core technologies: SPF, DKIM, and DMARC. Our goal is to handle all the complexity of these protocols for you.
Your DNS records are simply the way you tell the world that you’ve authorized us to do so.
TXT record to your DNS that lists the approved IP addresses or domains. When an email server receives a message from you@your-domain.com, it checks the SPF record for your-domain.com. If the server that sent the email is on that list, the check passes. This is what a record we give you might look likemail.domain.com subdomain. The -all part suggests that any server not on this list should be considered unauthorized.These are a couple of records we might ask you to add.
CNAME records. These records act as aliases, pointing a specific address on your domain to one managed by us. This allows us to manage the security of your signing keys automatically without you ever needing to change them.TXT record that specifies your policy. You can tell servers to reject the message, quarantine it (mark as spam), or do nothing. It also allows you to get reports on which emails are passing and failing these checks.We typically tell servers to reject the message as this increases deliverability(as you can see, this is something we’ve done our research on!)
reject any email that fails authentication. The rua tag specifies that aggregate reports about these failures should be sent to dmarc@agentmail.to, allowing us to monitor your domain’s health and deliverability on your behalf.Finally, to receive emails for your agents, you need to tell the internet where to deliver them. This is the job of the MX (Mail Exchange) records.
your-agent@your-domain.com, their mail server looks up the MX record for your-domain.com to find out where to send it.This is some records that we might give you:
feedback-smtp record is specifically for routing automated feedback, like bounce and complaint notifications from other mail servers, which is crucial for maintaining a healthy sender reputation.We hope this provides a clear and transparent look into why these DNS records are required. By setting them up, you enable AgentMail to provide a secure and reliable email experience for your AI agents.