Two bugs show up in almost every homemade cold email sender, and both of them are invisible until a prospect points them out. The first is the duplicate send: the same person gets step 1 twice, or gets into two campaigns and receives two different pitches from two of your domains in the same week. The second is the missed stop-on-reply: someone answers your email on Tuesday and your step 3 follow-up — "just bumping this to the top of your inbox" — lands on Wednesday morning anyway.
At 12,000 sends a month, a 0.5% duplicate rate means about 60 people got hit twice. That is not a catastrophe on its own. But the stop-on-reply failures are concentrated exactly where it hurts: among the people who replied, which is the only group that matters. If you booked 20 meetings and three of them received a dumb automated bump after saying "sure, send times," you did real damage to your best conversations.
Cross-campaign deduplication and suppression are table stakes. They are also the first things a script misses, because the naive design — a CSV, a loop, an SMTP call — has no concept of a lead existing outside the current run.
The failure modes, concretely
| Failure | Typical cause | Fix |
|---|---|---|
| Same lead gets step 1 twice | Script crashed after SMTP accepted the message but before the DB write committed | Claim-then-send with a persisted attempt row |
| Lead in two campaigns gets two pitches | Dedupe runs per-CSV, not per-workspace | Normalized lead identity + global uniqueness check at import |
| Two copies sent the same second | Two workers pulled the same queue row | Row-level lock or atomic status transition |
| Follow-up fires after a reply | Reply arrived between scheduling and sending; status never re-checked | Re-check stop conditions immediately before send |
| Reply from a different address ignored | Matching only on the exact To: address | Thread-ID and domain-level matching |
| Sequence stops forever on an OOO | Any inbound message treated as a reply | Classify auto-replies and reschedule |
| Unsubscribed lead emailed again | Suppression stored per-campaign | Workspace-level suppression checked at send time |
Step one: normalize the lead identity
You cannot deduplicate what you cannot compare. Before any lead enters a sequence, reduce the address to a canonical form and store both the raw and the normalized value:
- Lowercase the whole address. SMTP treats the local part as case-sensitive in theory; in practice nobody runs a mailserver where Sarah@ and sarah@ are different people.
- Strip plus-tags for providers that support them (Gmail, Google Workspace, Fastmail). sarah+leads@acme.com and sarah@acme.com are the same inbox.
- Strip dots in the Gmail local part only. s.arah@gmail.com is sarah@gmail.com on Gmail, but not on most other providers — so do not apply this rule globally.
- Trim whitespace, strip mailto:, strip angle brackets, and reject anything that fails a strict syntax check instead of silently sending to it.
- Keep a second key for domain-level dedupe: sarah@acme.com and mike@acme.com are different people but the same company, and you may want a rule that only one contact per company is in an active sequence at a time.
Then enforce uniqueness at the workspace level, not the campaign level. The question your system must be able to answer in one query is: "has this normalized address ever been sent to, by any mailbox, in any campaign, in the last N days?" If that query requires joining five CSVs, you do not have deduplication.
The company-level rule matters more than people expect for local and SMB lists. Scraped business data is full of the same shared inbox attached to three locations, and you will hit the owner three times in a week before you notice.
Make the send idempotent
A send is a side effect you cannot roll back. Once SMTP returns 250, the message is gone — but your process can still die before writing "sent" to the database. On restart, the queue still shows the step as pending, and you send again.
The fix is claim-then-send, not send-then-record:
- Create the attempt row first, with status `claimed`, a unique constraint on (lead_id, campaign_id, step_number) and a worker ID plus timestamp.
- Only the worker that successfully inserted or transitioned that row is allowed to call SMTP. Everyone else backs off. In Postgres this is a `SELECT ... FOR UPDATE SKIP LOCKED` or an `UPDATE ... WHERE status = 'pending' RETURNING` — never a read followed by an unlocked write.
- Generate your own Message-ID before handing the message to SMTP and store it on the attempt row. It is your idempotency token, your threading key for follow-ups, and your way to match replies later.
- If the process dies in the claimed state, do not auto-retry blindly. Stale claims older than, say, 10 minutes should go to a review queue, not back into the queue. Sending nothing is almost always safer than sending twice.
- Treat SMTP timeouts as ambiguous, not as failures. A connection that drops after DATA but before the final response may well have delivered. Mark it `unknown` and stop.
Retry logic is where most duplicates are actually born. A naive `except: retry` around the send call turns a transient network blip into two identical emails. Retries belong around connection setup, not around the delivery of an accepted message.
Stop-on-reply: the window nobody closes
Most scripts evaluate stop conditions at scheduling time. The nightly job builds tomorrow's queue at midnight, checks who replied, and writes 400 rows. If a prospect replies at 7:12 a.m. and their follow-up is scheduled for 9:00 a.m., nothing re-checks. The follow-up goes out.
Check stop conditions twice: once when scheduling, and again in the last second before the SMTP call. The second check should be cheap — one indexed lookup on the lead's status — and it should cover every stop reason: replied, bounced, unsubscribed, manually paused, campaign paused, mailbox paused, suppression list hit.
Then close the other half of the window: how fast do you learn about replies at all? If your IMAP poller runs every 15 minutes, your worst-case exposure is 15 minutes plus processing time. If it runs hourly, you will ship bumps to people who replied 50 minutes ago. Poll frequently, or use push notifications where the provider supports them. The mechanics of why this is harder than it looks — folder scanning, UID tracking, threading quirks across providers — are covered in SMTP and IMAP cold email automation: why reply detection is hard.
Match the reply to the right person
Exact-address matching is the default and it is wrong often enough to matter. Real replies come from:
- An alias or a personal address, when the shared inbox forwards to a human.
- A colleague the prospect forwarded you to — same domain, different person.
- A new address after a rebrand or a job change, usually with the original quoted below.
- An assistant replying on behalf of the contact.
Rank your matching signals: the In-Reply-To or References header pointing at your stored Message-ID is the strongest, then the thread ID your provider assigns, then an exact address match, then a same-domain match with the original subject intact. Domain-level matching should stop the specific lead and flag the account for review rather than silently stopping every contact at that company — unless that is a rule you have deliberately chosen. There is more on the edge cases in how to stop follow-ups when a prospect replies from a different address.
The opposite failure is equally expensive: treating every inbound message as a human reply. Out-of-office notices, mailbox-full bounces, ticketing system acknowledgements, and DMARC report mails will all arrive in the same folder. If any of them stop the sequence permanently, you quietly lose a chunk of your pipeline. Classify first: auto-replies should pause the sequence and reschedule past the stated return date, hard bounces should suppress, and only genuine human text should stop-on-reply.
Suppression has to be global and checked late
Suppression lists stored per campaign are not suppression lists. Unsubscribes, hard bounces, customers, current pipeline, and competitor domains all belong in one workspace-level list that every send checks against immediately before dispatch — including the step 2 that was queued three days ago.
Three rules that prevent most of the embarrassing cases:
- Suppress by normalized address and by domain where appropriate. If someone at acme.com asks you to stop contacting the company, a domain-level entry is the only thing that honors that.
- Apply suppression retroactively to already-queued steps, not just to new imports. A scheduled row is not a promise.
- Log the reason and timestamp. When a prospect says "I unsubscribed and you emailed me again," you need to be able to answer in 30 seconds whether that is true.
Prove it, don't assume it
You should be able to run these checks on your own data today:
- Count sends grouped by normalized address and date — any count above 1 for a single step is a duplicate.
- List leads with a reply timestamp earlier than their most recent send timestamp. That set should be empty.
- List sends whose recipient appears on the suppression list with an earlier created_at. Also empty.
- Measure the median gap between a reply arriving at the mailbox and the sequence status changing. If it is above a few minutes, your polling is too slow.
- Spot-check 20 inbound messages classified as replies and confirm none of them are auto-responders.
Run them weekly. These are the metrics that tell you your sending layer is sound, in the same way bounce rate tells you your list is sound.
Where Sendvanta handles this for you
Sendvanta deduplicates on normalized lead identity across the whole workspace, so a lead already active in one campaign cannot be enrolled in another without you explicitly allowing it. Sends are claimed atomically before dispatch, so a crash or a retry cannot produce a second copy. Stop conditions — replied, bounced, unsubscribed, suppressed, paused — are re-evaluated in the moment before each send rather than only at scheduling time, and replies are matched on thread headers first so answers from aliases and forwarded colleagues still stop the sequence. Auto-replies are classified separately and reschedule instead of killing the thread, and suppression plus one-click unsubscribe are on by default at the workspace level.
You can test the behaviour on the free plan — $0 forever, no credit card, 500 active leads, 1,000 emails a month, and up to 10 of your own SMTP mailboxes. Import a list with deliberate duplicates, reply to yourself mid-sequence from a second address, and watch what the queue does. That is a faster audit than reading anyone's feature page, including ours — the full list is at /features.
Ready to send outbound that lands?
Create your free Sendvanta workspace — no credit card required.
Start free