{"id":3231,"date":"2026-12-03T12:34:00","date_gmt":"2026-12-03T12:34:00","guid":{"rendered":"https:\/\/hostry.com\/blog\/?p=3231"},"modified":"2026-12-03T13:37:05","modified_gmt":"2026-12-03T13:37:05","slug":"outlook-rejects-vps-mail-550-5-7-515-questions","status":"publish","type":"post","link":"https:\/\/hostry.com\/blog\/outlook-rejects-vps-mail-550-5-7-515-questions\/","title":{"rendered":"Outlook Rejects Your Server&#8217;s Mail With 550 5.7.515: Five Questions"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"675\" src=\"https:\/\/hostry.com\/blog\/wp-content\/uploads\/2026\/12\/outlook-rejects-vps-mail-550-5-7-515-questions-cover-b.webp\" alt=\"550 5.7.515: a mail sorting gate checks each envelope's signature and return address against the sender name and sends one back\" class=\"wp-image-3240\" srcset=\"https:\/\/hostry.com\/blog\/wp-content\/uploads\/2026\/12\/outlook-rejects-vps-mail-550-5-7-515-questions-cover-b.webp 1200w, https:\/\/hostry.com\/blog\/wp-content\/uploads\/2026\/12\/outlook-rejects-vps-mail-550-5-7-515-questions-cover-b-300x169.webp 300w, https:\/\/hostry.com\/blog\/wp-content\/uploads\/2026\/12\/outlook-rejects-vps-mail-550-5-7-515-questions-cover-b-1024x576.webp 1024w, https:\/\/hostry.com\/blog\/wp-content\/uploads\/2026\/12\/outlook-rejects-vps-mail-550-5-7-515-questions-cover-b-450x253.webp 450w, https:\/\/hostry.com\/blog\/wp-content\/uploads\/2026\/12\/outlook-rejects-vps-mail-550-5-7-515-questions-cover-b-768x432.webp 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Mail from your server to an Outlook.com or Hotmail address bounced with <code>550 5.7.515<\/code>, and a test message shows <code>spf=pass<\/code> and <code>dkim=pass<\/code>. The code means Microsoft judged the domain in your From address as not authenticated enough. Re-checking the SPF record, the usual first move, often misses the cause, because what matters is which domain each check passed for. In a 36-row alignment matrix computed locally, SPF and DKIM passed in every row and DMARC still failed in 12. Read the bounce code first, then compare the DKIM <code>d=<\/code> domain and the Return-Path domain with the From.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"read-the-bounce\">Read the bounce before you touch DNS<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Microsoft uses different codes for different problems. A domain problem shows up as 5.7.515. A block on your sending address or its network shows up as 5.7.1 with a block list name, and changing your domain&#8217;s records does not lift it. Mail filed as Junk produces no bounce at all.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On a Postfix server the remote reply sits in the delivery log line, after <code>said:<\/code>. Pull the last few with one command (on Ubuntu the file is <span class=\"highlighted\">\/var\/log\/mail.log<\/span>):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo grep -E 'status=bounced.*(5\\.7\\.515|S3150|AS9031519)' \/var\/log\/mail.log | tail -n 5<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>What you see<\/th><th>What it points at<\/th><th>First thing to read<\/th><th>Where the fix lives<\/th><\/tr><\/thead><tbody><tr><td><code>550 5.7.515 Access denied, sending domain ... does not meet the required authentication level<\/code><\/td><td>Your From domain failed SPF, DKIM or aligned DMARC<\/td><td><code>header.d=<\/code> and <code>smtp.mailfrom=<\/code> next to <code>header.from=<\/code> in a test message<\/td><td>SPF record, DKIM signing, DMARC record (Questions 1 and 4)<\/td><\/tr><tr><td><code>550 5.7.1<\/code> naming block list S3150<\/td><td>The sending IP or its network<\/td><td>The IP in the bounce, its PTR name<\/td><td>Outlook.com sender form, not DNS (Question 2)<\/td><\/tr><tr><td><code>550 5.7.1 ... lacks SPF\/DKIM\/DMARC Auth Records (AS9031519)<\/code><\/td><td>The November 2026 incident; missing DMARC record<\/td><td><code>_dmarc<\/code> TXT record of the From domain<\/td><td>Publish a DMARC record (Question 3)<\/td><\/tr><tr><td>No bounce, message in Junk<\/td><td>Spam filtering verdict<\/td><td><code>X-Forefront-Antispam-Report<\/code> header at the recipient<\/td><td>Reputation and content (Question 5)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:14px\"><strong>Before the questions: get a raw copy<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Most checks below read the headers of a real message. Send one from your server to a mailbox you control and save its raw source as <span class=\"highlighted\">message.eml<\/span> with the client&#8217;s download-original option. In a re-test, source pasted from a browser window lost trailing spaces and failed with body hash mismatch although the message was signed correctly. Its Authentication-Results header is that receiver&#8217;s verdict, not Microsoft&#8217;s; the lab outputs below stand in for it. The five questions come from Microsoft&#8217;s forums in 2026. Most askers used an ISP or hosted service; the answers are for people running their own mail server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"question-1\">Question 1: 550 5.7.515 while DMARC says pass<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A pass on DMARC does not protect you from 550 5.7.515, because Microsoft checks SPF and DKIM on their own as well. The published rule targets senders of more than 5,000 messages a day; see <strong><a href=\"#what-microsoft-says\">what Microsoft has written about small senders<\/a><\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A user testing from a school address <strong><a href=\"https:\/\/learn.microsoft.com\/en-us\/answers\/questions\/5837977\/outlook-com-rejecting-legitimate-mail-550-5-7-515\" target=\"_blank\" rel=\"noopener\">asked on Microsoft Q&amp;A on March 26, 2026<\/a><\/strong> why messages bounced with 5.7.515. The headers showed SPF fail, DKIM pass and DMARC pass, and the asker called it &#8220;a false positive authentication alignment failure&#8221;. The only reply asked for the domain.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Microsoft&#8217;s <strong><a href=\"https:\/\/support.microsoft.com\/en-us\/outlook\/fix-ndr-error-550-5-7-515-in-outlook-com\" target=\"_blank\" rel=\"noopener\">support page for the 550 5.7.515 non-delivery report<\/a><\/strong> says both SPF (the DNS list of servers allowed to send for a domain) and DKIM (the signature) must pass. DMARC, the policy that ties them to the From domain, must pass with at least one of them aligned. An SPF fail is enough, whatever DMARC says.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Below, a correctly signed message arrives from an IP missing from the SPF record. All outputs here come from Postfix 3.8.6 and OpenDKIM 2.11.0 from the Ubuntu 24.04 archive. They were checked with dkimpy 1.1.8, pyspf 2.0.14 and authheaders 0.16.3 against a local DNS zone. Results were computed locally with open-source verifiers, not Microsoft&#8217;s output. <code>ar.py<\/code>, the matrix and the canonicalization table come from lab helper scripts you do not need.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ ar.py sink\/002.eml 198.51.100.83 bounce@example.net mail.example.net\nAuthentication-Results: mx.example.org; spf=fail reason=\"SPF fail - not authorized\" smtp.helo=mail.example.net smtp.mailfrom=bounce@example.net; dkim=pass header.d=example.net; dmarc=pass (Used From Domain Record) header.from=example.net policy.dmarc=reject<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">SPF is checked for the envelope sender, the MAIL FROM address that later shows up as Return-Path. On a self-hosted setup an SPF fail usually means another machine sends with your domain there, such as a web server or a new VPS after a move. Sometimes the record still lists an old IP; see <strong><a href=\"https:\/\/hostry.com\/blog\/stale-dns-records-after-deleting-vps\/\">finding DNS records that still point at a deleted server<\/a><\/strong>. In the lab output, example.net, 192.0.2.47 and selector <code>dec2026<\/code> stand in for your own values.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dig +short TXT example.net\ndig +short TXT _dmarc.example.net<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The FAQ in Microsoft&#8217;s April 2025 announcement for high-volume senders says an SPF check &#8220;might fail&#8221; past 10 DNS lookups. In pyspf 2.0.14 a record with 11 includes still returned <code>pass<\/code> for an IP in the third include. It gave <code>permerror<\/code> for an IP matched after the tenth lookup and for an IP matched by none of them. So one record can pass for one sender and break for another. Microsoft does not document its count, so stay at 10 or fewer.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"alignment\">DMARC alignment: relaxed and strict, read by d=<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The opposite case confuses more people: SPF and DKIM pass, and DMARC fails. DMARC alignment means the domain that passed must match the From domain. <strong><a href=\"https:\/\/www.rfc-editor.org\/rfc\/rfc7489#section-3.1\" target=\"_blank\" rel=\"noopener\">RFC 7489, section 3.1<\/a><\/strong> defines two modes. Relaxed (the default) accepts any domain with the same organizational domain, so <code>news.example.net<\/code> aligns with <code>example.net<\/code>. Strict (<code>adkim=s<\/code> or <code>aspf=s<\/code> in the DMARC record) needs the exact same name.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Two signed lab messages show the trap. The first has its From on a subdomain with strict alignment, signed with the parent <code>d=example.net<\/code>. A third-party sender signed the second with its own <code>d=<\/code> and bounce domain:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># From: alerts@strict.example.net, signed by OpenDKIM d=example.net, MAIL FROM bounce@example.net (sink\/005)\nAuthentication-Results: mx.example.org; spf=pass reason=\"sender SPF authorized\" smtp.helo=mail.example.net smtp.mailfrom=example.net; dkim=pass header.d=example.net; dmarc=fail (Used From Domain Record) header.from=strict.example.net policy.dmarc=reject\n\n# From: alerts@example.net, signed by a third party d=example.org s=esp1, MAIL FROM bounces@bounces.example.org\nAuthentication-Results: mx.example.org; spf=pass reason=\"sender SPF authorized\" smtp.helo=mail.example.net smtp.mailfrom=bounces.example.org; dkim=pass header.d=example.org header.i=@example.org; dmarc=fail (Used From Domain Record) header.from=example.net policy.dmarc=reject<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">On a single self-hosted server, sign with <code>d=<\/code> equal to the From domain and use an envelope sender on the same domain. Keep alignment relaxed. In the lab matrix, eight combinations that passed in relaxed mode failed in strict mode. In each, a parent domain or a subdomain such as <code>bounce.example.net<\/code> stood where strict mode wants the exact From name.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">OpenDKIM takes <code>d=<\/code> from the KeyTable: the <code>example.net<\/code> before the first colon in the line below. The SigningTable picks a key by From address. These are lines from the lab config; Ubuntu&#8217;s own file uses a local socket (<code>local:\/run\/opendkim\/opendkim.sock<\/code>) instead of the TCP one that the Postfix outputs in Question 4 assume:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \/etc\/opendkim.conf (lab, excerpt)\nCanonicalization        relaxed\/simple\nSocket                  inet:8891@127.0.0.1\nKeyTable                refile:\/etc\/opendkim\/KeyTable\nSigningTable            refile:\/etc\/opendkim\/SigningTable\n# \/etc\/opendkim\/KeyTable (excerpt)\ndec2026._domainkey.example.net example.net:dec2026:\/etc\/opendkim\/keys\/dec2026.private\n# \/etc\/opendkim\/SigningTable (excerpt)\n*@example.net dec2026._domainkey.example.net\n*@strict.example.net dec2026._domainkey.example.net\n*@news.example.net dec2026._domainkey.example.net<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The lab signed the subdomain From because the SigningTable lists <code>*@strict.example.net<\/code>. In a separate re-test configured with a single <code>Domain example.net<\/code> instead of tables, OpenDKIM did not sign that From at all until <code>SubDomains yes<\/code> was added.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Lab note: a helper script applied the RFC rules to 36 combinations of From, MAIL FROM and <code>d=<\/code>, all with SPF and DKIM passing. DMARC failed in 12, two of them in relaxed mode (trimmed):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> # From domain        MAIL FROM dom        DKIM d=            mode  SPF   SPFal  DKIM  DKal  DMARC\n10 example.net        bounce.example.net   news.example.net   s\/s   pass  False  pass  False FAIL\n17 example.net        bounces.example.org  example.org        r\/r   pass  False  pass  False FAIL\n20 news.example.net   example.net          example.net        s\/s   pass  False  pass  False FAIL\n22 news.example.net   example.net          news.example.net   s\/s   pass  False  pass  True  pass\n35 news.example.net   bounces.example.org  example.org        r\/r   pass  False  pass  False FAIL<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"question-2\">Question 2: 550 5.7.1 S3150 block list with clean records<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">S3150 is a block on the sending IP address or its network, so fixing your SPF, DKIM and DMARC records does not lift it. For a bounce from a Hotmail or Outlook.com mailbox, use the delisting form for Outlook.com: <strong><a href=\"https:\/\/learn.microsoft.com\/en-us\/defender-office-365\/external-senders-use-the-delist-portal-to-unblock-yourself\" target=\"_blank\" rel=\"noopener\">open it from Microsoft&#8217;s delist article<\/a><\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In a <strong><a href=\"https:\/\/learn.microsoft.com\/en-us\/answers\/a\/12794870\" target=\"_blank\" rel=\"noopener\">Microsoft Q&amp;A thread of May 26, 2026<\/a><\/strong>, a small platform sending low-volume notifications reported a &#8220;persistent S3150 block&#8221; while SPF, DKIM and DMARC passed and the PTR was forward-confirmed. Requests at sender.office.com never produced a confirmation mail. An advisor pointed to an Outlook.com support form and <code>delist@microsoft.com<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Microsoft&#8217;s article describes sender.office.com for &#8220;banned sending IP&#8221; bounces in the 5.7.606-649 range from Microsoft 365 and does not mention S3150. A 5.7.511 bounce goes by mail to <code>delist@microsoft.com<\/code> with the full bounce text (NDR) and the IP; Microsoft says it will reply within 48 hours.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In five S3150 threads from 2025 and 2026 collected for this piece, passing SPF, DKIM and DMARC did not prevent the block, and no record change lifted it. In a <strong><a href=\"https:\/\/community.nethserver.org\/t\/emails-rejected-by-microsoft-outlook-o365-hotmail-symptoms-diagnosis-and-how-i-got-delisted\/28440\" target=\"_blank\" rel=\"noopener\">NethServer community write-up from August 21, 2026<\/a><\/strong>, the author was delisted after asking for a human review in a support ticket. Another poster, refused again, wrote &#8220;Here we go again with all this drama&#8221; on November 26 and asked about relaying instead.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before you fill in the form, check that the IP&#8217;s PTR name (reverse DNS) resolves back to the same IP and that Postfix announces a matching name in HELO. Microsoft does not say this lifts S3150. The lab&#8217;s second address shows a mismatch (on a real server, drop <code>@127.0.0.10<\/code>):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ postconf myhostname smtp_helo_name\nmyhostname = mail.example.net\nsmtp_helo_name = $myhostname\n$ dig @127.0.0.10 -x 192.0.2.48 +noall +answer\n48.2.0.192.in-addr.arpa. 60\tIN\tPTR\thost-48.provider.example.org.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">An A lookup for <code>host-48.provider.example.org<\/code> then returned NXDOMAIN (no such name), so the PTR does not point back. The PTR record belongs to whoever holds the IP range, so ask your provider how it is set. If <code>myhostname<\/code> is missing from <span class=\"highlighted\">\/etc\/postfix\/main.cf<\/span>, Postfix falls back to the host&#8217;s own name.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"question-3\">Question 3: &#8220;Message lacks SPF\/DKIM\/DMARC Auth Records&#8221; (AS9031519)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Publish a DMARC record if your domain has none. This bounce came from a short Microsoft incident in November 2026, and judging by the fixes people reported, it mostly hit domains without one.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The asker was on the receiving end. A <strong><a href=\"https:\/\/learn.microsoft.com\/en-us\/answers\/questions\/6063865\/550-5-7-1-message-rejected-message-lacks-spf-dkim\" target=\"_blank\" rel=\"noopener\">Microsoft Q&amp;A question of November 6, 2026<\/a><\/strong> reported that &#8220;About 50% of my clients that have emailed me since yesterday&#8221; got a bounce reading <code>550 5.7.1 Message rejected: Message lacks SPF\/DKIM\/DMARC Auth Records (AS9031519)<\/code>. Several commenters fixed it for their own domains by adding a DMARC record with <code>p=none<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Computerworld <strong><a href=\"https:\/\/www.computerworld.com\/article\/4246562\/microsofts-email-security-is-unexpectedly-blocking-legitimate-business-mail.html\" target=\"_blank\" rel=\"noopener\">reported on November 9<\/a><\/strong> (updated November 10) that refusals began on November 5 under incident EX1545193, and that Microsoft called the issue resolved on November 10. The Register <strong><a href=\"https:\/\/www.theregister.com\/a\/5308428\" target=\"_blank\" rel=\"noopener\">wrote that Microsoft&#8217;s incident report<\/a><\/strong> blamed an update to the spam enforcement rules for mail being &#8220;incorrectly marked and blocked&#8221;, and that the rejections were intermittent.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Some bounces cited SPF instead (Computerworld lists 5.7.23). Publish the record wherever your domain&#8217;s DNS is hosted; <strong><a href=\"https:\/\/hostry.com\/products\/dns\/\">Hostry&#8217;s free DNS hosting<\/a><\/strong> works for domains registered at any registrar:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>_dmarc.example.net.  3600  IN  TXT  \"v=DMARC1; p=none; rua=mailto:dmarc-rua@example.net\"\n\ndig +short TXT _dmarc.example.net<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A comment in the thread claimed <code>p=none<\/code> tells receivers to ignore SPF and DKIM. A volunteer moderator replied that both are still checked. Move to <code>p=quarantine<\/code> once the aggregate reports at the <code>rua<\/code> address show your own mail aligning.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"question-4\">Question 4: SPF passes, DKIM fails, only at Outlook<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Start by checking whether the message was signed at all. When DKIM fails only for mail from one sending path, such as a desktop client or a web app, the signature was usually never added. Otherwise it broke after signing, or the key in DNS does not match.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">An <strong><a href=\"https:\/\/techcommunity.microsoft.com\/discussions\/outlookgeneral\/550-5-7-515-access-denied\/4544719\" target=\"_blank\" rel=\"noopener\">August 6, 2026 thread on Microsoft Community Hub<\/a><\/strong> fits the first case. Outlook desktop sending through an ISP&#8217;s SMTP server got 5.7.515 with SPF pass, DKIM fail and DMARC pass, while webmail worked. &#8220;It only fails when using Outlook to send,&#8221; the asker wrote. The accepted answer said DKIM signing must be enabled on the SMTP service Outlook uses, and that changing ports will not help. For your own Postfix, the lab reproduced the causes below.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"is-it-signed\">Is the message signed at all?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">OpenDKIM runs as a milter, a filter Postfix hands each message to. Without <code>non_smtpd_milters<\/code>, Postfix calls it only for mail arriving over SMTP. Mail from the <code>sendmail<\/code> command (PHP&#8217;s <code>mail()<\/code>, cron, most web apps) leaves unsigned, and Postfix logs no warning:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ postconf smtpd_milters non_smtpd_milters milter_default_action\nsmtpd_milters = inet:127.0.0.1:8891\nnon_smtpd_milters =\nmilter_default_action = accept\n$ sendmail -f bounce@example.net customer@example.org &lt; raw\/msg-plain.txt\nsink\/011.eml: no DKIM-Signature header\n$ postconf -e 'non_smtpd_milters = $smtpd_milters'; postfix reload\n$ sendmail -f bounce@example.net customer@example.org &lt; raw\/msg-plain.txt\nopendkim[24484]: 5C8EFD00A0: DKIM-Signature field added (s=dec2026, d=example.net)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The second silent case is a dead OpenDKIM. With <code>milter_default_action = accept<\/code>, Postfix delivered the message unsigned, and the only traces were warning lines like these:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postfix\/smtpd[24024]: warning: milter inet:127.0.0.1:8891: can't read SMFIC_OPTNEG reply packet header: Connection reset by peer\npostfix\/smtpd[24024]: warning: connect to Milter service inet:127.0.0.1:8891: Connection refused\npostfix\/smtp[24028]: D13CAD0097: to=&lt;customer@example.org&gt;, relay=127.0.0.1[127.0.0.1]:2525, ... status=sent (250 OK saved)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Search with <code>sudo grep -i milter \/var\/log\/mail.log<\/code>, which catches all of them. The lab set <code>accept<\/code> to show this silent case; Postfix&#8217;s built-in default is <code>tempfail<\/code>. In a separate re-test with <code>tempfail<\/code> and OpenDKIM stopped, mail from the <code>sendmail<\/code> command waited in the queue and left signed once OpenDKIM was back. SMTP clients got <code>451 4.7.1 Service unavailable - try again later<\/code> instead, so an app that submits over SMTP must retry. We would take that over unsigned mail reaching Outlook.com.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"changed-after-signing\">Was the message changed after signing?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A DKIM signature covers a hash of the body and of chosen headers. Canonicalization sets how strictly they are compared: <code>simple<\/code> tolerates almost no change, <code>relaxed<\/code> ignores trailing whitespace and treats runs of spaces as one (<strong><a href=\"https:\/\/www.rfc-editor.org\/rfc\/rfc6376#section-3.4\" target=\"_blank\" rel=\"noopener\">RFC 6376, section 3.4<\/a><\/strong>). Ubuntu 24.04&#8217;s packaged <span class=\"highlighted\">\/etc\/opendkim.conf<\/span> ships with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Canonicalization\trelaxed\/simple<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The second half is the body, hashed <code>simple<\/code>. Removing one trailing space broke the signature; the same edit passed under <code>relaxed\/relaxed<\/code>. A footer broke every mode, and extra empty lines at the end broke none (dkimpy output, trimmed):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>=== signed with c=relaxed\/simple (Ubuntu default conf) (sink\/002.eml)\n  footer appended to body                          dkim=FAIL  ValidationError: body hash mismatch [...]\n  trailing space removed (\"-- \" -&gt; \"--\")           dkim=FAIL  ValidationError: body hash mismatch [...]\n  two extra empty lines at end                     dkim=pass\n=== signed with c=relaxed\/relaxed (sink\/008.eml)\n  footer appended to body                          dkim=FAIL  ValidationError: body hash mismatch [...]\n  trailing space removed (\"-- \" -&gt; \"--\")           dkim=pass\n  two extra empty lines at end                     dkim=pass<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Set <code>Canonicalization relaxed\/relaxed<\/code> and restart OpenDKIM (<code>sudo systemctl restart opendkim<\/code>). It absorbs whitespace edits; a footer still breaks it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The other cause of a <strong>dkim body hash mismatch in Postfix<\/strong> is order. The milter signs during cleanup, and anything that rewrites the message later breaks the signature. The lab rule in <span class=\"highlighted\">\/etc\/postfix\/header_checks<\/span> was <code>\/^Subject: (.*)$\/ REPLACE Subject: [EXT] ${1}<\/code>. It passed in <code>header_checks<\/code> (before signing) and failed in <code>smtp_header_checks<\/code> (after):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># header_checks = regexp:\/etc\/postfix\/header_checks   (same cleanup pass as the milter)\nsink\/013.eml sig#0 d=example.net s=dec2026 c=relaxed\/simple: dkim=pass\n\n# smtp_header_checks = regexp:\/etc\/postfix\/header_checks   (smtp client, after signing)\nsink\/014.eml sig#0 d=example.net s=dec2026 c=relaxed\/simple: dkim=fail\n   dkimpy log: DEBUG b'DKIM-Signature' valid: False<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Post-queue content filters (scanners or disclaimer tools that take mail from Postfix and hand it back on a second port) behave the same way. With signing on port 25 and a footer added by the filter, dkimpy reported <code>body hash mismatch<\/code>. Signing on the re-injection port fixed it. Here is the lab&#8217;s <span class=\"highlighted\">master.cf<\/span>; the omitted line, marked [&#8230;], defines the <code>labfilter<\/code> transport that hands mail to the filter on port 10025. That line depends on the filter you run, so take it from the filter&#8217;s own documentation:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>[...]\nsmtp       inet  n       -       y       -       -       smtpd -o content_filter=labfilter:[127.0.0.1]:10025 -o smtpd_milters=\n127.0.0.1:10026 inet n   -       n       -       -       smtpd -o content_filter= -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks -o smtpd_authorized_xforward_hosts=127.0.0.0\/8 -o mynetworks=127.0.0.0\/8 -o smtpd_milters=inet:127.0.0.1:8891<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Keep <code>no_header_body_checks<\/code> on the re-injection port. Without it the lab&#8217;s <code>header_checks<\/code> ran twice and the Subject became <code>[EXT] [EXT] Invoice 4471 is ready<\/code>. In the lab layout that signed on port 25, that second rewrite broke the signature.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">An 8-bit body sent to a relay without 8BITMIME (support for raw 8-bit text) is a less obvious case. Postfix converted it to quoted-printable after signing, and the body hash broke; sent to a next hop offering 8BITMIME, it verified.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With <code>always_bcc<\/code>, both the main copy and the BCC copy still verified in the lab run.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"key-faults\">Does the key in DNS match the one you sign with?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run <code>dkimverify &lt; message.eml<\/code> on your saved copy. On Ubuntu 24.04 it comes in the <code>python3-dkim<\/code> package, version 1.1.6; the lab used dkimpy 1.1.8 from PyPI, and the re-test got the same messages from 1.1.6. For a mismatched key (022), a missing selector (025) and a footer added after signing (015), <code>dkimverify<\/code> printed this. For the changed body it crashed, and the last traceback line names the cause:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ dkimverify &lt; sink\/022.eml\nsignature verification failed\nexit=1\n$ dkimverify &lt; sink\/025.eml\nsignature verification failed\nexit=1\n$ dkimverify &lt; sink\/015.eml\nTraceback (most recent call last):\n[...]\ndkim.ValidationError: body hash mismatch (got b'r1TfqxaaBlJN4ZDYzxNpdHHQc01t8iHHdJ6GY0OBWP4=', expected b'rRxAhpD6k3OVx+L51p3NMq1vLp5bvdGpMfcNPzzJP\/I=')\nexit=1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The CLI does not tell a wrong key from a missing selector; dkimpy&#8217;s logger does. This one-liner was not part of the lab run. It prints the key errors after <code>ERROR:root:<\/code> and <code>valid: False<\/code> after <code>DEBUG:root:<\/code>; a changed body still ends in the traceback above:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>python3 -c \"import dkim,logging,sys; logging.basicConfig(level=logging.DEBUG); print(dkim.DKIM(sys.stdin.buffer.read(), logger=logging.getLogger()).verify())\" &lt; message.eml<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li><code>missing public key<\/code>: no TXT record under that selector, for example a typo in <code>s=<\/code> or a key published under another selector.<\/li><li><code>Incorrect padding<\/code> or <code>could not parse RSA public key<\/code>: the <code>p=<\/code> value is truncated or empty. A 2048-bit key cut at 255 characters, the limit of one TXT string, gave the first.<\/li><li><code>valid: False<\/code> with no key error: the private key does not match the published one, or a signed header changed in transit.<\/li><li><code>body hash mismatch<\/code>: the body changed after signing (see above).<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sink\/023.eml sig#0 d=example.net s=trunc c=relaxed\/simple: dkim=fail\n   dkimpy log: ERROR KeyFormatError: Incorrect padding\nsink\/025.eml sig#0 d=example.net s=dec2025 c=relaxed\/simple: dkim=fail\n   dkimpy log: ERROR missing public key: b'dec2025._domainkey.example.net.'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">OpenDKIM&#8217;s own check was run as <code>opendkim-testkey -x \/etc\/opendkim.conf -d example.net -s dec2026 -k \/etc\/opendkim\/keys\/dec2026.private -vvv<\/code>, with the selector changed per test. It printed &#8220;keys do not match&#8221; for a truncated key and for a key from another pair alike. In these lab cases it did not tell the two faults apart.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"question-5\">Question 5: Outlook and Hotmail junk after fixing SPF, DKIM and DMARC<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Mail that lands in Junk was accepted and has usually passed authentication. The spam-filter headers on the delivered copy name the filter that decided.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong><a href=\"https:\/\/techcommunity.microsoft.com\/discussions\/microsoft-365\/google-workspace-sender-stuck-at-scl5-to-all-microsoft-hosted-recipients\/4534669\" target=\"_blank\" rel=\"noopener\">Microsoft Community Hub post of July 7, 2026<\/a><\/strong> is a typical case: mail from a new domain landed in Junk at Outlook.com and Microsoft 365 recipients. Authentication passed; the spam confidence level (SCL) was 5. &#8220;This appears to be a domain reputation cold-start issue,&#8221; the asker wrote. A September 10 reply advised reading CAT, SFV and BCL; those values were never posted.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Microsoft&#8217;s page on <strong><a href=\"https:\/\/learn.microsoft.com\/en-us\/defender-office-365\/message-headers-eop-mdo\" target=\"_blank\" rel=\"noopener\">anti-spam message headers<\/a><\/strong> documents Microsoft 365; we could not confirm which of these fields a consumer Outlook.com mailbox shows. Get the source of a delivered copy (a test mailbox, or a recipient forwarding it as an attachment) and find three headers:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>grep -iE '^(Authentication-Results|X-Forefront-Antispam-Report|X-Microsoft-Antispam):' message.eml<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Long headers can wrap onto indented continuation lines, and grep prints only the first one, so read each header in full in the file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In Microsoft 365 the SCL value inside <code>X-Forefront-Antispam-Report<\/code> does not decide the verdict; the page says to read <code>CAT<\/code> and <code>DIR<\/code> instead. <code>DIR<\/code> is the direction of the message, and <code>INB<\/code> means inbound. <code>CAT:SPM<\/code> means spam, <code>HSPM<\/code> high-confidence spam, <code>BULK<\/code> bulk mail, and <code>SPOOF<\/code> spoofing. <code>SFV:SPM<\/code> means spam filtering marked the message, while <code>SFV:NSPM<\/code> means it did not. <code>BCL<\/code>, in <code>X-Microsoft-Antispam<\/code>, is the bulk complaint level: higher means more likely to draw complaints.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First check <code>compauth<\/code> in Authentication-Results, Microsoft&#8217;s composite authentication result, which uses the From domain as its basis. A <code>compauth=fail<\/code> sends you back to Question 1; <code>compauth=pass<\/code> with <code>CAT:SPM<\/code> points at reputation or content. The <strong><a href=\"https:\/\/learn.microsoft.com\/en-us\/defender-office-365\/anti-spam-spam-confidence-level-scl-about\" target=\"_blank\" rel=\"noopener\">SCL page<\/a><\/strong> adds that 5 or higher generally means the message is considered bad.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For a new domain or IP, both replies in the thread advise steady volume without bursts of test mail, plus a request through Outlook.com sender support.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-microsoft-says\">Does Outlook require DMARC for small senders?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">On paper, no. Microsoft&#8217;s written rule covers high-volume senders, and it has not published a separate one for small senders. In November it behaved as if one existed for a few days.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong><a href=\"https:\/\/techcommunity.microsoft.com\/blog\/outlook\/strengthening-email-security-outlook-new-requirements-for-high-volume-senders\/4399730\" target=\"_blank\" rel=\"noopener\">Outlook announcement of April 2, 2025<\/a><\/strong> applies to domains sending more than 5,000 messages per day to outlook.com, hotmail.com and live.com addresses. SPF and DKIM must pass; DMARC must be at least <code>p=none<\/code> and align with one of them. Enforcement began May 5, 2025, with failures rejected as 550 5.7.515 rather than sent to Junk as first planned. Safe Senders entries do not override it. For senders under 5,000 a day, the FAQ says enforcement targets large senders first and all senders benefit.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-this-means\">What this means for you<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Read the bounce code in your mail log before editing any record, because an IP block and a domain failure need different fixes. For 550 5.7.515, send one message to a mailbox you control and compare the From domain with <code>header.d=<\/code> and <code>smtp.mailfrom=<\/code>. If you run mail on your own <strong><a href=\"https:\/\/hostry.com\/products\/vps\/\">KVM VPS<\/a><\/strong>, these are the checks to keep:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>The SPF record lists every IP that sends with your domain in MAIL FROM, within the 10-lookup limit.<\/li><li>OpenDKIM signs with <code>d=<\/code> equal to the From domain, with <code>Canonicalization relaxed\/relaxed<\/code>.<\/li><li><code>non_smtpd_milters = $smtpd_milters<\/code> is set, and <code>milter_default_action = tempfail<\/code> makes mail wait or be retried while OpenDKIM is down.<\/li><li>Nothing rewrites the message after the last milter pass.<\/li><li>A DMARC record exists, starting at <code>p=none<\/code> with a <code>rua<\/code> address.<\/li><li>The PTR name and HELO name match and resolve to the sending IP.<\/li><\/ol>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>A 550 5.7.515 bounce from Outlook.com is about your From domain, and spf=pass dkim=pass can still end in dmarc=fail when the passes belong to other do&#8230;<\/p>\n","protected":false},"author":6,"featured_media":3241,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"hb_lab_versions":"Postfix 3.8.6, OpenDKIM 2.11.0, dkimpy 1.1.8, Ubuntu 24.04","hb_offer_kicker":"","hb_offer_title":"","hb_offer_text":"","footnotes":""},"categories":[1,20],"tags":[],"class_list":["post-3231","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-virtual-private-server","category-system-admin"],"read_time":13,"_links":{"self":[{"href":"https:\/\/hostry.com\/blog\/wp-json\/wp\/v2\/posts\/3231","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hostry.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hostry.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hostry.com\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/hostry.com\/blog\/wp-json\/wp\/v2\/comments?post=3231"}],"version-history":[{"count":2,"href":"https:\/\/hostry.com\/blog\/wp-json\/wp\/v2\/posts\/3231\/revisions"}],"predecessor-version":[{"id":3243,"href":"https:\/\/hostry.com\/blog\/wp-json\/wp\/v2\/posts\/3231\/revisions\/3243"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hostry.com\/blog\/wp-json\/wp\/v2\/media\/3241"}],"wp:attachment":[{"href":"https:\/\/hostry.com\/blog\/wp-json\/wp\/v2\/media?parent=3231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hostry.com\/blog\/wp-json\/wp\/v2\/categories?post=3231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hostry.com\/blog\/wp-json\/wp\/v2\/tags?post=3231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}