<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Dmarc – Serverküche</title><link>https://serverkueche.de/en/tags/dmarc/</link><description>Dmarc – Neueste Beiträge von Serverküche</description><generator>Hugo</generator><language>en-US</language><managingEditor>feedback@serverkueche.de (Serverküche)</managingEditor><webMaster>feedback@serverkueche.de (Serverküche)</webMaster><copyright>2026 Serverküche</copyright><lastBuildDate>Thu, 13 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://serverkueche.de/en/tags/dmarc/index.xml" rel="self" type="application/rss+xml"/><item><title>Email deliverability: SPF, DKIM, DMARC and PTR done right</title><link>https://serverkueche.de/en/tutorials/email-deliverability/</link><pubDate>Thu, 13 Aug 2026 00:00:00 +0000</pubDate><author>feedback@serverkueche.de (Serverküche)</author><guid>https://serverkueche.de/en/tutorials/email-deliverability/</guid><description>So your self-hosted mails land in the inbox instead of spam: reverse DNS, SPF, DKIM and DMARC explained, set up and tested step by step.</description><content:encoded><![CDATA[<p>Your mail server is running, mailboxes are created – and still your mails land in the recipient&rsquo;s spam or get rejected outright. Welcome to the actually hard part of self-hosting: <strong>deliverability</strong>. It doesn&rsquo;t depend on your server software, but on four DNS building blocks that prove to other servers that your mails are genuine. This tutorial sets them up and tests them.</p>
<h2 id="what-are-we-building">What are we building?</h2>
<p>By the end, large mail providers (Gmail, Outlook, GMX &amp; co.) recognize your mails as <strong>authentic</strong> and deliver them to the inbox instead of spam. Four mechanisms working together ensure this:</p>
<ul>
<li><strong>Reverse DNS (PTR):</strong> proves that your server IP belongs to your mail hostname – the basic prerequisite, without which many servers don&rsquo;t accept at all.</li>
<li><strong>SPF:</strong> defines <strong>which servers</strong> may send on behalf of your domain.</li>
<li><strong>DKIM:</strong> <strong>signs</strong> every outgoing mail cryptographically, so manipulation and forgery are exposed.</li>
<li><strong>DMARC:</strong> tells recipients <strong>what to do</strong> if SPF or DKIM fail – and sends you reports.</li>
</ul>
<p>The benefit is twofold: your own mails arrive reliably – <strong>and</strong> no one can forge in your name. Without these records, any attacker can send mails with your sender domain (&ldquo;spoofing&rdquo;) and thus conduct phishing in your name. SPF, DKIM and DMARC make exactly that impossible: they turn your domain from an openly abusable sender into a demonstrably genuine one. Especially when customers or colleagues expect mails from you, this protection is at least as important as deliverability itself.</p>
<p>These four records are independent of your server software. Whether you run <a href="/en/tutorials/mailcow-mail-server/">Mailcow</a> or <a href="/en/tutorials/stalwart-mail-server/">Stalwart</a> doesn&rsquo;t matter – you configure deliverability in <strong>DNS</strong> and at the <strong>provider</strong>.</p>
<div class="not-prose my-6 rounded-lg border-l-4 p-4 border-sky-300 bg-sky-50 dark:border-sky-800 dark:bg-sky-900/20">
  <p class="mb-1 flex items-center gap-2 font-semibold text-slate-900 dark:text-white">
    <span aria-hidden="true">ℹ️</span>No &#39;set it once and done&#39;
  </p>
  <div class="prose-kitchen text-sm">Deliverability is a process, not a state. Even with perfect records, a fresh server IP needs time to build a good <strong>reputation</strong>. Reckon with a few days until everything runs smoothly, and keep watching the DMARC reports.</div>
</div>
<h2 id="prerequisites">Prerequisites</h2>
<ul>
<li>
<p>A <strong>running mail server</strong> under your domain (e.g. from the <a href="/en/tutorials/mailcow-mail-server/">Mailcow</a> or <a href="/en/tutorials/stalwart-mail-server/">Stalwart tutorial</a>).</p>
</li>
<li>
<p>Full <strong>access to the DNS zone</strong> of your domain (see <a href="/en/tutorials/connect-domain-to-server/">connecting a domain to your server</a>).</p>
</li>
<li>
<p><strong>Access to the provider panel</strong> to set the <strong>reverse-DNS entry</strong> of the server IP (at netcup in the SCP).</p>
</li>
<li>
<p>The tool <code>dig</code> to check the records:</p>
<div class="sk-code">
  <span class="sk-code-head">Terminal</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">sudo apt install -y bind9-dnsutils</span></span></code></pre></div>
</div>
</li>
</ul>
<h2 id="step-by-step">Step by step</h2>
<h3 id="step-1-set-reverse-dns-ptr--the-foundation">Step 1: Set reverse DNS (PTR) – the foundation</h3>
<p>The most important and most frequently forgotten entry. While a normal DNS entry resolves a name into an IP, the <strong>PTR entry</strong> does the opposite: it resolves your <strong>server IP</strong> back into a name. Recipients check whether this name matches your mail hostname. If the PTR is missing or points to a generic provider name, your server is considered suspicious.</p>
<p>You set the PTR entry <strong>not</strong> in your DNS zone, but at the <strong>provider</strong> that owns the IP. At netcup you go to the <strong>Server Control Panel (SCP)</strong> → <em>Network / Reverse DNS</em> and enter the value <code>mail.YOUR_DOMAIN</code> for your IP. After propagation you check:</p>
<div class="sk-code">
  <span class="sk-code-head">Terminal</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">dig +short -x YOUR_SERVER_IP</span></span></code></pre></div>
</div>
<div class="sk-code">
  <span class="sk-code-head">Ausgabe</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">mail.example.com.</span></span></code></pre></div>
</div>
<p>If <code>mail.YOUR_DOMAIN</code> comes back here, the PTR is correct. If it still points to something like <code>vXXXXXXXXX.example-provider.net</code>, it isn&rsquo;t set yet or hasn&rsquo;t propagated.</p>
<div class="not-prose my-6 rounded-lg border-l-4 p-4 border-amber-400 bg-amber-50 dark:border-amber-700 dark:bg-amber-900/20">
  <p class="mb-1 flex items-center gap-2 font-semibold text-slate-900 dark:text-white">
    <span aria-hidden="true">⚠️</span>Warning
  </p>
  <div class="prose-kitchen text-sm">The PTR hostname (<code>mail.YOUR_DOMAIN</code>) <strong>must</strong> resolve forward back to the same IP (A record). This match – &ldquo;forward-confirmed reverse DNS&rdquo; (FCrDNS) – is mandatory for many recipients. Check both: <code>dig +short mail.YOUR_DOMAIN</code> must yield <code>YOUR_SERVER_IP</code>.</div>
</div>
<h3 id="step-2-spf--who-may-send-in-your-name">Step 2: SPF – who may send in your name?</h3>
<p>The <strong>SPF record</strong> is a TXT entry in your DNS zone. It lists the IPs or hostnames that may send mail for your domain. For a single mail server this suffices:</p>
<div class="sk-code">
  <span class="sk-code-head">Ausgabe</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">YOUR_DOMAIN.   TXT   &#34;v=spf1 a:mail.YOUR_DOMAIN -all&#34;</span></span></code></pre></div>
</div>
<p>Broken down:</p>
<ul>
<li><code>v=spf1</code> – the SPF version.</li>
<li><code>a:mail.YOUR_DOMAIN</code> – the server behind this A record may send. Alternatively the IP directly with <code>ip4:YOUR_SERVER_IP</code> (and <code>ip6:…</code> for IPv6).</li>
<li><code>-all</code> – <strong>all other</strong> servers are not authorized (&ldquo;hard fail&rdquo;). That&rsquo;s the strict, recommended variant. A <code>~all</code> (&ldquo;soft fail&rdquo;) is more lenient, but less effective.</li>
</ul>
<p>Check – and do it with a filter:</p>
<div class="sk-code">
  <span class="sk-code-head">Terminal</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">dig +short TXT YOUR_DOMAIN <span class="p">|</span> grep spf1</span></span></code></pre></div>
