trumail

command module
v1.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2021 License: BSD-3-Clause Imports: 11 Imported by: 0

README

Trumail

Trumail is a simple email verification service.

How it Works

Verifying the deliverability of an email address isn't a very complicated process. In fact, the process Trumail takes to verify an address is really only half that of sending a standard email transmission and is outlined below...

First a TCP connection is formed with the MX server on port 25.

HELO my-domain.com              // We identify ourselves as my-domain.com (set via environment variable)
MAIL FROM: [email protected]     // Set the FROM address being our own
RCPT TO: [email protected] // Set the recipient and receive a (200, 500, etc..) from the server
QUIT                            // Cancel the transaction, we have all the info we need

As you can see we first form a tcp connection with the mail server on port 25. We then identify ourselves as example.com and set a reply-to email of [email protected] (both these are configured via the SOURCE_ADDR environment variable). The last, and obviously most important step in this process is the RCPT command. This is where, based on the response from the mail server, we are able to conclude the deliverability of a given email address. A 200 implies a valid inbox and anything else implies either an error with our connection to the mail server, or a problem with the address requested.

FC Trumail Service

Base URL: http://trumail.profoundis.com

The service is internal. Hence, it can be used only from an internal host or a VPN has to be used.

Endpoint

There is only 1 endpoint that supports json and XML

GET /v1/<fmt>/<email>
  • fmt - Format; supports json and xml
  • email - The email to be verified
Example
❯ curl http://trumail.profoundis.com/v1/json/[email protected] | jq
{
  "address": "[email protected]",
  "username": "chris",
  "domain": "fullcontact.com",
  "md5Hash": "777b051664a0f5504967ec8f93df2cff",
  "validFormat": true,
  "deliverable": true,
  "fullInbox": false,
  "hostExists": true,
  "catchAll": false,
  "disposable": false,
  "message": "OK",
  "errorDetails": ""
}

Build and Deployment

Current build and deployment process is as follows:

  1. Add a tag to the latest commit and push it to this repo.
  2. Create a new branch in devops repo and update this tag in Trumail Ansible configuration
  3. Run the Ansible Pact Jenkins Job with the below parameters:
  • sha1: The newly created devops repo branch name
  • IMAGE_BASE: bionic
  • image: drt-trumail/drt-trumail.json
  1. Once the build is complete, go to the build's console output and copy the ID of the AMI that has been created.
  2. Update the AMI ID in the Spinnaker AMI lookup script in devops repo and create a PR to merge this branch to the master branch of the devops repo.
  3. Once merged, start the manual execution of the pipeline for drttrumail application in spinnaker

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL