<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Francisco Magalhães</title>
    <description>The latest articles on DEV Community by Francisco Magalhães (@fmmagalhaes).</description>
    <link>https://dev.to/fmmagalhaes</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1109531%2Fe1933b68-0773-41fd-8f9c-65e5bc28a406.png</url>
      <title>DEV Community: Francisco Magalhães</title>
      <link>https://dev.to/fmmagalhaes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fmmagalhaes"/>
    <language>en</language>
    <item>
      <title>Email inception: analysing dev.to's own domain</title>
      <dc:creator>Francisco Magalhães</dc:creator>
      <pubDate>Fri, 03 Jul 2026 18:00:19 +0000</pubDate>
      <link>https://dev.to/fmmagalhaes/dmarc-inception-analysing-devtos-own-domain-npl</link>
      <guid>https://dev.to/fmmagalhaes/dmarc-inception-analysing-devtos-own-domain-npl</guid>
      <description>&lt;p&gt;Running my Gmail inbox through &lt;a href="https://www.emailtooltester.com/en/email-detective/" rel="noopener noreferrer"&gt;Email Detective&lt;/a&gt;, I noticed something was off with DEV Community: emails were &lt;strong&gt;failing authentication&lt;/strong&gt;. I immediately confirmed it by opening a DEV Community email and clicking &lt;strong&gt;Show Original&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjrtg70blpg61htw52y60.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjrtg70blpg61htw52y60.png" alt="Show Original" width="800" height="337"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The report shows &lt;strong&gt;DMARC: FAIL&lt;/strong&gt; on a message where SPF and DKIM both pass.&lt;/p&gt;

&lt;p&gt;I then triggered a "Forgot password?" email in DEV Community. Here's what Gmail showed me:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6gtki73p2y7ouehk1qsk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6gtki73p2y7ouehk1qsk.png" alt="In Gmail" width="800" height="317"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So what's going on? Let's break down what SPF, DKIM, and DMARC each actually do.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why email needs authentication
&lt;/h2&gt;

&lt;p&gt;Email works like postal mail: nothing in the protocol stops you from writing someone else's name on the envelope.&lt;/p&gt;

&lt;p&gt;As phishing and spoofing became rampant, recipient mailbox providers (Gmail, Yahoo) needed a way to tell "real mail from this domain" apart from "someone pretending to be this domain." That's where &lt;strong&gt;SPF&lt;/strong&gt;, &lt;strong&gt;DKIM&lt;/strong&gt;, and &lt;strong&gt;DMARC&lt;/strong&gt; come in.&lt;/p&gt;

&lt;p&gt;One thing they all have in common: each is published as a &lt;strong&gt;DNS record&lt;/strong&gt; on your domain. That's how a receiving server can look up your rules and verify a message.&lt;/p&gt;

