<?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: postwacht</title>
    <description>The latest articles on DEV Community by postwacht (@postwacht).</description>
    <link>https://dev.to/postwacht</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%2F4221064%2F04436afe-3dfa-4996-84c3-c0f38ed832c4.png</url>
      <title>DEV Community: postwacht</title>
      <link>https://dev.to/postwacht</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/postwacht"/>
    <language>en</language>
    <item>
      <title>SPF, DKIM and DMARC: how to check what is wrong with your email setup (and fix it)</title>
      <dc:creator>postwacht</dc:creator>
      <pubDate>Sun, 01 Nov 2026 18:51:15 +0000</pubDate>
      <link>https://dev.to/postwacht/spf-dkim-and-dmarc-how-to-check-what-is-wrong-with-your-email-setup-and-fix-it-e2b</link>
      <guid>https://dev.to/postwacht/spf-dkim-and-dmarc-how-to-check-what-is-wrong-with-your-email-setup-and-fix-it-e2b</guid>
      <description>&lt;p&gt;Your emails land in spam, and you do not know why. Here is a short checklist to find out.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. SPF: who may send for your domain
&lt;/h3&gt;

&lt;p&gt;SPF is a DNS TXT record listing the servers allowed to send mail for your domain.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;example.com.  TXT  "v=spf1 include:_spf.your-provider.com -all"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Common mistakes: more than 10 DNS lookups, two SPF records on one domain, or &lt;code&gt;+all&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. DKIM: proof the mail was not changed
&lt;/h3&gt;

&lt;p&gt;Your sending service signs each mail. You publish the public key as a TXT record under &lt;code&gt;selector._domainkey.example.com&lt;/code&gt;. Check that the selector in the mail header (&lt;code&gt;DKIM-Signature: s=...&lt;/code&gt;) matches a record that exists and uses at least 1024, better 2048 bits.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. DMARC: what receivers should do on failure
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;_dmarc.example.com.  TXT  "v=DMARC1; p=none; rua=mailto:dmarc@example.com"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Start with &lt;code&gt;p=none&lt;/code&gt;, read the reports, then move to &lt;code&gt;quarantine&lt;/code&gt; and &lt;code&gt;reject&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. The rest that gets forgotten
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Reverse DNS (PTR) of your sending IP must match the hostname the server announces&lt;/li&gt;
&lt;li&gt;The IP and the domain must not be on blocklists&lt;/li&gt;
&lt;li&gt;TLS between servers should work&lt;/li&gt;
&lt;li&gt;Gmail and Yahoo require a one-click unsubscribe header for bulk mail:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight email"&gt;&lt;code&gt;&lt;span class="nt"&gt;List-Unsubscribe&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="na"&gt; &amp;lt;https://example.com/unsub&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;List-Unsubscribe-Post&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="na"&gt; List-Unsubscribe=One-Click&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Test it instead of guessing
&lt;/h3&gt;

&lt;p&gt;Send a mail to a test address and look at the result. I built a free tool for that: &lt;a href="https://postwacht.de/en?ref=devto" rel="noopener noreferrer"&gt;https://postwacht.de/en?ref=devto&lt;/a&gt; It runs these checks, gives a score and shows the exact DNS record for each problem. No signup needed.&lt;/p&gt;

</description>
      <category>email</category>
      <category>devops</category>
      <category>security</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
