Skip to content

Hrid-a/mailgo

Repository files navigation

mailgo

mailgo is a Go CLI tool that verifies whether an email address is deliverable by running syntax checks and a live SMTP handshake — giving you a clear verdict before you send.

mailgo image visualization


Motivation

A friend of mine sends cold emails — a lot of them. He kept running into the same problem: a chunk of every list he built was dead weight — bad addresses, catch-all domains that silently swallow messages, and disposable inboxes that go nowhere. He was burning his sender reputation on addresses that were never going to convert.

I looked around for a simple tool he could run from the terminal before importing a list into his outreach tool. Everything I found was either a paid SaaS, a bloated library, or it only checked syntax. So I built mailgo: a single binary that does a real end-to-end check — SMTP handshake, catch-all detection, the works — and tells you exactly why an address is risky or undeliverable.


How It Works

For every email address, mailgo runs a three-stage pipeline:

Stage Check What It Catches
1 Syntax validation Malformed addresses
2 SMTP handshake Mailboxes that don't exist
3 Catch-all detection Servers that accept everything (unreliable)

Every address gets one of four verdicts: deliverable · undeliverable · risky · unknown


Quick Start

macOS — Homebrew

brew tap Hrid-a/mailgo
brew install mailgo

Windows — Scoop

scoop bucket add mailgo https://github.com/Hrid-a/scoop-mailgo.git
scoop install mailgo

Linux — install script

curl -fsSL https://raw.githubusercontent.com/Hrid-a/mailgo/master/install.sh | sh

npm

npm install -g @mailgo-cli/mailgo

Go install

go install github.com/Hrid-a/mailgo@latest

Pre-built binary

Download the archive for your platform from the Releases page, extract it, and place the binary on your PATH.

Verify it works

mailgo verify user@example.com

Usage

Flags

Flag Description
--json Output results as JSON instead of plain text
--output, -o Write results to a file (e.g. results.json)

Single address

$ mailgo verify someone@company.com

Email       : someone@company.com
Domain      : company.com
Valid       : true
Status      : deliverable
Host Exists : true
Catch-All   : false
Deliverable : true
Full Inbox  : false
Disabled    : false

JSON output

$ mailgo verify someone@company.com --json
{
  "email": "someone@company.com",
  "domain": "company.com",
  "valid": true,
  "status": "deliverable",
  "smtp": {
    "host_exists": true,
    "catch_all": false,
    "deliverable": true,
    "full_inbox": false,
    "disabled": false
  }
}

Bulk verification

Put one email per line in a .txt file, then:

$ mailgo verify --file emails.txt --output results.json

Results are written to results.json, one JSON object per address.

Verdicts

Verdict Meaning
deliverable Mailbox exists and should receive mail
undeliverable Bad syntax or SMTP rejected the address
risky SMTP connected but RCPT TO was rejected — may be anti-harvesting policy, not a dead address
unknown Catch-all domain or SMTP unreachable — can't confirm either way

Contributing

Clone the repo

git clone https://github.com/Hrid-a/mailgo.git
cd mailgo

Build the binary

go build -o mailgo .

Run the tests

go test ./...

Submit a pull request

Fork the repository and open a pull request to the main branch. If you hit a mail server that produces a false positive or unexpected result, opening an issue with the domain (redacted if needed) is also very helpful.


License

MIT

About

mailgo lets you verify email addresses before you send , catching bad syntax, unreachable mailboxes, and catch-all domains via a live SMTP check.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors