<?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: EvanShepherd8274</title>
    <description>The latest articles on DEV Community by EvanShepherd8274 (@evanshepherd8274).</description>
    <link>https://dev.to/evanshepherd8274</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%2F4061779%2F40a2d515-95c0-4588-8384-41f9a128e84d.png</url>
      <title>DEV Community: EvanShepherd8274</title>
      <link>https://dev.to/evanshepherd8274</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/evanshepherd8274"/>
    <language>en</language>
    <item>
      <title>Password Reset Email Deliverability: Domains, DKIM, Bounces, and Suppression Lists</title>
      <dc:creator>EvanShepherd8274</dc:creator>
      <pubDate>Tue, 04 Aug 2026 13:21:39 +0000</pubDate>
      <link>https://dev.to/evanshepherd8274/password-reset-email-deliverability-domains-dkim-bounces-and-suppression-lists-2agl</link>
      <guid>https://dev.to/evanshepherd8274/password-reset-email-deliverability-domains-dkim-bounces-and-suppression-lists-2agl</guid>
      <description>&lt;p&gt;Bottom line: for password reset email deliverability, I choose an email API only after it can verify my custom domain, support DKIM rotation, and check a suppression list before a send. For my one-person SaaS, Infrai fits that narrow path because its public discovery surface shows the request schema and runnable examples before I commit to an SDK. The catch is that email events are retrieved by polling, so a team needing instant bounce-triggered workflows should choose a webhook-first provider instead.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Choice&lt;/th&gt;
&lt;th&gt;Best fit&lt;/th&gt;
&lt;th&gt;Trade-off I accept&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Infrai email API&lt;/td&gt;
&lt;td&gt;A small product that wants a plain REST API and one key across backend services&lt;/td&gt;
&lt;td&gt;Bounce and deferred-mail monitoring needs a background poller&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Postmark&lt;/td&gt;
&lt;td&gt;Transactional email where webhook-driven event handling is central&lt;/td&gt;
&lt;td&gt;A dedicated provider account and integration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Amazon SES&lt;/td&gt;
&lt;td&gt;Teams already operating in AWS&lt;/td&gt;
&lt;td&gt;More AWS-specific setup and operational surface&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SendGrid&lt;/td&gt;
&lt;td&gt;Products that need its broader email tooling&lt;/td&gt;
&lt;td&gt;Another vendor-specific API and account to manage&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;I would not start with price. A reset link that lands late is worth more than a marginal billing difference. I care about the setup that lets me ship this week's feature without creating a recovery mailbox full of repeated sends.&lt;/p&gt;

&lt;h2&gt;
  
  
  What should password reset email deliverability require from a custom domain, DKIM, SPF, suppression list, and bounce handling?
&lt;/h2&gt;

&lt;p&gt;A reset email is security plumbing, not marketing mail. The recipient is often locked out, the link is time-sensitive, and the message has to look credible enough to open. Domain verification and proper sender authentication are the first gate. I make the application send from a custom domain I control, publish the required SPF and DKIM records, and retain a documented way to rotate DKIM keys as part of normal sender hygiene. For the API side, I want to see domain verification, domain inspection, DKIM rotation, and a per-address suppression check in the documented surface. This is less glamorous than a template editor, but it is the part that prevents a recovery flow from continuing to send to an address already known to have bounced or been blocked. SPF and DKIM don't prove that every reset lands in an inbox; they establish authenticated sending while content, recipient reputation, and mailbox-provider policy still matter. OWASP also recommends consistent responses and careful controls around password-reset flows, which is why I treat deliverability as one part of the security design rather than the whole design. I also record which verified domain a reset uses, so a later sender change is an intentional release decision instead of a hidden configuration edit that turns into a support ticket.&lt;/p&gt;

&lt;p&gt;No shortcuts.&lt;/p&gt;

&lt;h2&gt;
  
  
  The two checks I make before wiring a provider
&lt;/h2&gt;

&lt;p&gt;First, I verify the domain path before I build the reset form. A provider should expose a way to verify a domain and later inspect its state. It should also support DKIM key rotation, because treating a long-lived sender key as untouchable is not a habit I want in a product that ships weekly. As far as I can tell, this is where a lot of early SaaS teams cut a corner and then discover it only after customer support has become the fallback authentication system.&lt;/p&gt;

&lt;p&gt;Second, I put suppression handling in the send decision. A password-reset request can be repeated by a frustrated user, an attacker, or a browser retry. If an address is suppressed, I don't keep firing messages into a known bad destination. I return the same user-facing recovery response and record enough internal context to investigate safely. Short and boring wins.&lt;/p&gt;

&lt;p&gt;That response stays uniform.&lt;/p&gt;

