Simple validation HTTP-service
It's a simple HTTP validation service, with one available route /email/validate
. Which validates the email via POST
request
$ docker run -t -p 8080:8080 -e PORT=8080 markelog/validate
POST /email/validate
$ curl -i -XPOST -d '{"email":"markelog@gmail.com"}' http://localhost:8080/email/validate
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Vary: Origin
Date: Mon, 24 Feb 2020 12:18:58 GMT
Content-Length: 150
{"valid":true,"validators":{"dmarc":{"valid":true},"domain":{"valid":true},"regexp":{"valid":true},"reputation":{"valid":true},"smtp":{"valid":true}}}
regexp
– checks the syntax of the provided emaildmarc
– checks DMARC related presence in the domain DNSdomain
– checks if email domain existsmtp
– establishes connection to the SMTP service, sendsRCPT TO
request thus checking if such email address existreputation
– checks the reputation of the email via https://emailrep.io/.- Note: Amount of request from one IP-address is limited, it's better to provide the key (see
/.env.example
). If limit is exceed, response fromemailrep.io
will not be present in the response
- Note: Amount of request from one IP-address is limited, it's better to provide the key (see
make install
– installs stuffmake dev
– starts the server and watches changesmake unit-tests
– executes unit-testsmake integrations-tests
– executes integration-testsmake test
– executes unit and integration testsmake lint
– lint sources via multiple linters