Skip to main content

Batch and CLI email validator

Project description

๐Ÿ“ง Email Checker

PyPI version Python Version Docker Image MIT License GitHub Repo

Email Checker is a Python-based CLI and Dockerized tool for validating email addresses โ€” individually or in batches. It detects disposable email domains (updated automatically from a public source), integrates with cron for scheduled tasks, and runs smoothly in local and containerized environments.


๐Ÿš€ Features

  • โœ… Validate a single email address from the CLI or Docker
  • ๐Ÿ“„ Batch check emails from CSV files (/input/*.csv)
  • แฝ1 Update and store disposable domains for validation
  • ๐Ÿ•’ Scheduled updates via cron (built-in)
  • ๐Ÿณ Docker-ready for isolated use or integration
  • ๐Ÿ’ป Easy to install and use via pip or make

๐Ÿ“‚ Source Code

The complete source code is available on GitHub.
Feel free to explore, contribute, or fork the project.


๐Ÿ“ฆ Installation (CLI version)

  pip install email-checker-mv

แฝ4 Uninstall

  pip uninstall email-checker-mv

๐Ÿ› ๏ธ CLI Commands

Command Description
check_email someone@example.com โœ… Check a single email (default output)
check_email someone@example.com -S โœ… Check a single email (short output)
check_email someone@example.com -F โœ… Check a single email (full output)
check_batch ๐Ÿ“„ Batch check .csv files in the input/ dir
update_domains ๐Ÿ”„ Update the list of disposable domains

Disposable domains are fetched from Propaganistas/Laravel-Disposable-Email.

๐Ÿ“„ CSV Format for check_batch

The check_batch command processes a CSV file located in the input/ directory and expects the following format:

  • Delimiter: Must be a comma (,)
  • Headers: Required columns are:
    • email โ€“ the email address to validate
    • status โ€“ must be one of the supported values below

Only rows with the appropriate status values will be processed. All others will be skipped.

๐Ÿท๏ธ Supported status Values for check_batch

Status Description
check Check email with default verbosity
check S Check email with short response
check F Check email with full response
undefined Alias for check, treated the same as check
undefined S Alias for check S, runs with short verbosity
undefined F Alias for check F, runs with full verbosity

โœ… Example input file (input/emails.csv)

email,status
user1@example.com,check
user2@example.com,undefined
user3@example.com,check S
user4@example.com,undefined F

๐Ÿ“ค Output

The output format is consistent across both check_email (CLI) and check_batch (CSV):

  • When using CLI, results are printed to the terminal.
  • When using batch, results are written to the status column in the CSV file.

You can safely rerun the same CSV file โ€” already processed rows (anything except check, check S, check F, etc.) will be skipped.

๐Ÿ“‹ Possible values

Result Format Meaning
valid ๐Ÿ“ฅ Address exists and accepts emails
invalid|format โŒ Invalid email format (regex check failed)
invalid|non-ascii โŒ Email contains non-ASCII characters
invalid|disposable ๐Ÿ—‘๏ธ Disposable/temporary email address
invalid|mx ๐Ÿ“ก No MX record found for the domain
invalid|smtp no-code: <msg> ๐Ÿšซ SMTP connection was closed without a response
invalid|smtp <cat_short> <code> โš™๏ธ Default output: short type and SMTP code
invalid|smtp <cat>|<code>|<msg_short> ๐Ÿงพ Short output: verbose type and short message
invalid|smtp <cat>|<code>|<msg> ๐Ÿ“œ Full output: verbose type and full message

๐Ÿ“ These formats apply both in CLI and in .csv batch processing.

๐Ÿ“ฆ SMTP Response Type Codes

Code Meaning
HB / hard-bounce โŒ Hard bounce โ€“ Address does not exist
SB / soft-bounce โš ๏ธ Soft bounce โ€“ Temporary delivery issue
PE / protocol-error ๐Ÿงฉ Protocol error โ€“ SMTP syntax or protocol failure
UN / unknown โ“ Unknown โ€“ Unclassified or unknown SMTP response
NC / no-code ๐Ÿ”Œ No code โ€“ Connection closed unexpectedly (no code)

๐Ÿ“Ž Note: check_batch rewrites the result to the "status" column in the output CSV file for each email.


๐Ÿณ Docker Usage

You can control Docker using either make or manage.sh.

โ–ถ๏ธ manage.sh Script

Before using it, ensure itโ€™s executable:

  chmod +x manage.sh
Command Description
./manage.sh -start ๐ŸŸข Start the container with build
./manage.sh -stop ๐Ÿ›‘ Stop the container
./manage.sh -destroy โš ๏ธ Remove container, images, volumes
./manage.sh -logs ๐Ÿ“„ Tail cron logs
./manage.sh -batch ๐Ÿ“ฌ Run batch email check
./manage.sh -check someone@example.com โœ… Run single email check
./manage.sh -check someone@example.com -S โœ… Run single email check (short output)
./manage.sh -check someone@example.com -F โœ… Run single email check (full output)
./manage.sh -update ๐Ÿ”„ Update list of disposable domains
./manage.sh -help โ„น๏ธ Show this help message

โš™๏ธ Makefile Shortcuts

Use make help to list all commands.

Command Description
./manage.sh -start ๐ŸŸข Start the container with build
./manage.sh -stop ๐Ÿ›‘ Stop the container
./manage.sh -destroy โš ๏ธ Remove container, images, volumes
./manage.sh -logs ๐Ÿ“„ Tail cron logs
./manage.sh -batch ๐Ÿ“ฌ Run batch email check
./manage.sh -check someone@example.com โœ… Run single email check
./manage.sh -check someone@example.com -S โœ… Run single email check (short output)
./manage.sh -check someone@example.com -F โœ… Run single email check (full output)
./manage.sh -update ๐Ÿ”„ Update list of disposable domains
./manage.sh -help โ„น๏ธ Show this help message

๐Ÿ“‚ Cron Customization

You can edit the cron configuration directly inside the running container using:

  docker exec -it email_checker crontab -e

This allows advanced scheduling if needed.


๐Ÿ“„ License

This project is licensed under the MIT License.


๐ŸŒ Projects by the Author

intester.com

InTester is a secure and transparent online knowledge assessment platform. It offers time-limited tests, anti-cheating measures, instant results with PDF certificates, and public test records โ€” making it ideal for job seekers and recruiters alike.

dctsign.com

DCT Sign is a blockchain-backed electronic signature platform that prioritizes privacy and data integrity. Users can securely sign documents without storing the original files, ensuring confidentiality and compliance with advanced e-signature standards.


Thank you for using Email Checker! Contributions and feedback are welcome.

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

email_checker_mv-0.3.0.tar.gz (637.3 kB view details)

Uploaded Source

Built Distribution

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

email_checker_mv-0.3.0-py3-none-any.whl (637.3 kB view details)

Uploaded Python 3

File details

Details for the file email_checker_mv-0.3.0.tar.gz.

File metadata

  • Download URL: email_checker_mv-0.3.0.tar.gz
  • Upload date:
  • Size: 637.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for email_checker_mv-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c9c5de67a02739d5717b89c68a1aa47f501cfa63b4e677b2202e23afb671e70f
MD5 38a2a2c7f60657378a05480f7da0ea9e
BLAKE2b-256 c2ddea7f28bccf9671b0062dbdbd45968b3340ec59779b860e008e80f0734f97

See more details on using hashes here.

File details

Details for the file email_checker_mv-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for email_checker_mv-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4ebf13fba01a8c0ceb8821c5282648eb0032e53cbd5824fded51496bf2c934c2
MD5 a77c7e9a8540dee94034c646b09438b2
BLAKE2b-256 3eda720021980d74bf9799f88964e87fedb8e35e2177cfd58bf427d6dc45200f

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