Skip to main content

prebounce

Know before it bounces. A self-contained email address verification library for Python.

Status: pre-alpha. The offline checks, DNS lookups, scoring and the Verifier API are implemented and tested. Mailbox probing (the smtp package: reply handling, session, transports, providers, proxies) is not implemented yet; keep smtp_enabled off. Released on PyPI as prebounce 0.1.0; the API may still change. See the roadmap.

Why

Sending to addresses that do not exist damages sender reputation. Hosted verification services work, but they are separate products with their own limits and data flows. prebounce is meant to be one function, verify(address), installed with pip and running inside your own project, with your cache, database and background workers doing the heavy lifting.

Features

Implemented:

  • Syntax check, including international addresses; normalisation
  • Disposable, role-address and free-mail detection; typo suggestions (gmial.com to gmail.com); gibberish score
  • Bundled disposable and allow lists, plus refresh_domain_lists() for host-scheduled refreshes
  • DNS checks: MX records, null MX, implicit MX fallback, optional blocklist lookups
  • Scoring into a typed result with verdict, send recommendation, confidence, reasons and flags
  • Verifier, verify() and verify_many(); MemoryCache; Settings.from_env()
  • Host-owned resources: cache, store, rate limiter and callbacks are supplied by you
  • Zero required dependencies; extras for DNS, syntax and SOCKS

Not implemented yet (design only, see the linked docs):

  • SMTP mailbox probing that never sends DATA, catch-all detection, greylisting as a pending result, provider rules (smtp-probing)
  • SOCKS5 proxy pools or a probe agent (proxies)
  • Spam-trap risk signals

How it works

Each address passes through nine stages in order; any stage may stop early so bad addresses cost no network probe:

  1. Clean up 2. Syntax 3. Local lists 4. Cache 5. Domain lookup 6. Mailbox probe
  2. Read replies 8. Score 9. Return and hooks

Details: docs/pipeline.md.

Usage

from prebounce import MemoryCache, Verifier, verify

result = verify("jane@example.com")  # offline checks only, default settings

verifier = Verifier(
    cache=MemoryCache(),  # or your Redis/memcached wrapper
    on_result=print,  # optional: called with every result
)

result = verifier.verify("jane@example.com")

result.verdict  # Verdict: deliverable | undeliverable | risky | unknown
result.send  # SendRecommendation: safe_to_send | risky_to_send | do_not_send
result.confidence  # Confidence: high | medium | low
result.reasons  # tuple of Reason values

results = verifier.verify_many(["a@example.com", "b@example.org"])

Greylisted results (result.status == Status.pending, resumed with verify(..., resume_token=result.pending.to_token())) only occur once mailbox probing exists.

See docs/results.md for the full result object.

Host callbacks and settings

The library owns logic only: no database, Redis connection, scheduler or workers. You pass small objects (cache, store, rate_limiter, on_result, domain_lists), and settings such as DNS_ENABLED, SMTP_ENABLED, SMTP_PROXIES and CATCH_ALL_CHECK switch network features on (DNS_ENABLED works today; the SMTP_* and CATCH_ALL_CHECK settings only matter once probing exists; a probe agent setting does not exist yet). With no settings, only offline checks run. See docs/configuration.md.

Probe IP addresses and proxies

Mail servers judge the IP address that probes them, and many hosts block port 25. The planned answer (not implemented yet) is a SOCKS5 proxy pool (or an optional probe agent) so your application's own IP is never the one seen. See docs/proxies.md and docs/responsible-use.md.

Documentation

Index | Getting started | Pipeline | Results | Configuration | SMTP probing | Proxies | Disposable domains | Comparison | Responsible use | Roadmap | Design decisions

Roadmap

v0.1 offline checks, v0.2 DNS and v0.5 list refresh are released in 0.1.0; v0.3 SMTP probing and v0.4 proxies and probe agent are not started; v1.0 stable API. Details in docs/roadmap.md.

Contributing

Design review and bug reports are the most valuable contributions at this stage. See CONTRIBUTING.md and the Code of Conduct. Report vulnerabilities per SECURITY.md.

Licence

MIT, copyright 2026 Raghul Jagannathan. See LICENSE. Bundled data lists will carry their own licences; see src/prebounce/data/NOTICE.

Metadata

Release files for prebounce 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for prebounce 0.1.0
File Size Uploaded Provenance Actions
prebounce-0.1.0.tar.gz 722.6 kB With provenance Details for prebounce-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for prebounce 0.1.0
File Interpreter ABI Platform Actions
prebounce-0.1.0-py3-none-any.whl Python 3 none any Details for prebounce-0.1.0-py3-none-any.whl

Total release size: 1.4 MB

Release files / prebounce-0.1.0.tar.gz

Download URL prebounce-0.1.0.tar.gz
Size 722.6 kB
Tags Source
SHA-256 checksum
How to use checksums
adac1b298c77e7bbbc07cf8f135d61696188c948e76bf2bb50f1f7476fb2692c
BLAKE2b-256 checksum
How to use checksums
496f1013023a81f0ae8a26dea96853c9aa4915f6b6ca90d47448d9c22f19dec1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Release files / prebounce-0.1.0-py3-none-any.whl

Download URL prebounce-0.1.0-py3-none-any.whl
Size 698.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42dfe62e50e76195e932f4fa3fcbaaf2c230e685592d4987f393f9ad37c90477
BLAKE2b-256 checksum
How to use checksums
b543170dd4034a757740c7a72fb8e6aadcc8396b14bea4dc7d7592a139b36fea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Security for prebounce 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for prebounce-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page