DEV Community

sophie bella
sophie bella

Posted on

How we fixed an 11.4% bounce rate with an Email Verifier

Quick Summary:

  • Our automated video rendering pipeline was triggered by fake signups, causing a surge in useless S3 uploads.
  • Our SES bounce rate spiked to 11.4%, putting our main domain's email deliverability at immediate risk.
  • Adding a validation layer to check addresses before invoking heavy rendering scripts solved our resource bloat.


Last Tuesday at 3:14 AM, my monitor lit up with AWS CloudWatch alarms. Our main domain's SES reputation was in danger because our bounce rate had spiked to 11.4% in less than half an hour. The culprit wasn't a sudden code deployment failure or a broken DNS configuration. Instead, our automated visual generation system had been targeted by a spam bot registering fake accounts. Because we automatically generate custom visual onboarding assets for every signup, our system was dutifully rendering MP4 files and trying to mail them to nonexistent domains. I realized that setting up a proper email verifier routine was no longer a nice-to-have optimization. We needed a reliable and free email verification solution to filter out junk signups before they could trigger our rendering engine and waste expensive compute cycles.

Deconstructing our video generation pipe

To understand why this was a disaster, you have to understand our backend architecture. We run a Python service that processes incoming signups. For every valid user record, we fetch user-provided metadata, pull asset templates from S3, and use an ffmpeg wrapper to stitch together custom onboarding guides. This is all managed on an EC2 instance where I was sitting in a tmux session watching the worker logs turn red.

We quickly hit a severe bottleneck. The FFmpeg subprocesses were piling up, causing a memory leak that eventually choked our server. The root cause was simple: we were opening the video file descriptors inside a custom class but forgot to call .close() on the underlying file handles when the pipeline errored out on bad mail servers. The fix was straightforward—wrapping the subprocess call inside a proper Python context manager to force cleanup even when an email failed to send. But fixing the memory leak didn't stop the financial leak. We were still burning CPU cycles rendering custom videos for bots, wasting $47.23 in rendering costs within three hours.

The cost of rendering for ghosts

Our S3 storage costs spiked by 241% in a single day. Each custom video is about 15MB, which doesn't sound like much until you multiply it by thousands of bot registrations. Meanwhile, the office coffee machine was flashing a 'descale' error, and our product manager was Slacking me about changing the video watermark opacity from 0.85 to 0.86, which was exactly the kind of micro-management I didn't need while our AWS bill was climbing.

The real threat was our domain reputation. If your bounce rate exceeds 10%, AWS SES will pause your sending capabilities. We were already at 11.4%. If we got blocked, our legitimate users wouldn't receive their account verification codes, grinding our entire business to a halt. We had to stop the spam at the front door.

Filtering the entry point

Our first thought was to write a custom regex validator. But regex only catches syntactic mistakes (like missing @ symbols); it doesn't tell you if a domain is actually active or if the mailbox exists. We looked at established API services like ZeroBounce and Hunter, but our immediate need was a quick, zero-friction diagnostic tool to clean our existing backlog of 4,300 unverified signups without having to integrate a complex SDK or commit to a monthly subscription plan under pressure.

We ended up running our exported backlog through Email Verifier. The reason we chose it over competitors was purely mundane: it allowed us to upload a raw TXT file directly on their Bulk Verify page without forcing us to create an account or verify a credit card just to clean a single diagnostic batch. It runs an SMTP handshake check to ask the recipient's mail server if the mailbox exists without actually sending a message.

It isn't a flawless tool, though. During our run, I noticed two specific drawbacks: first, the bulk queue slows down significantly when it encounters a high concentration of catch-all domains, likely because the server is trying to prevent timeouts. Second, there is no cloud-backed dashboard to save your upload history; if you accidentally close your browser tab mid-process, you have to start the upload from scratch. However, for a quick cleanup job, it did exactly what we needed.


Technical checklist for your sign-up workflow

To prevent this from happening again, we implemented a multi-stage validation check. Here is the python logic we now use before triggering any asynchronous rendering tasks:

  1. Syntax Check: Reject formatting errors at the API layer.
  2. DNS Verification: Confirm the domain has valid MX records.
  3. Queue Delay: Hold the rendering pipeline until the user completes double opt-in verification.
import dns.resolver

def is_valid_domain_mx(email: str) -> bool:
    try:
        domain = email.split('@')[1]
        # Query mail exchange records
        records = dns.resolver.resolve(domain, 'MX')
        return len(records) > 0
    except (dns.resolver.NoAnswer, dns.resolver.NXDOMAIN, IndexError):
        return False
    except Exception as e:
        # Fallback to False on network or lookup timeouts
        return False
Enter fullscreen mode Exit fullscreen mode

Disclosure: I pay for Email Verifier. No other affiliation.

Top comments (0)