Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

emailsherlock

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emailsherlock

A powerful email validation tool using DNS and SMTP checks

  • 1.0
  • PyPI
  • Socket score

Maintainers
1

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!

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc