Production-Grade Email Validation Setup
This document outlines the complete deployment process for Cleanmails on a fresh VPS. Configure a secure, reputation-safe, containerized email validation node with HTTPS and proper SMTP alignment.
Deploy in minutes using CleanieAI 🤖
Stuck with an error? Our AI assistant knows exactly how to fix deployment issues. Get your dashboard live effortlessly.
Launch AI AssistantPre-Flight Checklist
Infrastructure Requirements
- VPS OS: Ubuntu 22.04 or Debian 11+
- Network: Dedicated Public IPv4
- Port 25: Outbound Port 25 must be unblocked
- DNS: Ability to configure Reverse DNS (PTR)
Domain Requirements
- Domain ownership confirmed
- DNS panel access (Cloudflare or equivalent)
- Gray Cloud enabled (Proxy disabled / DNS-only mode)
📝 Note on Source Code
Check that your private GitHub repository is created and your production-ready source code is committed with a verified docker-compose.yml.Infrastructure Reputation Setup
2.1 Validate Outbound Port 25
Ensure your VPS can communicate with external SMTP servers. Run this command on your VPS:
telnet gmail-smtp-in.l.google.com 25
Expected Output: A "220" response from the Gmail SMTP server. If the connection fails, contact your VPS provider to request outbound Port 25 unblocking.
2.2 Configure Reverse DNS (PTR Record)
In your VPS dashboard (Networking settings), set the Reverse DNS / PTR hostname to:
verify.yourdomain.com
🚨 Mandatory Alignment
The A record must resolve to the VPS IP, and the PTR record must resolve back to the same hostname. Your SMTP HELO must match this hostname for 100% accuracy.Prepare Private Repository
Initialize and push your Cleanmails code to your private repository from your local machine:
git init
git add .
git commit -m "Deployment Ready"
git remote add origin https://github.com/USERNAME/cleanmails.git
git push -u origin main
Install Core Dependencies
Run these commands on your VPS to prepare the environment:
sudo apt update && sudo apt upgrade -y
sudo apt install docker.io docker-compose git -y
sudo systemctl start docker
sudo systemctl enable docker
💡 Pro Tip
Add your user to the docker group to run commands withoutsudo:
sudo usermod -aG docker $USER
Clone and Launch Application
Clone Repository
git clone https://github.com/USERNAME/cleanmails.git
cd cleanmails
Configure Environment
Edit your docker-compose.yml to match your setup:
# Inside docker-compose.yml
SMTP_HELO_NAME=verify.yourdomain.com
SMTP_FROM_EMAIL=scanner@yourdomain.com
Build and Start
sudo docker-compose up -d --build
Domain and HTTPS Configuration
6.1 DNS Setup
Create the following A Record in your DNS panel:
| Field | Value |
|---|---|
| Type | A Record |
| Name | verify |
| Value | YOUR_VPS_IP |
| Proxy Status | DNS Only (Gray Cloud) |
6.2 Install Nginx and SSL
sudo apt install nginx certbot python3-certbot-nginx -y
sudo certbot --nginx -d verify.yourdomain.com
First-Time Initialization
Open your browser and navigate to https://verify.yourdomain.com.
You will be prompted to create your Admin Account and Master Password. There is no password recovery mechanism — save these details securely.
Operational Commands
sudo docker-compose logs -f cleanmails
sudo docker-compose restart
Final Verification Checklist
- ✅ SSL Valid: HTTPS loads without security warnings.
- ✅ Auth Active: Dashboard requires login for access.
- ✅ DNS Matched: HELO matches Reverse DNS hostname.
- ✅ Port Lock: Direct access via IP:8080 is blocked by Nginx.