Batch and CLI email validator
Project description
๐ง Email Checker
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
pipormake
๐ 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 |
set_user_config KEY=VAL |
โ๏ธ Set a runtime config variable |
get_user_config |
๐งพ Show current user config values |
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 validatestatusโ 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
statuscolumn 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_batchrewrites the result to the "status" column in the output CSV file for each email.
โ๏ธ Configurable Variables
Starting from version 0.4.0, you can dynamically modify runtime configuration parameters via CLI, manage.sh, or Makefile.
Available Configuration Keys
| Variable | Description |
|---|---|
MAX_EMAILS_PER_RUN |
Maximum number of emails to process in one batch run |
SMTP_FROM |
Sender email used for SMTP HELO/EHLO |
SMTP_TIMEOUT |
Timeout for each SMTP connection (in seconds) |
USE_EHLO |
Use EHLO instead of HELO in SMTP handshake (true/false) |
EHLO_DOMAIN |
Custom domain for EHLO header |
USE_RANDOM_FROM |
Randomize sender email (true/false) |
CUSTOM_FROM_DOMAIN |
Domain used for random@domain.com when USE_RANDOM_FROM=true |
DEBUG |
Enable verbose debug output (true/false) |
These can be set using:
# CLI
set_user_config USE_EHLO=true
# manage.sh
./manage.sh -set_user_config USE_RANDOM_FROM=true
# Makefile
make set_user_config key=DEBUG=true
To view the current configuration:
# CLI
get_user_config
# manage.sh
./manage.sh -get_user_config
# Makefile
make get_user_config
๐ณ 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 -set_user_config KEY=VAL |
โ๏ธ Set a single user config parameter |
./manage.sh -get_user_config |
๐งพ Show current user config |
./manage.sh -help |
โน๏ธ Show this help message |
โ๏ธ Makefile Shortcuts
Use
make helpto 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 |
make set_user_config key=VAL |
โ๏ธ Set a single user config parameter |
make get_user_config |
๐งพ Show current user config |
./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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file email_checker_mv-0.4.0.tar.gz.
File metadata
- Download URL: email_checker_mv-0.4.0.tar.gz
- Upload date:
- Size: 640.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50bbbd00a14db441e739285f26fca49ef57829155bb239b63fb12970d7f1302e
|
|
| MD5 |
981a9d75ce89c3a50255fd168cf84d07
|
|
| BLAKE2b-256 |
a00b71dc99da8fb96880893ba03f60f8ccf77cce4bea033650a7b9d77c455e1e
|
File details
Details for the file email_checker_mv-0.4.0-py3-none-any.whl.
File metadata
- Download URL: email_checker_mv-0.4.0-py3-none-any.whl
- Upload date:
- Size: 640.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a5c2843d1ff2727b08de38ae1efa33f20d2722e97d00a204d3cef006222cfdf
|
|
| MD5 |
5d8f4a6e708b86c38a4a2083086f4754
|
|
| BLAKE2b-256 |
0c3097f2064606fc8f06fa5ac9484889c5eb124b31497f48c2a4421b6d14b59d
|