umuterturk/email-verifier
umuterturk/email-verifier has 621 GitHub stars and 99 forks. GitHot measured +2 stars in 24 hours. Last checked 2026-11-19 23:45 UTC. Last push 2026-10-02.
What you can do
- ✅ Syntax validation
- 🌐 Domain existence check
- 📨 MX record validation
- 🚫 Disposable email detection
Gemessener Sternzuwachs
- in 24h
- +2
- in 7 days
- Verlauf wird gesammelt
- in 15 days
- Verlauf wird gesammelt
- in 1 month
- Verlauf wird gesammelt
Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.
Über uns
Privacy-first, Free, Open Source email verifier
SicherheitREADME.md
OriginalEmail Validator
Privacy-first, free, open-source email validation API. It checks syntax, DNS/MX, disposable domains, and role addresses. It does not confirm that a specific inbox exists. Addresses are not stored. MIT licensed.
🌐 Website: https://rapid-email-verifier.fly.dev/
🚀 API https://rapid-email-verifier.fly.dev/api/validate
No account and no usage limits. Batch validation accepts up to 100 addresses. GDPR, CCPA, and PIPEDA: addresses are processed in memory and not saved.
What we check
- Syntax
- Domain and MX records (the provider can accept mail)
- Known disposable domains
- Role addresses (
admin@,info@, and similar) - Alias normalization for major providers (Gmail, Yahoo, Outlook/Hotmail)
- Typo suggestions
- A derived score and status
What we don't check
- SMTP
RCPT TO, or any mailbox handshake - Whether a specific mailbox or inbox exists
- Catch-all domains
- Whether a message will bounce
Why we don't check SMTP
SMTP RCPT TO asks a mail server whether it will accept one address. That reply does not prove the mailbox exists:
- Major providers such as Gmail, Outlook, and Yahoo answer in ways that hide whether the inbox is real, so addresses cannot be harvested.
- Catch-all domains accept every local-part, so a positive reply still does not mean that inbox exists.
- Many servers block or throttle automated SMTP connections, so the check fails or lies.
- Each address needs its own live connection to a mail server. That is too slow for this API.
A yes would look like inbox verification and still be wrong. This API never opens an SMTP session, and that check will not be added.
Why an email's existence can't be known for certain
No check can say with certainty that a specific mailbox exists.
- Syntax only says the address is well formed.
- DNS and MX only say the domain can accept mail. They say nothing about the local-part.
- There is no public directory of real mailboxes.
- SMTP
RCPT TO, even when someone runs it, is not certain either. Providers hide existence, catch-all domains accept every address, and servers block or mislead automated probes. - An address such as
[email protected]can pass syntax and MX checks here and still not be a real inbox.
The reliable confirmation is double opt-in: send a link and require a click.
VALID means the address is syntactically valid, the domain has usable MX, and it is not a known disposable address. It does not mean an inbox exists.
mailbox_exists is true when the email provider (domain MX) can accept mail. The service sets it from the MX check, so it matches mx_records. It does not prove the local-part mailbox exists. A domain with only an A record (RFC 5321 fallback) can have domain_exists: true and mailbox_exists: false.
Features
- ✅ Syntax validation
- 🌐 Domain existence check
- 📨 MX record validation
- 🚫 Disposable email detection
- 👥 Role-based email detection
- 🔍 Email alias detection for major providers (Gmail, Yahoo, Outlook/Hotmail)
- ✍️ Typo suggestions
- 📊 Real-time monitoring
- 🔄 Batch processing support with domain-level optimizations
Validation Examples
Note on Validation Approach: While email RFCs (5321, 5322) define extensive rules for valid email formats, many of these rules are not practically enforced by modern email servers. Our validation takes a practical approach, focusing on rules that are actually enforced by major email providers. For example, we don't support quoted strings in local parts (
"john doe"@example.com) even though they're technically valid according to RFC, as they're rarely supported in practice and often cause issues.
Valid Email Formats
// Standard email
// mailbox_exists matches mx_records. It means the provider can accept mail, not that this inbox exists.
{
"email": "[email protected]",
"validations": {
"syntax": true,
"domain_exists": true,
"mx_records": true,
"mailbox_exists": true
},
"status": "VALID"
}
// Email with plus addressing
{
"email": "[email protected]",
"validations": {
"syntax": true,
"domain_exists": true,
"mx_records": true
},
"status": "VALID"
}
// International email (Unicode)
{
"email": "用户@例子.广告",
"validations": {
"syntax": true,
"domain_exists": true,
"mx_records": true
},
"status": "VALID"
}
// Hindi characters
{
"email": "अजय@डाटा.भारत",
"validations": {
"syntax": true,
"domain_exists": true,
"mx_records": true
},
"status": "VALID"
}
Invalid Email Formats
// Missing @ symbol
{
"email": "invalid-email",
"validations": {
"syntax": false
},
"status": "INVALID_FORMAT"
}
// Double dots in local part
{
"email": "[email protected]",
"validations": {
"syntax": false
},
"status": "INVALID_FORMAT"
}
// Spaces in quotes (not supported)
{
"email": "\"john doe\"@example.com",
"validations": {
"syntax": false
},
"status": "INVALID_FORMAT"
}
// Multiple @ symbols
{
"email": "user@[email protected]",
"validations": {
"syntax": false
},
"status": "INVALID_FORMAT"
}
Special Cases
// Disposable email detection
{
"email": "[email protected]",
"validations": {
"syntax": true,
"domain_exists": true,
"mx_records": true,
"is_disposable": true
},
"status": "DISPOSABLE"
}
// Role-based email detection
// is_role_based is a flag. Status stays VALID when syntax and MX pass and the address is not disposable.
{
"email": "[email protected]",
"validations": {
"syntax": true,
"domain_exists": true,
"mx_records": true,
"mailbox_exists": true,
"is_role_based": true
},
"status": "VALID"
}
// Email alias detection
{
"email": "[email protected]",
"validations": {
"syntax": true,
"domain_exists": true,
"mx_records": true
},
"status": "VALID",
"aliasOf": "[email protected]"
}
Batch Validation
// Request
POST /api/validate/batch
{
"emails": [
"[email protected]",
"invalid-email",
"[email protected]",
"[email protected]"
]
}
// Response
{
"results": [
{
"email": "[email protected]",
"validations": {
"syntax": true,
"domain_exists": true,
"mx_records": true
},
"status": "VALID"
},
{
"email": "invalid-email",
"validations": {
"syntax": false
},
"status": "INVALID_FORMAT"
},
{
"email": "[email protected]",
"validations": {
"syntax": true,
"domain_exists": false
},
"status": "INVALID_DOMAIN"
},
{
"email": "[email protected]",
"validations": {
"syntax": true,
"domain_exists": true,
"mx_records": true,
"mailbox_exists": true,
"is_role_based": true
},
"status": "VALID"
}
]
}
Email Alias Detection
The service can detect email aliases for major email providers and identify the canonical form of the email address.
Supported Providers and Alias Formats
| Provider | Alias Format | Example | Canonical Form |
|---|---|---|---|
| Gmail | Dots in local part | [email protected] |
[email protected] |
| Gmail | Plus addressing | [email protected] |
[email protected] |
| Yahoo | Hyphen addressing | [email protected] |
[email protected] |
| Outlook/Hotmail | Plus addressing | [email protected] |
[email protected] |
How It Works
When an email is validated, the service checks if it's an alias for a supported provider. If it is, the aliasOf field in the response will contain the canonical form of the email address.
{
"email": "[email protected]",
"validations": {
"syntax": true,
"domain_exists": true,
"mx_records": true
},
"status": "VALID",
"aliasOf": "[email protected]"
}
Batch Processing Optimizations
The service optimizes batch email validation by grouping emails by domain to avoid redundant domain checks. This significantly reduces network calls and resource usage:
- Emails are grouped by domain before validation
- Domain validations (existence, MX, disposable) are performed once per unique domain
- The cached domain results are applied to all emails with the same domain
- Original order and response accuracy are preserved
This optimization is particularly effective for large batches with common domains, reducing domain checks from O(n) to O(unique domains).
Tech Stack
- Go 1.21+
- Redis (caching, only for domains, not email addresses)
- Prometheus (metrics)
- Grafana (monitoring)
- Docker & Docker Compose
Prerequisites
- Go 1.21 or higher
- Docker and Docker Compose
- Git
- VSCode (recommended)
Development Environment Setup
1. Install Go
macOS
# Using Homebrew
brew install go
# Verify installation
go version # Should show go version 1.21 or higher
Linux (Ubuntu/Debian)
# Add Go repository
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt update
# Install Go
sudo apt install golang-go
# Verify installation
go version
Windows
- Download the installer from Go Downloads
- Run the installer
- Open Command Prompt and verify:
go version
2. Configure Go Environment
Add these to your shell profile (~/.bashrc, ~/.zshrc, etc.):
# Go environment variables
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
Reload your shell or run:
source ~/.bashrc # or ~/.zshrc
3. Install Docker
macOS
- Download Docker Desktop for Mac
- Install and start Docker Desktop
- Verify installation:
docker --version
docker-compose --version
Linux
# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Install Docker Compose
sudo apt install docker-compose
# Start Docker
sudo systemctl start docker
# Add your user to docker group (optional)
sudo usermod -aG docker $USER
# Verify installation
docker --version
docker-compose --version
Windows
- Download and install Docker Desktop for Windows
- Enable WSL 2 if prompted
- Start Docker Desktop
- Verify in Command Prompt:
docker --version
docker-compose --version
4. VSCode Setup
Install VSCode
- Download from Visual Studio Code
- Install for your platform
Install Required Extensions
# Essential Extensions - Go (by Go Team at Google) - Docker (by Microsoft) - GitLens (by GitKraken) - Remote Development (by Microsoft) # Recommended Extensions - Error Lens - Go Test Explorer - YAML - Markdown All in OneConfigure Go Extension After installing the Go extension:
- Open Command Palette (Cmd/Ctrl + Shift + P)
- Type "Go: Install/Update Tools"
- Select all tools and click OK
This will install:
- gopls (Go language server)
- dlv (debugger)
- golangci-lint (linter)
- goimports (code formatter)
- and other essential Go tools
VSCode Settings Create or update
.vscode/settings.json:{ "go.useLanguageServer": true, "go.lintTool": "golangci-lint", "go.lintFlags": ["--fast"], "editor.formatOnSave": true, "[go]": { "editor.defaultFormatter": "golang.go", "editor.codeActionsOnSave": { "source.organizeImports": true } } }Debugging Setup Create
.vscode/launch.json:{ "version": "0.2.0", "configurations": [ { "name": "Launch Email Validator", "type": "go", "request": "launch", "mode": "auto", "program": "${workspaceFolder}", "env": {}, "args": [] } ] }
5. Install Additional Tools
# Install golangci-lint
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
# Install air for hot reload (optional)
go install github.com/cosmtrek/air@latest
# Install mockgen for testing
go install github.com/golang/mock/mockgen@latest
Setup
- Clone the Repository
git clone https://github.com/umuterturk/email-verifier.git
cd email-verifier
- Install Dependencies
go mod tidy
- Start Monitoring Stack
docker-compose up -d
- Build and Run the Service
go build
./emailvalidator
The service will be available at:
- API: http://localhost:8080
- Metrics: http://localhost:8080/metrics
- Grafana: http://localhost:3000 (admin/admin)
- Prometheus: http://localhost:9090
Development
Project Structure
.
├── cmd/ # Command line tools
├── internal/
│ ├── api/ # HTTP handlers
│ ├── middleware/ # HTTP middleware components
│ ├── model/ # Data models
│ ├── repository/ # Data access layer
│ └── service/ # Business logic
│ ├── email_service.go # Core email validation service
│ ├── batch_validation_service.go # Batch processing with domain optimizations
│ ├── domain_validation_service.go # Domain validation with concurrency
│ └── interfaces.go # Service interfaces for DI
├── pkg/
│ ├── validator/ # Email validation logic
│ │ ├── email.go # Email syntax and validation
│ │ ├── domain.go # Domain validation
│ │ ├── role.go # Role-based email detection
│ │ ├── disposable.go # Disposable email detection
│ │ └── alias_detector.go # Email alias detection
│ ├── monitoring/ # Metrics and monitoring
│ └── cache/ # Caching implementation
├── test/ # Unit, integration and acceptance tests
└── config/ # Configuration files
Service Architecture
The service follows a layered architecture with dependency injection for testability:
API Layer: HTTP handlers for REST endpoints
- Validates request data
- Translates to/from service layer models
- Implements rate limiting and authentication
Service Layer: Core business logic
EmailService: Main validation serviceBatchValidationService: Optimized batch processing with domain groupingDomainValidationService: Concurrent domain validation- Uses interfaces for dependency injection
Validation Layer: Email validation logic
- Syntax validation
- Domain validation
- Role-based detection
- Disposable email detection
- Email alias detection
Repository Layer: Data access
- Cache implementation
- External API clients
Running Tests
- Run All Tests (excluding load tests)
go test ./... -v -skip "Load"
- Run Tests with Race Detection
go test -race ./... -skip "Load"
Race detection is crucial for identifying potential data races in concurrent code. It's automatically run in CI/CD pipelines and should be run locally before submitting changes.
Common race conditions to watch for:
- Concurrent map access
- Shared variable access without proper synchronization
- Channel operations
- Goroutine lifecycle management
- Run Load Tests
go test ./test/load_test.go -v
Code Quality
- Run Linter
golangci-lint run
- Format Code
go fmt ./...
- Check for Common Mistakes
go vet ./...
Continuous Integration
The project uses GitHub Actions for CI/CD with the following checks:
- Unit tests with race detection
- Integration tests
- Acceptance tests
- Code linting
- Code formatting
- Security scanning
- Dependency updates
All these checks must pass before code can be merged into the main branch.
Testing
The project includes several types of tests:
API Testing Script
# Run the comprehensive API test suite
./test_api.sh
Limitations
This API does not check whether a specific mailbox exists, and no check can know that with certainty. Syntax and MX only show that the address is well formed and that the domain can accept mail. There is no public directory of real mailboxes. SMTP RCPT TO is not used, and would not settle it anyway: providers hide existence, catch-all domains accept every address, servers block automated probes, and a live SMTP connection per address is too slow. That check will not be added.
It does not:
- Open an SMTP session or send
RCPT TO - Prove that a local-part such as
[email protected]is a real inbox - Detect catch-all domains
- Predict bounces or delivery
mailbox_exists is true only when the domain has usable MX records. That means the email provider can accept mail for the domain. The field is assigned from the MX check and matches mx_records. It is not an inbox-existence result.
VALID means syntax passed, the domain has usable MX, and the address is not a known disposable. It is not a statement that the inbox exists or that mail will be delivered.
DNS answers change, lookups fail, and providers differ on which syntax they accept. Treat results as a best-effort signal. The reliable way to confirm someone controls an address is double opt-in: send a link and require a click.
Accuracy disclaimer
Results are best-effort and should be treated as a signal, not absolute truth. Several factors can affect them:
- Domain DNS records may change
- Temporary DNS resolution issues
- Network connectivity problems
- Rate limiting by DNS resolvers
- Syntax rules that differ between providers
Legal disclaimer
This service is provided "as is" without any warranties or guarantees of any kind, either express or implied. The validation results are for informational purposes only and should not be considered legally binding or definitive. We expressly disclaim any liability for damages of any kind arising from the use of this service or its results. Users are solely responsible for confirming email addresses through additional means before using them for any purpose.
Using Docker
Docker Hub Image
You can use the pre-built Docker image directly from Docker Hub:
# Pull the latest image
docker pull umutert/emailvalidator:latest
# Run the container
docker run -p 8080:8080 umutert/emailvalidator:latest
For detailed instructions on setting up automated Docker image deployment, see Docker Deployment Guide.
Docker Compose
To run the full stack with Redis, Prometheus, and Grafana:
# Pull and start all services
docker-compose up -d
This will start the email validation service along with:
- Redis for caching
- Prometheus for metrics collection
- Grafana for visualization (accessible at http://localhost:3000)
Environment Variables
The Docker image supports the following environment variables:
| Variable | Default | Description |
|---|---|---|
| PORT | 8080 | The port on which the service will listen |
| PROMETHEUS_ENABLED | false | Enable Prometheus metrics |
| REDIS_URL | Redis connection URL (format: redis://host:port) |