Skip to content

ransford/vrf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircleCI Go Report Card

vrf: An SMTP Address Verifier

Checks whether a single email address is deliverable. Exits successfully if so.

To install:

$ go get github.com/ransford/vrf

Is foo@bar.quux a deliverable email address?

$ vrf foo@bar.quux
foo@bar.quux is deliverable
$ vrf -quiet foo@bar.quux && echo "yes"
yes

What about oiwperwer@google.com?

$ vrf oiwperwer@google.com
oiwperwer@google.com is not deliverable
$ vrf -quiet oiwperwer@google.com || echo "no"
no

How it Works

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 `bob@domain.com`.
> 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.

About

SMTP address verifier in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages