All work
Multi-Tenant SaaS / Infrastructure

LexerSend: Multi-Tenant Cold Email Infrastructure

Architected a four-service cold email platform that sends through real SMTP/IMAP mailboxes instead of a locked-down ESP, with warmup automation, weighted rotation, and a genuine-vs-bot open tracking model.

Sector
Multi-Tenant SaaS / Infrastructure
Timeline
In active development
Role
Lead Systems Architect
  • Next.js
  • Supabase
  • BullMQ
  • Redis
  • Nodemailer
  • IMAP
  • Docker
  • Nginx
LexerSend: Multi-Tenant Cold Email Infrastructure
4
Services

Web app, sending worker, IMAP poller, and Redis, containerized behind Nginx

286K
Private Relay CIDRs

Apple Private Relay ranges matched to classify opens as genuine or proxied

Auto-pause
Bounce Response

Mailbox health and bounce-rate thresholds pause sending without human intervention

The problem

Cold outbound on a conventional ESP fails on its own terms: the provider suspends the account for the exact behavior the tool exists to perform. Sending through real mailboxes avoids that, but you inherit everything the ESP was handling, send caps, rotation, warmup, bounce processing, reply detection, and deliverability monitoring.

The solution

Built a four-service system sending through real Hostinger and Gmail OAuth2 mailboxes: a Next.js/Supabase app, a standalone BullMQ/Nodemailer sending worker, a dedicated IMAP poller for replies and bounces, and Redis for queueing, behind an Nginx reverse proxy.

Approach

How it was built.

01

Separate the Sender From the App

The sending worker is a standalone process, not a route handler. A deploy of the web app cannot interrupt an in-flight campaign, and the worker's rate limiting, jitter, and mailbox rotation live in one place that owns the whole send decision.

02

Warmup as Automation, Not Advice

Daily send caps auto-raise on a warmup schedule per mailbox, and a weighted rotation spreads volume across the pool according to each mailbox's current health rather than round-robin, so a struggling mailbox naturally receives less traffic before it fails.

03

Evaluate Sequence Logic at Dispatch

Multi-step sequences evaluate their conditions at dispatch time, not at schedule time. A reply that lands an hour before step three is due cancels that step, which only works if the decision is deferred to the moment of sending.

Technical detail

The parts worth explaining.

Genuine vs Raw Open Tracking

Apple Mail Privacy Protection and corporate scanners prefetch tracking pixels, which inflates open rates into uselessness. Opens are classified by matching the requesting IP against 286K real Apple Private Relay CIDR ranges and applying timing-based prefetch detection, then reported as two distinct numbers, genuine and raw, rather than one misleading one.

Spam Placement Is Inferred, and Labeled As Such

Spam-folder placement cannot be read from your own server. The system combines DNSBL checks against Spamhaus and SURBL with an anomaly check for the classic silent-foldering signature, flat bounce rate while engagement drops sharply, and labels that signal 'inferred, not measured' in the UI rather than presenting it as fact.

if (bounceRate.stable() && engagement.drop7d > 0.5) {
  flag(mailbox, 'possible_spam_placement', { inferred: true });
}

Encrypted Credentials at Rest

SMTP and IMAP credentials are stored AES-256-GCM encrypted per mailbox, decrypted only inside the worker at send time, the web app never holds a usable credential in memory.

What I took from it
  • Owning the mailbox means owning deliverability. There is no provider to escalate to
  • A metric you cannot measure directly should be labeled as inferred, not quietly presented as measured
  • Deferring sequence decisions to dispatch time removes an entire class of stale-state bugs
Where it goes next
  • Seed-list panel for direct inbox-versus-spam placement measurement
  • Google Postmaster Tools and Microsoft SNDS reputation surfacing
  • Per-org sending domain onboarding with guided SPF/DKIM/DMARC setup

Got a problem shaped like this?

If something here looks like what you're facing, tell me about it. The first conversation is an architecture discussion, not a sales call.