</div>
<div class="sk-code">
  <span class="sk-code-head">Ausgabe</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">&#34;v=spf1 a:mail.example.com -all&#34;</span></span></code></pre></div>
</div>
<p>The <code>grep</code> isn&rsquo;t a luxury: <code>dig +short TXT</code> prints <strong>all</strong> TXT entries of your zone, and over time verification tokens from Google, Microsoft &amp; co. pile up there. Measured for real – <code>google.com</code> answers with 16 TXT entries, <code>microsoft.com</code> with 61. Without the filter you&rsquo;re picking your SPF record out by hand. If nothing comes back at all, no SPF record exists. If <strong>two</strong> lines come back, you have two SPF records – and that&rsquo;s an error, see &ldquo;When things go wrong&rdquo;.</p>
<p>If you <strong>also</strong> send via third parties – e.g. a newsletter service or an app&rsquo;s transactional-mail gateway – their servers must be authorized too. You do that via <code>include:</code>, and in <strong>a single</strong> record:</p>
<div class="sk-code">
  <span class="sk-code-head">Ausgabe</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">YOUR_DOMAIN.   TXT   &#34;v=spf1 a:mail.YOUR_DOMAIN include:_spf.provider.com -all&#34;</span></span></code></pre></div>
</div>
<div class="not-prose my-6 rounded-lg border-l-4 p-4 border-herb-400 bg-herb-50 dark:border-herb-700 dark:bg-herb-900/20">
  <p class="mb-1 flex items-center gap-2 font-semibold text-slate-900 dark:text-white">
    <span aria-hidden="true">🧑‍🍳</span>Tip
  </p>
  <div class="prose-kitchen text-sm">There may be <strong>only one</strong> SPF record per domain, and SPF allows a maximum of <strong>10 DNS lookups</strong> in total. Collect all senders in <strong>the same</strong> record and save yourself superfluous <code>include:</code>, otherwise SPF becomes invalid or runs into a <code>permerror</code>.</div>
</div>
<h3 id="step-3-dkim--sign-every-mail-cryptographically">Step 3: DKIM – sign every mail cryptographically</h3>
<p><strong>DKIM</strong> signs every outgoing mail with a private key; you publish the matching <strong>public</strong> key as a DNS record. Recipients use it to verify that the mail really comes from you and wasn&rsquo;t changed along the way.</p>
<p>Here&rsquo;s how it works: when sending, your server computes a signature from important headers and the message body and attaches it as a <code>DKIM-Signature</code> header. The recipient fetches your public key from DNS and checks the signature. If it matches, it&rsquo;s proven: the mail comes from a server with your private key <strong>and</strong> wasn&rsquo;t changed. Use <strong>2048-bit</strong> keys – 1024 bit is considered too weak, and most DNS providers now handle the key length without problems.</p>
<p>Your mail server <strong>generates the key</strong> – you only have to publish the DNS record:</p>
<ul>
<li>In <strong>Mailcow</strong>: <em>Configuration → ARC/DKIM keys</em>, select the domain, generate a key (2048 bit). Mailcow shows you the finished DNS record.</li>
<li>In <strong>Stalwart</strong>: the keys are created in the setup wizard; you find the record in the console under the respective domain.</li>
</ul>
<p>The record has a <strong>selector</strong> (a freely chosen name, e.g. <code>dkim</code> or <code>default</code>) and looks like this:</p>
<div class="sk-code">
  <span class="sk-code-head">Ausgabe</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">dkim._domainkey.YOUR_DOMAIN.   TXT   &#34;v=DKIM1; k=rsa; p=MIIBIjANBgkq...LONG_PUBLIC_KEY...AQAB&#34;</span></span></code></pre></div>
