For advanced users, Hackus Mail Checker can run as a daemon:
sudo python3 api_server.py --port 8080
You can then send JSON POST requests to http://localhost:8080/check to validate emails on the fly from a PHP or Node.js application.
Before installing, ensure you have the following:
Create a file called emails.txt with one email per line:
john@example.com
jane@example.com
support@example.com
Then run:
python3 mailchecker.py --list emails.txt --output valid.txt
Valid addresses will be saved to valid.txt.
If you are attempting a "hackus mail checker install" on a vanilla system, you will fail without these dependencies.
Modern email providers (Google Workspace, Microsoft 365, ProtonMail) often block SMTP VRFY and EXPN commands. Hackus Mail Checker may return UNKNOWN for these domains. To improve success:
Create a configuration file so you don't have to re-enter flags every time.
sudo nano config.ini
Paste the following base configuration:
[Settings]
timeout = 5
verbose = false
disposable_check = true
mx_check = true
output_file = validated_emails.txt
Save and exit (Ctrl+O, Ctrl+X in nano).
We will install Hackus Mail Checker from its official GitHub repository.