Checks whether a single email address is deliverable. Exits successfully if so.
To install:
$ go get github.com/ransford/vrf
Is [email protected] a deliverable email address?
$ vrf [email protected]
[email protected] is deliverable
$ vrf -quiet [email protected] && echo "yes"
yes
What about [email protected]?
$ vrf [email protected]
[email protected] is not deliverable
$ vrf -quiet [email protected] || echo "no"
no
vrf looks up the mail exchanger (MX) records for a given address, then
connects to the highest priority server in the list and goes partway through
the process of delivering an email messsage. Essentially:
> Client: Hello `domain.com` mail server!
> Server: Hello!
> Client: I have email for user `[email protected]`.
> Server: Sure, I'll accept it. ***OR*** Sorry, no such address.
> Client: Never mind.
> Server: Fine, whatever.
> Client: Bye!
> Server: Bye.
Technically speaking, vrf disconnects (politely, with RSET) after MAIL.