</div>
<p>Adopt the value <strong>exactly</strong> as your mail server outputs it. Check:</p>
<div class="sk-code">
  <span class="sk-code-head">Terminal</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">dig +short TXT dkim._domainkey.YOUR_DOMAIN</span></span></code></pre></div>
</div>
<div class="sk-code">
  <span class="sk-code-head">Ausgabe</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">&#34;v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA…FIRST_PART&#34; &#34;SECOND_PART…AQAB&#34;</span></span></code></pre></div>
</div>
<p>Don&rsquo;t be puzzled by the <strong>two</strong> quoted blocks: a single character string inside a TXT entry may carry at most 255 bytes, and a 2048-bit key is longer. It therefore inevitably sits in DNS as two concatenated strings, and <code>dig</code> shows exactly that. This is <strong>not</strong> a truncated key – recipients reassemble the parts when verifying. Most DNS panels handle the splitting for you; if yours wants the value in one piece, enter it without quotes and without line breaks.</p>
<p>If the <code>v=DKIM1; …</code> value comes back, the public key is published.</p>
<h3 id="step-4-dmarc--rules-and-reports">Step 4: DMARC – rules and reports</h3>
<p><strong>DMARC</strong> connects SPF and DKIM: it tells recipients how to handle mails that do <strong>not</strong> pass the check, and has <strong>reports</strong> sent to you about the use of your domain. A good starter record:</p>
<div class="sk-code">
  <span class="sk-code-head">Ausgabe</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">_dmarc.YOUR_DOMAIN.   TXT   &#34;v=DMARC1; p=quarantine; rua=mailto:dmarc@YOUR_DOMAIN; adkim=s; aspf=s&#34;</span></span></code></pre></div>
</div>
<p>Broken down:</p>
<ul>
<li><code>p=quarantine</code> – failing mails should go to spam. To <strong>start</strong>, <code>p=none</code> is recommended (only observe, sort out nothing), so you first evaluate the reports before you arm it. Later you move to <code>quarantine</code> and finally <code>p=reject</code>.</li>
<li><code>rua=mailto:dmarc@YOUR_DOMAIN</code> – the <strong>aggregate reports</strong> come to this address (create the mailbox beforehand).</li>
<li><code>adkim=s</code> / <code>aspf=s</code> – strict alignment (the signing or sending sender must match the domain exactly). The specification&rsquo;s default is <code>r</code> (relaxed) – then the same organizational domain suffices, so <code>mail.YOUR_DOMAIN</code> and <code>YOUR_DOMAIN</code> count as aligned. For a single mail server that sends everything under the same domain, <code>s</code> is the sharper and fitting choice; as soon as services on subdomains send along, fall back to <code>r</code>.</li>
</ul>
<p>Check:</p>
<div class="sk-code">
  <span class="sk-code-head">Terminal</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">dig +short TXT _dmarc.YOUR_DOMAIN</span></span></code></pre></div>
</div>
<div class="sk-code">
  <span class="sk-code-head">Ausgabe</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">&#34;v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com; adkim=s; aspf=s&#34;</span></span></code></pre></div>
</div>
<div class="not-prose my-6 rounded-lg border-l-4 p-4 border-sky-300 bg-sky-50 dark:border-sky-800 dark:bg-sky-900/20">
  <p class="mb-1 flex items-center gap-2 font-semibold text-slate-900 dark:text-white">
    <span aria-hidden="true">ℹ️</span>State of the specification: RFC 9989 (May 2026)
  </p>
  <div class="prose-kitchen text-sm"><p>DMARC has been an official IETF standard since <strong>May 2026</strong>: <strong>RFC 9989</strong> (the protocol) together with RFC 9990 (aggregate reports) and RFC 9991 (failure reports) replaces the old, merely informational RFC 7489 (and RFC 9091). Almost nothing changes for you – <code>v=DMARC1</code> stays the same, existing records remain valid. Three points are worth a look:</p>
<ul>
<li><strong><code>pct=</code> has been removed with no replacement.</strong> The tag that used to apply the policy to only a percentage of mail no longer exists. If it&rsquo;s still in your record, take it out.</li>
<li><strong><code>np=</code> is new</strong> and handy for self-hosters: it sets the policy for <strong>non-existent</strong> subdomains. <code>np=reject</code> lets recipients immediately reject any mail from a subdomain that doesn&rsquo;t exist in your DNS at all – a popular spoofing route you close without side effects. (<code>sp=</code> remains responsible for existing subdomains.)</li>
<li><strong>The Public Suffix List is out.</strong> The organizational domain is now determined by a &ldquo;DNS tree walk&rdquo; directly in DNS instead of an externally maintained list.</li>
</ul></div>
</div>
<h3 id="step-5-test-everything-together">Step 5: Test everything together</h3>
<p>Now the reality check. Three tools – from the big picture to the individual record:</p>
<ol>
<li>
<p><strong><a href="https://www.mail-tester.com">mail-tester.com</a>:</strong> the holistic test. Open the page, it shows you a random address. Send a perfectly normal mail there from your new mailbox and click &ldquo;Then check your score&rdquo;. You get a rating of <strong>10/10</strong> broken down by SPF, DKIM, DMARC, reverse DNS, content and block lists. Anything below 10 shows you concretely where it&rsquo;s stuck.</p>
</li>
<li>
<p><strong>Individual validators per record.</strong> For targeted debugging, check each building block separately online: you enter your domain (for DKIM additionally the selector, e.g. <code>dkim</code>) and get the syntax, resolved values and warnings shown:</p>
<ul>
<li><strong>SPF:</strong> <a href="https://mxtoolbox.com/spf.aspx">MXToolbox SPF check</a> – also shows whether you hit the 10-lookup limit.</li>
<li><strong>DKIM:</strong> <a href="https://mxtoolbox.com/dkim.aspx">MXToolbox DKIM check</a> – give domain <strong>and</strong> selector.</li>
<li><strong>DMARC:</strong> <a href="https://mxtoolbox.com/dmarc.aspx">MXToolbox DMARC check</a> – checks syntax and policy; the <a href="https://dmarcian.com/dmarc-inspector/">dmarcian DMARC inspector</a> shows the policy especially clearly.</li>
</ul>
</li>
<li>
<p><strong>Counter-check via <code>dig</code>:</strong> Check all four building blocks once more in one go:</p>
<div class="sk-code">
  <span class="sk-code-head">Terminal</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">dig +short -x YOUR_SERVER_IP                  <span class="c1"># PTR</span>
