<?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: Yuri Prezument</title>
    <description>The latest articles on DEV Community by Yuri Prezument (@yprez).</description>
    <link>https://dev.to/yprez</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%2F2131227%2Fa6844c0b-9a38-42eb-86f9-6d3d81ab848a.png</url>
      <title>DEV Community: Yuri Prezument</title>
      <link>https://dev.to/yprez</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yprez"/>
    <language>en</language>
    <item>
      <title>Email DNS settings: DKIM published is not the same as active</title>
      <dc:creator>Yuri Prezument</dc:creator>
      <pubDate>Wed, 04 Nov 2026 18:21:19 +0000</pubDate>
      <link>https://dev.to/yprez/email-dns-settings-dkim-published-is-not-the-same-as-active-4e05</link>
      <guid>https://dev.to/yprez/email-dns-settings-dkim-published-is-not-the-same-as-active-4e05</guid>
      <description>&lt;p&gt;For years, my domain's email signing was misconfigured. One setting had never been switched on.&lt;/p&gt;

&lt;p&gt;Receivers check 3 DNS (Domain Name System) records to decide whether mail that claims to be from you really is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SPF (Sender Policy Framework): which servers may send mail for your domain.&lt;sup id="fnref1"&gt;1&lt;/sup&gt;
&lt;/li&gt;
&lt;li&gt;DKIM (DomainKeys Identified Mail): a signature on your mail, made for a domain. Your mail provider signs with the private half of a key, and the public half sits in that domain's DNS.&lt;sup id="fnref2"&gt;2&lt;/sup&gt;
&lt;/li&gt;
&lt;li&gt;DMARC (Domain-Based Message Authentication, Reporting, and Conformance): what receivers should do with mail that fails both checks for your domain, and where to send reports. Its policy has 3 levels: none, quarantine (treat as suspicious, usually by sending to spam&lt;sup id="fnref3"&gt;3&lt;/sup&gt;) and reject (refuse).&lt;sup id="fnref4"&gt;4&lt;/sup&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My DMARC was at none, so mail that failed the checks could still be delivered. Now and then a bounce (a "could not deliver" notice) arrived for mail I never sent: someone was sending as my domain. I wanted to move DMARC to reject.&lt;/p&gt;

&lt;p&gt;But reject is only safe when DKIM works. Forwarding usually breaks SPF but leaves DKIM intact,&lt;sup id="fnref5"&gt;5&lt;/sup&gt; so mail relying on SPF alone fails DMARC when forwarded and can be refused at reject. The DMARC standard says it outright: a domain at reject must not rely on SPF alone.&lt;sup id="fnref6"&gt;6&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;My DKIM key was published, exactly where it should be.&lt;/p&gt;

&lt;p&gt;In the Google Workspace Admin console, under Gmail &amp;gt; Authenticate email, there's a button labelled "Start authentication", and I had never clicked it.&lt;sup id="fnref7"&gt;7&lt;/sup&gt; Until you click it, Google keeps signing your mail with its own fallback key,&lt;sup id="fnref8"&gt;8&lt;/sup&gt; on a domain like the one my mail carried: &lt;code&gt;yprez-com.20221208.gappssmtp.com&lt;/code&gt;. Google's DKIM setup page doesn't mention the fallback.&lt;sup id="fnref7"&gt;7&lt;/sup&gt; An older version of it did.&lt;sup id="fnref8"&gt;8&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;The signature was valid, but for the wrong domain. By default, DMARC only credits a signature from your own domain or one of its subdomains.&lt;sup id="fnref9"&gt;9&lt;/sup&gt; My mail was getting by on SPF alone.&lt;/p&gt;

&lt;p&gt;The fix was to click "Start authentication". With DKIM signing as my domain, I could move DMARC to reject. The bounces for mail I never sent stopped.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://yprez.com/images/blog/email-dns-dkim-figure.png" rel="noopener noreferrer"&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%2Fvhayh3bh6q3842gbjkna.png" alt="Before: mail from y@yprez.com is signed with Google's fallback key, as yprez-com.20221208.gappssmtp.com. DMARC sees the wrong domain, so only SPF counts, and my key in DNS is never used. After &amp;quot;Start authentication&amp;quot;: signed with my key, as yprez.com, which matches the From domain, so DKIM counts too." width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to check your domain
&lt;/h2&gt;