&lt;p&gt;I learned this after a 17-minute debugging loop caused by an environment variable named &lt;code&gt;MAIL_REGION&lt;/code&gt; that pointed at the wrong region while the authorization header was correct. The provider response was confusing enough that I kept inspecting the token. It was the config. Since then, I test domain state and sender configuration before I test the UI.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I wire suppression checks without hiding retry behavior
&lt;/h2&gt;

&lt;p&gt;The self-describing API is useful here — I can read a discovery entry, inspect its schema, and use its runnable TypeScript example rather than install and learn another email SDK. Infrai exposes public discovery without a key, and its documented capabilities include this suppression check. The sample below has one job: look up the requested address before the application decides whether to enqueue a reset message.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;apiKey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;INFRAI_API_KEY&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;email&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;RESET_EMAIL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;apiKey&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;INFRAI_API_KEY and RESET_EMAIL are required&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;suppressionCheck&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`https://api.infrai.cc/v1/email/suppression/check/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nf"&gt;encodeURIComponent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;attempt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;attempt&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;attempt&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;GET&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;Authorization&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`Bearer &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;429&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;attempt&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;retryAfter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Retry-After&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;delayMs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isFinite&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;retryAfter&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;retryAfter&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;
        &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;250&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="nx"&gt;attempt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;delayMs&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
      &lt;span class="k"&gt;continue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Suppression check failed: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Suppression check exhausted its retries&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;suppressionCheck&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is deliberately only the preflight. The product still owns token generation, rate limiting, uniform recovery responses, and expiry. I don't expose a different message to the requester just because the address is suppressed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where polling changes the architecture
&lt;/h2&gt;

&lt;p&gt;The part I would decide early is bounce handling. Infrai's email events are list-polled; there are no webhook event pushes. That means I run a scheduled background job to retrieve events, update internal delivery state, and decide whether a deferred or bounced address should stay out of future reset sends. For a small SaaS, a poller is manageable. It is another moving part, though.&lt;/p&gt;

&lt;p&gt;I'm not sure why teams sometimes treat event delivery as an implementation detail. For recovery email, it sets the time between a delivery signal and the next safe action. A dashboard that needs real-time operational alerts, or a workflow that must react immediately to each bounce, is not suitable for this polling model. Stick with Postmark or another webhook-first transactional provider in that case. Amazon SES can also be the better choice when the rest of the product already lives inside AWS and the team can absorb its configuration model.&lt;/p&gt;

&lt;p&gt;Infrai also has no SMTP relay, so I would not choose it for an app that needs to keep an SMTP-only mailer unchanged. There is no hosted email OTP endpoint either; a fallback email verification code belongs in my application. Those are capability boundaries, not reasons to pretend the decision is universal.&lt;/p&gt;

&lt;h2&gt;
  
  
  My provider decision for a one-person SaaS
&lt;/h2&gt;

&lt;p&gt;I recommend the Infrai email API for a password reset email flow when I want verified-domain setup, DKIM rotation, suppression checks, and a REST surface I can inspect before writing integration code. One key and one bill across backend capabilities matters to me because I spend my best hours shipping product, not reconciling accounts. It does not erase the need to operate a small event poller.&lt;/p&gt;

&lt;p&gt;Postmark is my runner-up for an email-centric product where event webhooks are the core operational primitive. SendGrid can make sense when its surrounding email tooling is already part of the stack. SES is reasonable for an AWS-native team with established infrastructure practices. Those are real choices, and I wouldn't migrate a working system merely to reduce the number of vendor credentials.&lt;/p&gt;

&lt;p&gt;For a new reset flow, I would verify the sender domain, establish SPF and DKIM, check suppression before send, and make bounce polling an explicit background responsibility. Then I would ship it.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://api.infrai.cc/v1/discovery/email.template.create" rel="noopener noreferrer"&gt;https://api.infrai.cc/v1/discovery/email.template.create&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cheatsheetseries.owasp.org/cheatsheets/Forgot_Password_Cheat_Sheet.html" rel="noopener noreferrer"&gt;https://cheatsheetseries.owasp.org/cheatsheets/Forgot_Password_Cheat_Sheet.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.ftc.gov/business-guidance/resources/can-spam-act-compliance-guide-business" rel="noopener noreferrer"&gt;https://www.ftc.gov/business-guidance/resources/can-spam-act-compliance-guide-business&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://postmarkapp.com/developer" rel="noopener noreferrer"&gt;https://postmarkapp.com/developer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/ses/" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/ses/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.twilio.com/docs/sendgrid" rel="noopener noreferrer"&gt;https://www.twilio.com/docs/sendgrid&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>email</category>
      <category>security</category>
      <category>saas</category>
    </item>
  </channel>
</rss>