</span></span><span class="line"><span class="cl">dig +short TXT YOUR_DOMAIN <span class="p">|</span> grep spf1        <span class="c1"># SPF</span>
</span></span><span class="line"><span class="cl">dig +short TXT dkim._domainkey.YOUR_DOMAIN    <span class="c1"># DKIM</span>
</span></span><span class="line"><span class="cl">dig +short TXT _dmarc.YOUR_DOMAIN             <span class="c1"># DMARC</span></span></span></code></pre></div>
</div>
</li>
</ol>
<p>A particularly good practical test: send a mail to a <strong>Gmail account</strong>, open the mail there, and via &ldquo;Show original&rdquo; you see <code>SPF: PASS</code>, <code>DKIM: PASS</code> and <code>DMARC: PASS</code> directly. Only when all three are PASS are you on the safe side.</p>
<h3 id="step-6-evaluate-dmarc-reports-and-arm-it">Step 6: Evaluate DMARC reports and arm it</h3>
<p>After one or two days, the first <strong>DMARC reports</strong> arrive at your <code>rua</code> address – XML files from the recipient servers that show which sources sent under your domain and whether SPF/DKIM passed. They&rsquo;re hard to read raw; a free report analyzer makes them understandable. As soon as you see in the reports that your <strong>own</strong> mails consistently pass and no foreign sources appear, you raise the DMARC policy step by step from <code>p=none</code> through <code>p=quarantine</code> to <code>p=reject</code>.</p>
<h3 id="step-7-what-gmail-yahoo-and-outlookcom-actually-require">Step 7: What Gmail, Yahoo and Outlook.com actually require</h3>
<p>You don&rsquo;t have to guess what &ldquo;good enough&rdquo; means – the large providers have put their requirements in writing.</p>
<p><strong>Google and Yahoo, binding since 1 February 2024.</strong> For <strong>every</strong> sender: SPF <strong>or</strong> DKIM set up, valid forward <strong>and</strong> reverse DNS records, TLS for transport, and a spam complaint rate below <strong>0.3%</strong>. Anyone sending <strong>5,000 mails or more per day</strong> to Gmail or Yahoo accounts must additionally set up SPF <strong>and</strong> DKIM, publish a DMARC record (<code>p=none</code> suffices), align the <code>From:</code> domain with either the SPF or the DKIM domain, and offer <strong>one-click unsubscribe</strong> via the <code>List-Unsubscribe</code> header for marketing and subscribed mail.</p>
<p><strong>Microsoft, binding since 5 May 2025.</strong> For Outlook.com, Hotmail, Live and MSN the same threshold of 5,000 mails per day applies: SPF and DKIM must <strong>pass</strong>, a DMARC record with at least <code>p=none</code> must exist, and alignment must work via SPF and/or DKIM. Non-compliant mail was first routed to the junk folder; by now Microsoft rejects it right in the SMTP dialogue:</p>
<div class="sk-code">
  <span class="sk-code-head">Ausgabe</span>
  <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">550 5.7.515 Access denied, sending domain YOUR_DOMAIN does not meet the required authentication level</span></span></code></pre></div>
</div>
<p>One detail that&rsquo;s easily missed: the threshold is <strong>sticky</strong>. Once a domain has crossed it, the requirements apply permanently – even if you later send considerably less.</p>
<p>As a self-hoster you&rsquo;ll rarely hit the 5,000 mark. Still, that&rsquo;s exactly the bar to aim for – and the good news: the requirements are precisely what you built in steps 1 to 4. Whoever has PTR, SPF, DKIM and DMARC set cleanly meets the rules of the three largest providers without having to add anything.</p>
<h3 id="step-8-warm-up-the-ip-reputation">Step 8: Warm up the IP reputation</h3>
<p>Perfect DNS records are the entry ticket – but large providers still don&rsquo;t trust a <strong>fresh server IP</strong> immediately. They observe your sending behavior and build up a reputation picture over days to weeks. Two things help decisively:</p>
<ul>
<li><strong>Start small, send regularly.</strong> A new server that fires off hundreds of mails from a standstill looks like a spam cannon. Send few, genuine mails at first and increase slowly. Consistency beats volume.</li>
<li><strong>Send only to existing addresses.</strong> Every mail to a non-existent mailbox (a &ldquo;bounce&rdquo;) worsens your reputation. Keep your recipient lists clean.</li>
</ul>
<p>A special case is <strong>Microsoft</strong> (Outlook, Hotmail, Live): their filters are especially suspicious of new IPs, even with flawless records. The authentication from step 7 is the entry ticket there, but it doesn&rsquo;t replace reputation. Here only patience helps – and, if necessary, enrolling in Microsoft&rsquo;s sender programs (SNDS/JMRP), through which you get insight and a line to the reputation assessment.</p>
<div class="not-prose my-6 rounded-lg border-l-4 p-4 border-herb-400 bg-herb-50 dark:border-herb-700 dark:bg-herb-900/20">
  <p class="mb-1 flex items-center gap-2 font-semibold text-slate-900 dark:text-white">
    <span aria-hidden="true">🧑‍🍳</span>Advanced: BIMI
  </p>
  <div class="prose-kitchen text-sm">When SPF, DKIM and DMARC (with <code>p=quarantine</code> or <code>p=reject</code>) run cleanly, you can use <strong>BIMI</strong> to display your company or sender logo next to your mails in the inbox. That&rsquo;s optional polish, not a must – but a nice signal of legitimacy once the foundation is in place.</div>
