{"id":1295,"date":"2025-01-24T23:56:39","date_gmt":"2025-01-25T04:56:39","guid":{"rendered":"https:\/\/itp.nyu.edu\/networks\/?page_id=1295"},"modified":"2025-01-24T23:56:40","modified_gmt":"2025-01-25T04:56:40","slug":"email-authentication-protocols-spf-dkim-dmarc","status":"publish","type":"page","link":"https:\/\/itp.nyu.edu\/networks\/explanations\/email-authentication-protocols-spf-dkim-dmarc\/","title":{"rendered":"Email Authentication Protocols &#8211; SPF, DKIM &amp; DMARC"},"content":{"rendered":"\n<p>Email authentication protocols work together to validate your email messages and verify their senders. These protocols help prevent email spoofing and ensure messages come from legitimate sources. Here&#8217;s how each protocol works:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Sender_Policy_Framework_SPF\"><\/span>Sender Policy Framework (SPF)&nbsp;<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>SPF validates that the sending mail server is authorized to send emails on behalf of a domain. The receiving email server checks if the sender&#8217;s IP address appears in a list of authorized IP addresses published in the domain&#8217;s DNS records.<\/p>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Valid: Company ABC sends email from their authorized mail server at IP 1.2.3.4, which is listed in their SPF record<\/li>\n\n\n\n<li>Invalid: A spammer tries to send email claiming to be from Company ABC but uses an unauthorized server at IP 5.6.7.8<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"DomainKeys_Identified_Mail_DKIM\"><\/span>DomainKeys Identified Mail (DKIM)&nbsp;<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>DKIM adds a digital signature to emails using cryptographic verification. Like a handwritten signature on a check, this mathematical signature proves the email truly came from the claimed domain and hasn&#8217;t been tampered with in transit.<\/p>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Valid: An email arrives with a DKIM signature that matches the cryptographic keys published in the sender&#8217;s DNS<\/li>\n\n\n\n<li>Invalid: An attacker tries to modify the content of a signed email, breaking the DKIM signature<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Domain-based_Message_Authentication_Reporting_and_Conformance_DMARC\"><\/span>Domain-based Message Authentication, Reporting and Conformance (DMARC)&nbsp;<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>DMARC builds upon SPF and DKIM by verifying that the domain in the &#8220;From&#8221; header (what users see) matches the domains validated by SPF and DKIM. It also tells receiving servers how to handle emails that fail these checks.<\/p>\n\n\n\n<p><strong>Why DMARC is important:<\/strong>&nbsp;While SPF verifies the sending server and DKIM verifies message integrity, neither ensures that the visible &#8220;From&#8221; address matches these authenticated domains. For example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Sender owns legitdomain.com with valid SPF and DKIM records<\/li>\n\n\n\n<li>They could send mail using legitdomain.com&#8217;s servers and DKIM signatures<\/li>\n\n\n\n<li>But set the visible &#8220;From&#8221; address to&nbsp;<a href=\"mailto:someone@trusteddomain.com\" target=\"_blank\" rel=\"noreferrer noopener\">someone@trusteddomain.com<\/a><\/li>\n\n\n\n<li>Without DMARC, this deceptive email would pass SPF and DKIM checks<\/li>\n\n\n\n<li>DMARC prevents this by requiring alignment between the visible sender and authenticated domains<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Technical_Implementation\"><\/span>Technical Implementation&nbsp;<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>All three protocols use DNS TXT records to publish their policies. From the receiving server&#8217;s perspective:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>DKIM verifies who wrote the email<\/li>\n\n\n\n<li>SPF verifies which server sent the email<\/li>\n\n\n\n<li>DMARC validates the visible sender and defines handling of authentication failures<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Flowchart\"><\/span>Flowchart&nbsp;<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/publish-01.obsidian.md\/access\/f90857fbefa5ad231dfb7167f9d3bf37\/_public\/_assets\/undnet\/eplainer_flow.png\" alt=\"Flow diagram of the relationship between SPF, DKIM and DMARC in email transmission, as explained in this article. \"\/><\/figure>\n\n\n\n<p><em>Figure 1. Flow diagram of the relationship between SPF, DKIM and DMARC in email transmission.<\/em> <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Reference\"><\/span>Reference&nbsp;<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.cloudflare.com\/learning\/email-security\/dmarc-dkim-spf\/\" target=\"_blank\" rel=\"noreferrer noopener\">What are DMARC, DKIM, and SPF? | Cloudflare<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/learn.microsoft.com\/en-us\/defender-office-365\/email-authentication-dmarc-configure\" target=\"_blank\" rel=\"noreferrer noopener\">Use DMARC to validate email, setup steps &#8211; Microsoft Defender for Office 365 | Microsoft Learn<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.techtarget.com\/searchsecurity\/answer\/Email-authentication-How-SPF-DKIM-and-DMARC-work-together\" target=\"_blank\" rel=\"noreferrer noopener\">SPF, DKIM and DMARC: What are they and how do they work together? | TechTarget<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.mimecast.com\/content\/dkim-spf-dmarc-explained\/\" target=\"_blank\" rel=\"noreferrer noopener\">SPF vs. DKIM vs. DMARC: A Guide | Mimecast<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.mantra.ms\/blog\/spf-dkim-dmarc-explanation-how-to-set-up\" target=\"_blank\" rel=\"noreferrer noopener\">SPF, DKIM and DMARC: why are they important and how can you set them up?<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Email authentication protocols work together to validate your email messages and verify their senders. These protocols help prevent email spoofing and ensure messages come from legitimate sources. Here&#8217;s how each protocol works: Sender Policy Framework (SPF)&nbsp; SPF validates that the sending mail server is authorized to send emails on behalf of a domain. The receiving &hellip; <a href=\"https:\/\/itp.nyu.edu\/networks\/explanations\/email-authentication-protocols-spf-dkim-dmarc\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Email Authentication Protocols &#8211; SPF, DKIM &amp; DMARC&#8221;<\/span><\/a><\/p>\n","protected":false},"author":62,"featured_media":0,"parent":19,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1295","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/itp.nyu.edu\/networks\/wp-json\/wp\/v2\/pages\/1295"}],"collection":[{"href":"https:\/\/itp.nyu.edu\/networks\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/itp.nyu.edu\/networks\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/itp.nyu.edu\/networks\/wp-json\/wp\/v2\/users\/62"}],"replies":[{"embeddable":true,"href":"https:\/\/itp.nyu.edu\/networks\/wp-json\/wp\/v2\/comments?post=1295"}],"version-history":[{"count":2,"href":"https:\/\/itp.nyu.edu\/networks\/wp-json\/wp\/v2\/pages\/1295\/revisions"}],"predecessor-version":[{"id":1303,"href":"https:\/\/itp.nyu.edu\/networks\/wp-json\/wp\/v2\/pages\/1295\/revisions\/1303"}],"up":[{"embeddable":true,"href":"https:\/\/itp.nyu.edu\/networks\/wp-json\/wp\/v2\/pages\/19"}],"wp:attachment":[{"href":"https:\/\/itp.nyu.edu\/networks\/wp-json\/wp\/v2\/media?parent=1295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}