<?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: bwoud</title>
    <description>The latest articles on DEV Community by bwoud (@bwoud).</description>
    <link>https://dev.to/bwoud</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%2F4270925%2Fc87a3ebe-79bc-4dfc-8dd1-0f3d35132999.png</url>
      <title>DEV Community: bwoud</title>
      <link>https://dev.to/bwoud</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bwoud"/>
    <language>en</language>
    <item>
      <title>Canadian Email Authentication Guide: SPF, DMARC &amp; Zero-PII Compliance (CCCS ITSP.40.065, PIPEDA &amp; Law 25)</title>
      <dc:creator>bwoud</dc:creator>
      <pubDate>Sat, 28 Nov 2026 15:18:19 +0000</pubDate>
      <link>https://dev.to/bwoud/canadian-email-authentication-guide-spf-dmarc-zero-pii-compliance-cccs-itsp40065-pipeda--20i9</link>
      <guid>https://dev.to/bwoud/canadian-email-authentication-guide-spf-dmarc-zero-pii-compliance-cccs-itsp40065-pipeda--20i9</guid>
      <description>&lt;p&gt;For Canadian IT teams, municipalities, law firms, and MSPs, email domain protection sits at the intersection of two requirements: &lt;strong&gt;anti-spoofing enforcement&lt;/strong&gt; and &lt;strong&gt;data minimization&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;On the technical side, the Canadian Centre for Cyber Security's &lt;strong&gt;ITSP.40.065&lt;/strong&gt; (&lt;em&gt;Implementation Guidance: Email Domain Protection&lt;/em&gt;) recommends implementing &lt;strong&gt;SPF, DKIM, and DMARC&lt;/strong&gt; together and progressing toward enforcement (&lt;code&gt;p=quarantine&lt;/code&gt; and &lt;code&gt;p=reject&lt;/code&gt;) so unauthorized senders cannot impersonate your domain.&lt;/p&gt;

&lt;p&gt;On the privacy side, &lt;strong&gt;PIPEDA&lt;/strong&gt; and &lt;strong&gt;Quebec Law 25&lt;/strong&gt; push organizations to limit personal information collection, minimize unnecessary third-party data transfers, and document safeguards around electronic communications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where SPF Breaks Under Real-World Canadian Stacks
&lt;/h2&gt;

&lt;p&gt;Most organizations run a primary mail platform (Microsoft 365 or Google Workspace) alongside cloud tools for CRM, ticketing, accounting, e-commerce, or notifications.&lt;/p&gt;