</div>
<h2 id="when-things-go-wrong">When things go wrong</h2>
<div class="troubleshoot not-prose">
<p><strong>mail-tester shows &ldquo;reverse DNS does not match&rdquo;.</strong> The PTR entry is missing, not propagated yet, or
doesn&rsquo;t match the A record. Set the PTR in the provider panel to <code>mail.YOUR_DOMAIN</code> and check with
<code>dig -x</code>; make sure <code>mail.YOUR_DOMAIN</code> points forward to the same IP.</p>
<p><strong>DKIM fails (<code>DKIM: FAIL</code> or &ldquo;no signature&rdquo;).</strong> The DNS record was adopted incorrectly (genuinely
truncated key, wrong selector) or not propagated yet. Copy the value exactly from the mail server
UI, match the selector in the record (<code>SELECTOR._domainkey</code>) with the one configured in the server,
then counter-check with <code>dig</code>. That <code>dig</code> shows the key as <strong>two</strong> quoted blocks is normal and not
an error – see step 3.</p>
<p><strong>SPF &ldquo;permerror&rdquo; or &ldquo;too many DNS lookups&rdquo;.</strong> Several SPF records, or too many nested <code>include:</code>
(limit: 10 DNS lookups). Check with <code>dig +short TXT YOUR_DOMAIN | grep spf1</code> that really
only <strong>one</strong> line comes back, consolidate to <strong>one</strong> SPF record and remove unnecessary <code>include:</code>.</p>
<p><strong>Mails to Outlook/Hotmail land in spam or get rejected.</strong> If you get a hard rejection with
<code>550 5.7.515 Access denied, sending domain … does not meet the required authentication level</code>, it&rsquo;s
not a reputation problem but Microsoft&rsquo;s authentication rule from 5,000 mails per day – SPF and
DKIM must pass and an aligned DMARC record (at least <code>p=none</code>) must exist; the threshold sticks to
the domain even if you later send less. If the mails only land in the junk folder, Microsoft is
simply strict with new IPs: patience, send little but regularly, and if needed use Microsoft&rsquo;s
SNDS/JMRP program.</p>
<p><strong>Your IP is on a block list.</strong> The IP was with a spammer before you, or a mailbox of yours sends
spam. Check on the common block-list checkers, and on a legitimate hit have it removed via the
respective delisting form – and fix the cause (compromised account).</p>

</div>

<h2 id="maintenance--backups">Maintenance &amp; backups</h2>
<p>Deliverability is ongoing maintenance, not a one-off action:</p>
<ul>
<li><strong>Watch DMARC reports.</strong> A regular look immediately shows when someone abuses your domain or an own service suddenly fails.</li>
<li><strong>Rotate DKIM keys.</strong> Generate a new key every one to two years (new selector, leave the old one standing for a while) to keep security high.</li>
<li><strong>Keep an eye on reputation.</strong> Occasionally check block lists and the send volume. A sudden rise in outgoing mail is almost always the sign of a hijacked account.</li>
<li><strong>Back up records.</strong> SPF, DKIM and DMARC records belong in your docs or backup – if the DKIM <strong>keys</strong> on the server are lost, you have to generate new ones anyway and replace the DNS record (see the backup sections of the mail server tutorials).</li>
</ul>
<p>Once all four building blocks are set and tested, you&rsquo;ve got half the battle of reputable mail self-hosting won – the rest is done by a cleanly operated server that isn&rsquo;t abused as a spam cannon.</p>
]]></content:encoded></item></channel></rss>