Developer Docs

uMail Domain Verification & DNS Setup

This guide documents the complete process for verifying the mallnline.com domain with Resend and configuring DNS authentication records (SPF, DKIM, DMARC) at Network Solutions. These records ensure outbound transactional emails from the alerts subgraph are properly authenticated and delivered to recipients' inboxes.

Policy: @mallnline.com is reserved for internal platform use only (e.g., noreply@, support@, press@). Malet Owner addresses will use a separate domain in future uMail phases.


Prerequisites


Architecture Overview

The Mallnline email infrastructure uses a dual-provider model:

Direction Provider Purpose
Outbound (transactional) Resend API Order confirmations, welcome emails, OTPs, alerts
Inbound (mailbox) Network Solutions (Roundcube) info@mallnline.com, forwarding aliases

DNS authentication records (SPF, DKIM, DMARC) tell receiving mail servers that Resend is authorized to send emails on behalf of @mallnline.com. Without these records, emails may land in spam or be rejected entirely.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  alerts subgraphโ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚  Resend API  โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚ Recipient Inbox โ”‚
โ”‚  (NestJS)       โ”‚     โ”‚  (outbound)  โ”‚     โ”‚ (Gmail, etc.)   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ”‚                      โ”‚
                              โ”‚                      โ–ผ
                              โ”‚               โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ถโ”‚ DNS Check:  โ”‚
                                              โ”‚ SPF โœ“       โ”‚
                                              โ”‚ DKIM โœ“      โ”‚
                                              โ”‚ DMARC โœ“     โ”‚
                                              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Step 1: Retrieve DNS Records from Resend

  1. Log in to the Resend Dashboard
  2. Click "Add Domain" โ†’ enter mallnline.com
  3. Resend generates the DNS records you need to add

Resend DNS Records Panel โ€” shows the 4 records (DKIM, SPF MX, SPF TXT, DMARC) that need to be added at your DNS provider

Resend provides 4 records across 3 categories:

# Category Record Type Hostname Purpose
1 DKIM TXT resend._domainkey Cryptographic email signing
2 SPF MX send Mail exchanger for SPF subdomain
3 SPF TXT send SPF policy for Resend sending
4 DMARC TXT _dmarc Anti-spoofing policy

Toggle "Enable Sending" to ON. Leave "Enable Receiving" OFF โ€” inbound mail is handled by Network Solutions/Roundcube.

โš ๏ธ Do NOT enable receiving โ€” this would require changing MX records and would break the existing info@mallnline.com Roundcube inbox.


Step 2: Navigate to Network Solutions DNS Panel

  1. Log in to Network Solutions Account Manager
  2. Click Domains in the left sidebar
  3. Click on mallnline.com
  4. Scroll down to "Advanced Tools"
  5. Click "Manage" next to "Advanced DNS Records"

Network Solutions Advanced DNS Records panel โ€” shows existing A, CNAME, MX, and TXT records for mallnline.com

โš ๏ธ Do NOT use "Custom Nameservers" or "Manage Nameservers (DNS)" โ€” those control which nameservers run the domain. The "Advanced DNS Records" panel is for adding individual DNS records.

The existing records you'll see:

Type Name Value Status
A *, email, ftp, imap, mail 66.96.162.x IPs โœ… Do not modify
CNAME _acme-challenge Let's Encrypt (SSL) โœ… Do not modify
MX @ mx.mallnline.com โœ… Critical โ€” do not modify
TXT @ Google site verification โœ… Do not modify
TXT @ v=spf1 ip4:66.96.128.0/18... โœ… Do not modify

Step 3: Add Resend DNS Records

Click "+ Add Record" (top right) and add each record from the Resend dashboard.

Record 1: DKIM (TXT)

Add TXT Record dialog โ€” Type: TXT, Refers to: Other Host, Host Name: resend._domainkey, TXT Value: DKIM key string, TTL: 1 Hour

Field Value
Type TXT
Refers to Select "Other Host"
Host Name resend._domainkey
TXT Value Copy the full DKIM value from Resend (starts with p=MIG...)
TTL 1 Hour

