DEV Community

Moazzam Boota
Moazzam Boota

Posted on Edited on

Cold Email Infrastructure, Explained for Developers

Most cold email guides are written for salespeople. This one is written for developers, because the part that decides whether a cold email lands in the inbox or in spam is not the copy — it is infrastructure: DNS records, authentication, domain strategy and sending behaviour.
I work on this problem every day at LiteMail, where we set up sending infrastructure for outbound teams. This post is the full technical picture, with real records you can copy and commands you can run.

TL;DR

Never send cold email from your main domain. Buy lookalike domains and send from those.
Every sending domain needs three DNS records set correctly: SPF, DKIM and DMARC. Missing or misaligned authentication is the single most common technical reason mail lands in spam.
Send 20–30 emails per inbox per day, spread across many inboxes, instead of hundreds from one.
Warm up new inboxes for 2–4 weeks before any campaign traffic.
Keep bounce rate under 2% and spam complaints under 0.1% — Google's sender rules treat 0.3% complaints as the hard ceiling, and you want to stay far below it.

Table of contents

Why your main domain is off-limits
The three records: SPF, DKIM, DMARC
How to verify your setup in the terminal
Sending limits: the math nobody shows you
Warm-up: what it actually does
The two numbers that get domains killed
A pre-send checklist
FAQ

Why your main domain is off-limits

Your root domain (yourcompany.com) carries your website, your product email, your password resets and your reputation with every mailbox provider. Cold outreach always generates some bounces and some spam complaints, no matter how good the list is. If that damage lands on your root domain, it lands on everything.
So the standard setup is:
Buy 2–5 lookalike domains (e.g. getyourcompany.com, tryyourcompany.com, yourcompanyhq.com).
Redirect each one to your main website, so a curious prospect lands somewhere real.
Create inboxes only on those domains: alex@getyourcompany.com, alex.s@getyourcompany.com, and so on.
Send cold email only from those inboxes. Your root domain never sends a single cold message.
If a lookalike domain's reputation dies, you retire it and rotate in a new one. Your root domain never notices.
The three records: SPF, DKIM, DMARC
Authentication is how a receiving server answers one question: "Is this server actually allowed to send mail as this domain, and did anyone tamper with the message?" Since February 2024, Google and Yahoo require all three records for bulk senders — and in practice, for anyone who wants reliable inbox placement.
SPF — who may send
SPF is a DNS TXT record listing the servers allowed to send for your domain. For a Google Workspace sending domain it looks like this:
Host: @
Type: TXT
Value: v=spf1 include:_spf.google.com ~all
For Microsoft 365:
Host: @
Type: TXT
Value: v=spf1 include:spf.protection.outlook.com ~all
Rules that trip people up:
One SPF record per domain. Two TXT records starting with v=spf1 invalidates both. Merge senders into one record with multiple include: mechanisms.
10 DNS lookup limit. Every include:, a, mx and redirect counts. Exceed 10 and SPF fails permanently (PermError).
End with ~all (soft fail) while testing; move to -all (hard fail) once you are sure every legitimate sender is included.
DKIM — proof the message was not altered
DKIM signs outgoing mail with a private key; the public key lives in DNS, and the receiver verifies the signature. For Google Workspace, you generate the key in the Admin Console (Apps → Google Workspace → Gmail → Authenticate email) and publish it as:
Host: google._domainkey
Type: TXT
Value: v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A... (your key)
Two details that matter:
Use a 2048-bit key. Google offers it as an option; the 1024-bit default is weaker and increasingly flagged.
DKIM only helps if it is aligned — the domain in the signature (d=) must match the From domain. Third-party tools sending "on your behalf" with their own signature do not count.
DMARC — what to do when the first two fail
DMARC ties SPF and DKIM together and tells receivers what to do with mail that fails. Publish it at _dmarc:
Host: _dmarc
Type: TXT
Value: v=DMARC1; p=none; rua=mailto:dmarc@getyourcompany.com
Do not jump straight to p=reject. Roll it out in stages:
p=none — monitor only. Collect the aggregate reports (rua) for 1–2 weeks and confirm every legitimate sender passes.
p=quarantine — failing mail goes to spam.
p=reject — failing mail is refused outright. This is the end state you want on every sending domain.
The rua reports are XML files mailed to you daily by receivers. They are tedious to read by hand, but they are the only ground truth about who is sending as your domain — including people who should not be.
How to verify your setup in the terminal
Do not trust a green tick in a dashboard. Ask DNS directly:

SPF

dig TXT getyourcompany.com +short

DKIM (Google Workspace selector)

dig TXT google._domainkey.getyourcompany.com +short

DMARC

dig TXT _dmarc.getyourcompany.com +short
Then send a test message to a seed inbox and inspect the full headers. You are looking for one line:
Authentication-Results: spf=pass dkim=pass dmarc=pass
All three passing, with domains aligned to your From domain, is the actual definition of "set up correctly". Anything else is a bug to fix before you send volume. (If you want the full pre-send routine, we keep a longer email deliverability checklist that covers this plus list hygiene and content checks.)

Sending limits: the math nobody shows you

Mailbox providers do not publish a "cold email limit", but deliverability data is consistent: a single inbox that suddenly sends hundreds of cold emails a day gets restricted or burned. The working ceiling used across the industry is 20–30 cold emails per inbox per day, plus warm-up traffic.
That makes scaling a multiplication problem, not a settings problem:
Daily volume goal
Inboxes needed (at 25/day)
Domains needed (at 3 inboxes/domain)
250 emails/day
10
3–4
1,000 emails/day
40
13–14
2,500 emails/day
100
33–34
Two rules baked into that table:
Max ~3 inboxes per domain. More than that and one domain's reputation problem takes too many inboxes down with it.
Volume grows by adding inboxes and domains, never by raising the per-inbox cap. The cap is the safety mechanism.

Warm-up: what it actually does

A brand-new inbox has no sending history, which to a receiving server looks exactly like a freshly created spam account. Warm-up fixes that by exchanging a slow ramp of ordinary-looking mail — opens, replies, "move to inbox" actions — with a network of real inboxes over 2–4 weeks, so the account builds a normal reputation before campaign traffic starts.
What warm-up is not:
It does not fix bad authentication. SPF/DKIM/DMARC come first.
It does not make a bad list safe. Bounces and complaints during warm-up burn the inbox faster, not slower.
It does not end when campaigns start. Most teams keep a low level of warm-up running alongside sending, so reputation is continuously maintained.
Pre-warmed inboxes (accounts a provider has already aged and warmed) skip the waiting period, which is why they exist as a product category — but the records, limits and monitoring above apply to them exactly the same way.

The two numbers that get domains killed

Bounce rate — keep under 2%. Bounces mean you are mailing addresses that do not exist, which means your list was never verified. Verify every list before sending, and remove hard bounces immediately and permanently.
Spam complaint rate — keep under 0.1%. Google's sender guidelines set 0.3% as the ceiling where enforcement starts, but by the time you are near it, placement has already collapsed. Complaints come from relevance, not infrastructure — no DNS record fixes an email people did not want. Target under 0.1% and treat 0.3% as the cliff edge, not the goal.

A pre-send checklist

Before any campaign leaves a new domain:
Sending from a lookalike domain, not the root domain
SPF, DKIM, DMARC all pass in a real test message's headers
DMARC at p=quarantine or p=reject, with rua reports being received
Max 3 inboxes per domain, 20–30 sends per inbox per day configured
Inboxes warmed 2–4 weeks (or pre-warmed)
List verified, hard bounces suppressed
Bounce and complaint monitoring in place from day one
FAQ
Can I send cold email from my main domain if my volume is low?
You can, and it is still a bad idea. Volume changes how fast reputation damage happens, not whether it happens. One bad list can burn the domain your product email depends on.
How long does the full setup take?
DNS records take under an hour per domain once you know the steps. The slow part is warm-up: 2–4 weeks for fresh inboxes. Pre-warmed inboxes remove that wait, which is the entire reason teams buy them.
Do I need a dedicated IP for cold email?
At normal cold email volumes, no. Google Workspace and Microsoft 365 inboxes send from the provider's shared IP pools, and that is fine — your authentication and behaviour carry your reputation. Dedicated IPs matter for very high-volume single-sender setups, which cold outreach is not.
What breaks deliverability most often?
In order: missing or misaligned authentication, sending too much per inbox, unverified lists (bounces), and buying a domain and mailing from it the same week. All four are process problems, not copy problems.

Top comments (0)