How to clean an email list before you pay for mailbox verification

Services that test whether a mailbox exists charge for every address you give them. Part of almost any list can be removed or fixed first, for free, with checks that need no access to a mail server. This page walks through them in order.

None of these steps tells you whether a particular mailbox exists. They remove the addresses that cannot work and flag the ones worth a second look. Only the receiving mail server knows the rest.

1. Tidy up and remove duplicates

Trim spaces, put one address on each line and lower-case it. Then remove repeats:

tr 'A-Z' 'a-z' < list.txt | sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | sort -u > unique.txt

In a spreadsheet, use =LOWER(TRIM(A1)) in a new column and then remove duplicates on it. Gmail ignores dots and anything after a + in the name, so first.last+news@gmail.com and firstlast@gmail.com reach the same person.

2. Drop what is not an address

An address has exactly one @, something before it, and a domain with a dot after it. No spaces, no two dots in a row, at most 64 characters before the @ and 254 in total.

grep -E '^[^@[:space:]]+@[^@[:space:]]+\.[^@[:space:]]+$' unique.txt > wellformed.txt

3. Check that each domain can receive mail

Check each domain once, not each address:

cut -d@ -f2 wellformed.txt | sort -u > domains.txt
while read -r d; do
  mx=$(dig +short MX "$d" | head -n 1)
  echo "$d ${mx:-NO-MX}"
done < domains.txt

How to read the answer:

4. Look for typos in well-known domains

gmial.com, gmai.com, hotnail.com, yaho.com, outlok.com: these often pass the checks above because someone registered them. Sort your domain list by how often each one appears and read the rare ones that look like a big provider. Correct them only when you are sure, or ask the person.

5. Mark disposable addresses

Temporary mailbox services give out addresses that stop working within hours. The community keeps a public list of their domains (search for disposable-email-domains on GitHub). Compare your domain list with it:

grep -F -x -f disposable_email_blocklist.conf domains.txt

6. Decide about role addresses

info@, sales@, support@, admin@ and similar names are shared mailboxes, not people. Many email platforms advise against sending marketing to them. Keep them for business contact lists and drop them from newsletters.

What is left

Well-formed addresses on domains that receive mail. Whether each mailbox exists is the one question left, and that is the part worth paying a mailbox verification service for.

For a long list

Our Bulk Email Validator on Apify runs all six checks for every address and returns a table with a status (valid, risky or invalid), the reason and a suggested fix for typos. It reads public DNS only and does not test the mailbox. It costs $0.50 per 1,000 addresses, paid by card through Apify, with no subscription.