&lt;p&gt;To check your domain, send a message from it to a personal Gmail account. Open it in Gmail on the web, choose "Show original"&lt;sup id="fnref10"&gt;10&lt;/sup&gt; and read the DKIM line. If it doesn't say "PASS" with your domain, your DKIM isn't working.&lt;/p&gt;

&lt;p&gt;A DKIM line that names a domain ending in gappssmtp.com means Google is signing with its fallback key, not yours.&lt;/p&gt;

&lt;p&gt;I've been adding email DNS checks to &lt;a href="https://codequalitycheck.com" rel="noopener noreferrer"&gt;Code Quality Check&lt;/a&gt;, the scanner we build. It checks SPF and DMARC configuration and flags weaknesses in email spoofing protection. Spotting the DKIM fallback takes a real message, since no DNS lookup can see which key actually signs.&lt;/p&gt;

&lt;p&gt;What else would you check before setting DMARC to reject? If you want a second pair of eyes on your domain, send me a message.&lt;/p&gt;




&lt;ol&gt;

&lt;li id="fn1"&gt;
&lt;p&gt;&lt;a href="https://www.rfc-editor.org/rfc/rfc7208" rel="noopener noreferrer"&gt;RFC 7208, Sender Policy Framework (SPF)&lt;/a&gt;&amp;nbsp;↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn2"&gt;
&lt;p&gt;&lt;a href="https://www.rfc-editor.org/rfc/rfc6376" rel="noopener noreferrer"&gt;RFC 6376, DomainKeys Identified Mail (DKIM) Signatures&lt;/a&gt;&amp;nbsp;↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn3"&gt;
&lt;p&gt;&lt;a href="https://knowledge.workspace.google.com/admin/security/set-up-dmarc" rel="noopener noreferrer"&gt;Google Workspace Admin Help, Set up DMARC&lt;/a&gt;&amp;nbsp;↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn4"&gt;
&lt;p&gt;&lt;a href="https://www.rfc-editor.org/rfc/rfc9989#section-4.7" rel="noopener noreferrer"&gt;RFC 9989 (DMARC), section 4.7, DMARC Policy Record Format&lt;/a&gt;&amp;nbsp;↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn5"&gt;
&lt;p&gt;&lt;a href="https://www.rfc-editor.org/rfc/rfc7960" rel="noopener noreferrer"&gt;RFC 7960, Interoperability Issues between DMARC and Indirect Email Flows&lt;/a&gt;&amp;nbsp;↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn6"&gt;
&lt;p&gt;&lt;a href="https://www.rfc-editor.org/rfc/rfc9989#section-7.4" rel="noopener noreferrer"&gt;RFC 9989 (DMARC), section 7.4, Interoperability Considerations&lt;/a&gt;&amp;nbsp;↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn7"&gt;
&lt;p&gt;&lt;a href="https://knowledge.workspace.google.com/admin/security/set-up-dkim" rel="noopener noreferrer"&gt;Google Workspace Admin Help, Set up DKIM&lt;/a&gt;&amp;nbsp;↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn8"&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20240123085129/https://support.google.com/a/answer/180504?hl=en" rel="noopener noreferrer"&gt;Google Workspace Admin Help, Turn on DKIM for your domain (archived, January 2024)&lt;/a&gt;&amp;nbsp;↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn9"&gt;
&lt;p&gt;&lt;a href="https://www.rfc-editor.org/rfc/rfc9989#section-3.2.10.1" rel="noopener noreferrer"&gt;RFC 9989 (DMARC), section 3.2.10.1, Relaxed Alignment&lt;/a&gt;&amp;nbsp;↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn10"&gt;
&lt;p&gt;&lt;a href="https://support.google.com/mail/answer/29436" rel="noopener noreferrer"&gt;Gmail Help, Trace an email with its full header&lt;/a&gt;&amp;nbsp;↩&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;

</description>
      <category>devops</category>
      <category>networking</category>
      <category>security</category>
    </item>
  </channel>
</rss>
