Skip to main content

A powerful email validation tool using DNS and SMTP checks

Project description

EmailSherlock 🕵️‍♂️📧

EmailSherlock is a powerful Python tool for validating email addresses using DNS and SMTP checks. It provides a confidence score for each email's validity and potential deliverability, helping you deduce the legitimacy of email addresses with detective-like precision.

Features

  • Validates email format using regex
  • Checks domain DNS records (MX and A records)
  • Attempts SMTP connection to verify mail server responsiveness
  • Provides a confidence score (0-100%) for each email
  • Handles both single email validation and bulk validation from a file
  • Multi-threaded for improved performance with large datasets
  • Verbose mode for detailed output

Installation

You can install EmailSherlock using pip:

pip install emailsherlock

Usage

Command Line Interface

  1. Validate a single email:
emailsherlock --single example@email.com
  1. Validate emails from a file:
emailsherlock --file input_emails.txt --output results.csv
  1. Use verbose mode for detailed output:
emailsherlock --single example@email.com -v

Python API

You can also use EmailSherlock in your Python scripts:

from emailsherlock import validate_single_email, validate_emails_from_file

# Validate a single email
validate_single_email("example@email.com", verbose=True)

# Validate emails from a file
validate_emails_from_file("input_emails.txt", "results.csv", verbose=True)

Running Manually

If you've cloned the repository or downloaded the source code, you can run EmailSherlock manually without installation:

  1. Navigate to the project directory:
cd path/to/emailsherlock
  1. Run the script directly:
python emailsherlock.py --single example@email.com

or

python emailsherlock.py --file input_emails.txt --output results.csv

Make sure you have the required dependencies installed (dnspython) before running the script manually.

Output

The script generates a CSV file with the following columns:

  • Email
  • School (if provided in the input)
  • Valid (True/False)
  • Confidence Score (0-100%)
  • Notes

Confidence Score Explanation

  • 100%: Valid format, DNS records, MX records, and responsive SMTP server
  • 75%: Valid format, DNS records, and MX records, but unresponsive SMTP server
  • 50%: Valid format and DNS records, but no MX records
  • 25%: Valid format and DNS records, but no MX records and unresponsive SMTP server
  • 0%: Invalid format, no valid DNS records, or explicitly rejected by SMTP server

Limitations

EmailSherlock provides an estimate of email validity based on DNS and SMTP checks. However, it cannot guarantee that an email address is actually in use or will successfully receive emails. The only way to be certain is to send an actual email and confirm receipt.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

If you encounter any issues or have questions, please open an issue on GitHub.

Buy Me a Coffee

If you find EmailSherlock useful and want to support its development, you can buy me a coffee:

Buy Me A Coffee

Your support is greatly appreciated and helps maintain and improve EmailSherlock!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

emailsherlock-1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

emailsherlock-1.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file emailsherlock-1.0.tar.gz.

File metadata

  • Download URL: emailsherlock-1.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for emailsherlock-1.0.tar.gz
Algorithm Hash digest
SHA256 616449198c1994a2ccdfe23f403817d5f6b3f2eb35fe0948036e0525b2dedcc0
MD5 2ee78c5c04228f8ed556ff9324f34c4b
BLAKE2b-256 6a1cea37522af0cd7d5906478a0caaa4b01aef7657a2e0012f7306557309c561

See more details on using hashes here.

File details

Details for the file emailsherlock-1.0-py3-none-any.whl.

File metadata

  • Download URL: emailsherlock-1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for emailsherlock-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 07abe1abaf9ae815c701c73f90f1682aee10adfb0f562564262b1bbc7433b2a6
MD5 d38868d6615833b69fffa7a503e0f1c5
BLAKE2b-256 da70e6eca3bdd97df863c3bab05f37d70899b9d10a4f84dad867196a3a5f8c93

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page