&lt;p&gt;Under RFC 7208, SPF enforces two strict limits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;10 recursive DNS lookups maximum&lt;/strong&gt; (&lt;code&gt;include:&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;mx&lt;/code&gt;, &lt;code&gt;ptr&lt;/code&gt;, &lt;code&gt;exists:&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2 void lookups maximum&lt;/strong&gt; (queries returning &lt;code&gt;NXDOMAIN&lt;/code&gt; or empty answers)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When stacked vendor &lt;code&gt;include:&lt;/code&gt; records push a domain past 10 lookups—or leave behind retired entries that trigger void lookups—SPF fails with &lt;strong&gt;&lt;code&gt;PermError&lt;/code&gt;&lt;/strong&gt;. That undermines DMARC alignment right when you are trying to enforce &lt;code&gt;p=reject&lt;/code&gt; under ITSP.40.065.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why DNS-Level SPF Flattening Fits a Zero-PII Architecture
&lt;/h2&gt;

&lt;p&gt;Some email security gateways route outbound mail through external proxy relays just to rewrite headers or manage sender authorization. That introduces another third-party hop handling message traffic and metadata—triggering additional vendor risk reviews and Privacy Impact Assessments (PIAs) under Law 25 when personal information crosses outside the organization.&lt;/p&gt;

&lt;p&gt;Out-of-band &lt;strong&gt;DNS-level SPF flattening&lt;/strong&gt; avoids touching email payloads altogether:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mail continues flowing directly from your authorized mail servers and SaaS providers to recipients.&lt;/li&gt;
&lt;li&gt;Only public DNS &lt;code&gt;TXT&lt;/code&gt; records (&lt;code&gt;ip4:&lt;/code&gt; / &lt;code&gt;ip6:&lt;/code&gt; ranges) are resolved, compressed under the 10-lookup limit, and kept synchronized as vendors rotate IP blocks.&lt;/li&gt;
&lt;li&gt;Zero message bodies, recipient addresses, or employee PII ever pass through an intermediary mail proxy.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Practical Checklist for Canadian Teams
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Audit recursive SPF depth and void lookups:&lt;/strong&gt; Ensure your root SPF record stays well below 10 DNS lookups and has zero dead &lt;code&gt;include:&lt;/code&gt; references.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Align DKIM and enforce DMARC (&lt;code&gt;p=reject&lt;/code&gt;):&lt;/strong&gt; Follow CCCS ITSP.40.065 progression from &lt;code&gt;p=none&lt;/code&gt; monitoring to &lt;code&gt;p=quarantine&lt;/code&gt; and &lt;code&gt;p=reject&lt;/code&gt; once all legitimate senders align.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep flattening synced and minimize data exposure:&lt;/strong&gt; Automate vendor CIDR updates so flattened records never go stale, without routing email traffic through unnecessary third-party proxies.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can run a live recursive SPF and DMARC check—built specifically around Canadian compliance and zero-PII DNS architecture—at &lt;a href="https://spf1.ca" rel="noopener noreferrer"&gt;SPF1.ca&lt;/a&gt; or &lt;a href="https://spf1.com" rel="noopener noreferrer"&gt;SPF1.com&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>dns</category>
      <category>security</category>
      <category>devops</category>
      <category>email</category>
    </item>
    <item>
      <title>The 255-Character Limit in DNS TXT Records: How Flattened SPF Records Break</title>
      <dc:creator>bwoud</dc:creator>
      <pubDate>Sat, 28 Nov 2026 15:09:05 +0000</pubDate>
      <link>https://dev.to/bwoud/the-255-character-limit-in-dns-txt-records-how-flattened-spf-records-break-5fhb</link>
      <guid>https://dev.to/bwoud/the-255-character-limit-in-dns-txt-records-how-flattened-spf-records-break-5fhb</guid>
      <description>&lt;p&gt;When you flatten an SPF record by expanding nested &lt;code&gt;include:&lt;/code&gt; chains into &lt;code&gt;ip4:&lt;/code&gt; and &lt;code&gt;ip6:&lt;/code&gt; entries, the resulting TXT string can get long fast.&lt;/p&gt;

&lt;p&gt;Then you try to publish it in DNS and hit a wall—or worse, publish something that breaks mail authentication because of how &lt;strong&gt;DNS TXT character strings&lt;/strong&gt; work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why 255 Characters Matters in DNS TXT
&lt;/h2&gt;

&lt;p&gt;Under DNS standards (RFC 1035 / RFC 4408 / RFC 7208):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A single &lt;strong&gt;character-string&lt;/strong&gt; inside a DNS &lt;code&gt;TXT&lt;/code&gt; record is limited to &lt;strong&gt;255 octets (bytes/characters)&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Longer &lt;code&gt;TXT&lt;/code&gt; records can be split into &lt;strong&gt;multiple quoted 255-character strings&lt;/strong&gt; within the same &lt;code&gt;TXT&lt;/code&gt; RRset, which receiving resolvers concatenate when evaluating SPF.&lt;/li&gt;
&lt;li&gt;However, different DNS providers, UI editors, APIs, and receiving mail parsers handle multi-string &lt;code&gt;TXT&lt;/code&gt; records and total record length differently.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How Flattened SPF Records Run Into Trouble
&lt;/h2&gt;

&lt;p&gt;Flattening replaces domain references with explicit IP ranges:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Large cloud mail senders and marketing platforms publish dozens of IPv4 and IPv6 blocks.&lt;/li&gt;
&lt;li&gt;Once flattened, a single SPF record easily exceeds 255 characters—and sometimes stretches across several chunks.&lt;/li&gt;
&lt;li&gt;If a string is split poorly, missing quotes, or truncated by a DNS control panel or API validation rule, receivers can see a malformed record or fail to parse the full IP list properly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Practical Rules for Long or Flattened SPF Records
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Keep character strings strictly within 255 characters:&lt;/strong&gt; If you use multiple strings in one &lt;code&gt;TXT&lt;/code&gt; record, format each chunk cleanly as a quoted string (&lt;code&gt;"..."&lt;/code&gt;) rather than one giant unsplit string.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Watch total length and receiver limits:&lt;/strong&gt; Even though RFC 7208 removes the old 450-character UDP packet recommendation cap in favor of larger/TCP fallbacks, overly bloated records still cause operational headaches across DNS UIs and resolvers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify the live published &lt;code&gt;TXT&lt;/code&gt; record:&lt;/strong&gt; Always query the live domain after saving changes to confirm how your DNS host actually stored and served the strings.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To inspect a live SPF record and check how it expands or flattens, you can test it at &lt;a href="https://spf1.com" rel="noopener noreferrer"&gt;SPF1&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>dns</category>
      <category>security</category>
      <category>email</category>
      <category>devops</category>
    </item>
    <item>
      <title>Upstream Vendor SPF Lookup Bloat: Why Your Record Breaks When Third Parties Rotate IPs</title>
      <dc:creator>bwoud</dc:creator>
      <pubDate>Sat, 28 Nov 2026 15:06:54 +0000</pubDate>
      <link>https://dev.to/bwoud/upstream-vendor-spf-lookup-bloat-why-your-record-breaks-when-third-parties-rotate-ips-1576</link>
      <guid>https://dev.to/bwoud/upstream-vendor-spf-lookup-bloat-why-your-record-breaks-when-third-parties-rotate-ips-1576</guid>
      <description>&lt;p&gt;A domain's SPF record can look clean at the top level—say, three or four &lt;code&gt;include:&lt;/code&gt; statements—and still fail authentication with &lt;code&gt;PermError&lt;/code&gt; during mail delivery.&lt;/p&gt;

&lt;p&gt;Under RFC 7208, SPF evaluates &lt;strong&gt;recursive DNS lookups&lt;/strong&gt; up to a hard ceiling of &lt;strong&gt;10 lookups&lt;/strong&gt;. Every &lt;code&gt;include:&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;mx&lt;/code&gt;, &lt;code&gt;ptr&lt;/code&gt;, or &lt;code&gt;exists:&lt;/code&gt; mechanism you trigger—and every nested lookup those targets trigger—counts toward that total.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Upstream Vendor Bloat Happens
&lt;/h2&gt;

&lt;p&gt;Most outbound email setups combine a primary mail host (such as Microsoft 365 or Google Workspace) with marketing, support, billing, or transactional senders.&lt;/p&gt;

&lt;p&gt;Problems creep in when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Vendors nest their own &lt;code&gt;include:&lt;/code&gt; chains:&lt;/strong&gt; A single &lt;code&gt;include:&lt;/code&gt; for a CRM, helpdesk, or email relay might expand into two, three, or more additional DNS lookups behind the scenes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multiple tools overlap:&lt;/strong&gt; Adding marketing automation, ticketing, and transactional sending alongside your primary workspace quickly pushes total evaluation past 10 lookups.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Surface checks hide depth:&lt;/strong&gt; Looking only at the top-level TXT string tells you how many direct includes you wrote, not how deep the recursive tree actually goes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The IP Rotation Trap in Flattened Records
&lt;/h2&gt;

&lt;p&gt;Flattening resolves nested &lt;code&gt;include:&lt;/code&gt; targets into explicit &lt;code&gt;ip4:&lt;/code&gt; and &lt;code&gt;ip6:&lt;/code&gt; ranges so receiving servers don't have to walk a deep lookup chain.&lt;/p&gt;

&lt;p&gt;The catch is &lt;strong&gt;drift&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cloud email and marketing providers update sending IP blocks without warning.&lt;/li&gt;
&lt;li&gt;A static flattened TXT record becomes stale as soon as a vendor adds or retires CIDR ranges.&lt;/li&gt;
&lt;li&gt;Stale IPs can cause legitimate messages to miss SPF alignment, while failing to track upstream changes leaves your record out of sync with live sending infrastructure.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Practical Ways to Keep SPF Healthy
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Audit full recursive depth:&lt;/strong&gt; Check the total lookup count across nested includes, not just top-level entries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit vendors regularly:&lt;/strong&gt; Remove &lt;code&gt;include:&lt;/code&gt; statements for tools your team no longer uses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep flattened records synchronized:&lt;/strong&gt; If you flatten SPF to stay under the 10-lookup limit, automate or monitor updates so IP changes don't drift out of date.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To inspect recursive lookup depth and see how your SPF record expands in real time, you can run a check at &lt;a href="https://spf1.com" rel="noopener noreferrer"&gt;SPF1&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>dns</category>
      <category>security</category>
      <category>devops</category>
      <category>email</category>
    </item>
    <item>
      <title>The Hidden SPF Void Lookup Limit (RFC 7208): Why a 4/10 Record Still Fails With PermError</title>
      <dc:creator>bwoud</dc:creator>
      <pubDate>Sat, 28 Nov 2026 15:03:26 +0000</pubDate>
      <link>https://dev.to/bwoud/the-hidden-spf-void-lookup-limit-rfc-7208-why-a-410-record-still-fails-with-permerror-1nc3</link>
      <guid>https://dev.to/bwoud/the-hidden-spf-void-lookup-limit-rfc-7208-why-a-410-record-still-fails-with-permerror-1nc3</guid>
      <description>&lt;p&gt;Most engineers know about the &lt;strong&gt;10 DNS lookup limit&lt;/strong&gt; in SPF (RFC 7208). You count your &lt;code&gt;include:&lt;/code&gt; mechanisms, see &lt;code&gt;4/10&lt;/code&gt; or &lt;code&gt;6/10&lt;/code&gt;, and assume your SPF record is healthy.&lt;/p&gt;

&lt;p&gt;Then outbound emails start failing authentication with &lt;code&gt;PermError&lt;/code&gt;—even though you're nowhere near 10 lookups.&lt;/p&gt;

&lt;p&gt;The culprit is often &lt;strong&gt;RFC 7208 Section 4.6.4: the void lookup limit&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Counts as a "Void Lookup"?
&lt;/h2&gt;

&lt;p&gt;During SPF evaluation, a receiving mail server treats a DNS lookup as &lt;strong&gt;void&lt;/strong&gt; when a lookup mechanism (&lt;code&gt;include:&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;mx&lt;/code&gt;, &lt;code&gt;ptr&lt;/code&gt;, &lt;code&gt;exists:&lt;/code&gt;) returns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;NXDOMAIN&lt;/code&gt; (the domain or record doesn't exist), or&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;NODATA&lt;/code&gt; / empty response with zero matching records.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Under RFC 7208 Section 4.6.4, &lt;strong&gt;more than 2 void lookups&lt;/strong&gt; during a single SPF evaluation aborts evaluation and returns &lt;strong&gt;&lt;code&gt;permerror&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That means a record with &lt;strong&gt;only 4 total DNS lookups&lt;/strong&gt; can still fail if &lt;strong&gt;3 of those lookups are void&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Void Lookups Sneak Into Real DNS Zones
&lt;/h2&gt;

&lt;p&gt;In practice, void lookups rarely come from someone typing garbage on purpose. They usually show up because of day-to-day drift:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Retired SaaS &amp;amp; marketing tools:&lt;/strong&gt; A vendor gets deprecated or an old &lt;code&gt;include:&lt;/code&gt; for a discontinued campaign tool is left behind in the root TXT record.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stale subdomain or &lt;code&gt;mx&lt;/code&gt; / &lt;code&gt;a&lt;/code&gt; mechanisms:&lt;/strong&gt; An old mail host or subdomain &lt;code&gt;a:&lt;/code&gt; tag gets decommissioned in DNS, leaving an orphan reference in SPF.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Misconfigured vendor sub-records:&lt;/strong&gt; A nested &lt;code&gt;include:&lt;/code&gt; points to a host that returns &lt;code&gt;NXDOMAIN&lt;/code&gt; or an empty TXT answer under certain query paths.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Surface Checks Miss It
&lt;/h2&gt;

&lt;p&gt;Basic SPF checkers only count top-level mechanisms or stop at the first syntax error. They often show &lt;code&gt;4/10&lt;/code&gt; or &lt;code&gt;5/10&lt;/code&gt; and give you a false green light while hiding &lt;code&gt;3&lt;/code&gt; void lookups buried inside the evaluation chain.&lt;/p&gt;

&lt;p&gt;To catch it properly, you have to walk the full recursive expansion and inspect the DNS response status (&lt;code&gt;NOERROR&lt;/code&gt; vs. &lt;code&gt;NXDOMAIN&lt;/code&gt; / empty answer) on every lookup step—not just tally &lt;code&gt;include:&lt;/code&gt; count.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Fix and Prevent It
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Audit every lookup's DNS response, not just the total count:&lt;/strong&gt; Remove dead &lt;code&gt;include:&lt;/code&gt;, &lt;code&gt;a:&lt;/code&gt;, or &lt;code&gt;mx:&lt;/code&gt; entries that return &lt;code&gt;NXDOMAIN&lt;/code&gt; or empty answers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep a buffer below both ceilings:&lt;/strong&gt; Don't run right up against either the 10-lookup limit or the 2-void-lookup limit as vendors change their DNS.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flatten and keep CIDRs in sync:&lt;/strong&gt; Resolving nested includes into IP ranges eliminates recursive hops, provided your flattened record stays updated when vendors rotate IPv4/IPv6 ranges.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you want to inspect the full recursive lookup chain and void-lookup count on a live domain without signing up, I built a free scanner at &lt;a href="https://spf1.com" rel="noopener noreferrer"&gt;SPF1&lt;/a&gt;.&lt;/p&gt;

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