Network Solutions auto-appends .mallnline.com, creating the full record: resend._domainkey.mallnline.com

Record 2: SPF โ€” MX Record

Field Value
Type MX
Refers to Select "Other Host"
Host Name send
Mail Server Copy the MX value from Resend (e.g., feedback-smtp.us-east-1.amazonses.com)
Priority 10
TTL 1 Hour

Record 3: SPF โ€” TXT Record

Field Value
Type TXT
Refers to Select "Other Host"
Host Name send
TXT Value Copy the full SPF TXT value from Resend (e.g., v=spf1 include:amazonses.com ~all)
TTL 1 Hour

Record 4: DMARC โ€” TXT Record

Field Value
Type TXT
Refers to Select "Other Host"
Host Name _dmarc
TXT Value Copy the DMARC value from Resend (e.g., v=DMARC1; p=none; ...)
TTL 1 Hour

Step 4: Verify in Resend

  1. Return to the Resend dashboard
  2. Click "I've added the records"
  3. Resend will check DNS propagation โ€” this usually completes within minutes but can take up to 48 hours
  4. Once verified, the domain status will show โœ… Verified

Verification via CLI

You can also verify DNS propagation from the terminal:

# Check DKIM
dig resend._domainkey.mallnline.com TXT +short

# Check SPF (subdomain)
dig send.mallnline.com TXT +short
dig send.mallnline.com MX +short

# Check DMARC
dig _dmarc.mallnline.com TXT +short

# Check existing MX (should be unchanged)
dig mallnline.com MX +short
# Expected: mx.mallnline.com (priority 30)

Step 5: Update Environment Variables

Once Resend confirms domain verification, the FROM_EMAIL environment variable is already configured:

# .env (root) and apps/auth/.env
FROM_EMAIL=noreply@mallnline.com

The fallback in gmail-alerts.service.ts also defaults to noreply@mallnline.com:

const from =
  this.configService.get('FROM_EMAIL') || 'noreply@mallnline.com';

โš ๏ธ Do not deploy the noreply@mallnline.com sender until Resend verification is complete. Resend will reject emails from unverified sender domains.


Email Delivery Test

After verification, test end-to-end delivery:

npx -y tsx apps/alerts/scripts/verify-email-delivery.ts your-email@gmail.com

Check the received email headers for:

  • SPF: PASS
  • DKIM: PASS
  • DMARC: PASS

Platform Functional Mailboxes

These addresses are provisioned via Network Solutions Standard Email forwarding (same mechanism as dev@mallnline.com โ†’ Gmail):

Address Purpose Forward To
info@mallnline.com General inquiries โœ… Roundcube inbox (active)
dev@mallnline.com Developer inquiries โœ… mallnline.dev@gmail.com (active)
support@mallnline.com Support tickets โ†’ shared Gmail
press@mallnline.com Media inquiries โ†’ shared Gmail
noreply@mallnline.com Transactional outbound Resend sender only (no inbox)
dmarc@mallnline.com DMARC aggregate reports โ†’ dev@ forward
accessibility@mallnline.com Accessibility feedback โ†’ support@ forward

Troubleshooting

Records not propagating

DNS propagation can take up to 48 hours. If records aren't showing after a few hours:

  1. Double-check the Host Name field โ€” Network Solutions auto-appends .mallnline.com
  2. Ensure there are no typos in the TXT values (copy-paste directly from Resend)
  3. Try lowering TTL to 1 Hour for faster updates

"Custom Nameserver" confusion

Network Solutions has multiple DNS-related pages:

  • Custom Nameservers โ€” Creates ns1.yourdomain.com records. Not what you need.
  • Manage Nameservers (DNS) โ€” Changes which DNS servers run your domain. Not what you need.
  • Advanced DNS Records โ€” Adds individual A/CNAME/MX/TXT records. This is the correct page.

Emails still going to spam

If SPF/DKIM/DMARC all pass but emails land in spam:

  • Check sender reputation via Google Postmaster Tools
  • Ensure FROM_EMAIL matches the verified domain (noreply@mallnline.com)
  • DMARC is in p=none (monitoring) mode initially โ€” escalate to p=quarantine after 2-4 weeks of clean reports