&lt;h2&gt;
  
  
  SPF (who's allowed to send)
&lt;/h2&gt;

&lt;p&gt;Think of a letter arriving at your door. Before trusting it, you phone the company printed on the envelope and ask, "is this courier actually authorized to deliver for you?" SPF is that phone call.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhk7w92s86y93lsb3jryp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhk7w92s86y93lsb3jryp.png" alt="After Life" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;An SPF record is a line in your DNS that names the servers permitted to send mail for your domain. When a message arrives, the mailbox provider looks up that list and checks whether the sending server's IP is on it.&lt;/p&gt;

&lt;p&gt;But SPF doesn't check the &lt;code&gt;From:&lt;/code&gt; address you see in your inbox — that's the name written inside the letter. It checks the &lt;code&gt;Return-Path/MAIL FROM&lt;/code&gt;, the envelope return address used for bounces. In Gmail, that (sub)domain shows up as &lt;code&gt;mailed-by&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkwlvxo89oe7m9vouwi1x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkwlvxo89oe7m9vouwi1x.png" alt="Return-Path" width="799" height="563"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here's the SPF record on dev.to's subdomain:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;em4984.dev.to  TXT  "v=spf1 ip4:168.245.25.100 -all"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Only &lt;code&gt;168.245.25.100&lt;/code&gt; is allowed to send mail as &lt;code&gt;em4984.dev.to&lt;/code&gt;; &lt;code&gt;-all&lt;/code&gt; tells the receiver to treat anything else as a fail.&lt;/p&gt;

&lt;h2&gt;
  
  
  DKIM (proof it wasn't tampered with)
&lt;/h2&gt;

&lt;p&gt;Picture a wax seal on that same envelope. If it's intact and matches the sender's known seal, you know nobody rewrote the letter in transit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F64gmnu3531s8r6f245lp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F64gmnu3531s8r6f245lp.png" alt="Seal" width="800" height="521"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;DKIM attaches a cryptographic signature to each message using a private/public key pair. The sender signs with a private key; the mailbox provider fetches the matching public key from DNS and verifies it. If it checks out, the message was authorized by that domain and wasn't altered in transit.&lt;/p&gt;

&lt;p&gt;dev.to's public key lives under the &lt;code&gt;s1&lt;/code&gt; selector:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;s1._domainkey.dev.to  TXT  "k=rsa; t=s; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB...QAB"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  DMARC (tying it to the name you actually see)
&lt;/h2&gt;

&lt;p&gt;Here's the catch: neither SPF nor DKIM looks at the &lt;code&gt;From:&lt;/code&gt; address your mail client shows you. So far we've only verified the envelope, not the sender written in the letter inside it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgp761yipxo37h0eekh0r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgp761yipxo37h0eekh0r.png" alt="Letter" width="800" height="608"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;DMARC closes that gap with &lt;strong&gt;alignment&lt;/strong&gt;: it requires that a passing SPF or DKIM result matches the visible &lt;code&gt;From:&lt;/code&gt; domain. It also tells mailbox providers what to do on failure via a policy: &lt;code&gt;p=none&lt;/code&gt; (just monitor), &lt;code&gt;p=quarantine&lt;/code&gt; (spam folder), &lt;code&gt;p=reject&lt;/code&gt; (drop it).&lt;/p&gt;

&lt;p&gt;A DMARC record is a single TXT entry at &lt;code&gt;_dmarc.yourdomain.com&lt;/code&gt;. Here's dev.to's:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;_dmarc.dev.to  TXT  "v=DMARC1; p=reject; sp=reject; pct=100; rua=mailto:fb91c946140a4e15a5cb3d172f97ac81@dmarc-reports.cloudflare.net;"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;p&lt;/code&gt; = policy, &lt;code&gt;sp&lt;/code&gt; = subdomain policy. The reporting tags tell mailbox providers where to send feedback:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;rua&lt;/code&gt; = &lt;strong&gt;aggregate reports&lt;/strong&gt;: periodic XML summaries showing how many messages passed or failed DMARC, and from which sending sources. This is how you catch misconfigurations early. dev.to points theirs at a mailbox on Cloudflare.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ruf&lt;/code&gt; = &lt;strong&gt;forensic reports&lt;/strong&gt;: per-message failure details. Rarely used — most domains don't request them, and most providers won't send them due to privacy concerns.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  So what's missing?
&lt;/h2&gt;

&lt;p&gt;dev.to's DMARC used to be fine. At some point, &lt;strong&gt;a second record was added&lt;/strong&gt;, and now the record name returns two TXT entries at once:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;_dmarc.dev.to →
  "v=DMARC1; p=reject; sp=reject; pct=100; rua=mailto:fb91c946140a4e15a5cb3d172f97ac81@dmarc-reports.cloudflare.net;"
  "v=DMARC1; p=none;"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When a mailbox provider finds more than one DMARC record at a name, the spec (RFC 7489) tells it to stop and apply no policy at all. The domain is treated as if it had no DMARC record.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this means
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Spoofing is trivial
&lt;/h3&gt;

&lt;p&gt;With no DMARC policy enforced, &lt;strong&gt;direct domain spoofing&lt;/strong&gt; is back on the table: an attacker can put &lt;code&gt;From: DEV Community &amp;lt;yo@dev.to&amp;gt;&lt;/code&gt; on a phishing email and send it from their own server. SPF and DKIM can pass for the attacker's own domain, but the &lt;code&gt;From:&lt;/code&gt; header still says &lt;code&gt;dev.to&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The only thing that ties a passing SPF/DKIM result back to the visible &lt;code&gt;From:&lt;/code&gt; domain is DMARC alignment — and with DMARC out of action, nothing does. If DMARC were correctly configured with &lt;code&gt;p=reject&lt;/code&gt;, the fraudulent message would simply not be delivered. But that is not the case.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxy3bv91h0qo950xxyz9w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxy3bv91h0qo950xxyz9w.png" alt="Spoofed email" width="800" height="511"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To prove the point, I sent myself a spoofed email with &lt;code&gt;From: DEV Community &amp;lt;yo@dev.to&amp;gt;&lt;/code&gt; from a server I control. It landed in my inbox — no spam folder, no warning banner, just the small "via" label Gmail shows next to the sender.&lt;/p&gt;

&lt;h3&gt;
  
  
  Legitimate mail may get flagged
&lt;/h3&gt;

&lt;p&gt;Back to the 'Forgot password?' email from earlier:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6gtki73p2y7ouehk1qsk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6gtki73p2y7ouehk1qsk.png" alt="In Gmail" width="800" height="317"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Between DMARC not passing and the message content, Gmail flagged the email and asked me whether to trust it. If users click "Report spam", dev.to's reputation takes the hit, &lt;strong&gt;making it harder for their legitimate mail to reach inboxes.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing remarks
&lt;/h2&gt;

&lt;p&gt;This post is published on dev.to — about a DMARC failure in dev.to's own mail. It's a good example of why "SPF and DKIM both pass" isn't the finish line. I've reported this to the DEV team, so by the time you read this, it may well be fixed.&lt;/p&gt;

&lt;p&gt;Either way, the lesson stands: make sure your DMARC is set up correctly. DMARC gives receiving servers strict instructions on what to do with email that fails authentication, and that's a key part of &lt;strong&gt;protecting your domain's reputation.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>email</category>
      <category>dmarc</category>
      <category>deliverability</category>
      <category>dns</category>
    </item>
  </channel>
</rss>
