Git Product home page Git Product logo

smtp-relay's Introduction

smtp-relay

Simple HTTP API to relay messages to SMTP servers.

Installation

Install deps:

$ make deps

Install the following command-line tools:

  • gcloud is used to create and delete Kubernetes Engine clusters. gcloud is included in the Google Cloud SDK.
  • kubectl is used to manage Kubernetes, the cluster orchestration system used by Kubernetes Engine. You can install kubectl using gcloud:
$ gcloud components install kubectl

Set some defaults:

gcloud config set project crowdstart-us
gcloud config set compute/zone us-central1-b

Usage

$ make run

You can test the server is running by sending an email payload to it:

$ curl -i --user user:pass -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"username":"foo", "password":"asdf", "host":"", "port":"","mailfrom":"","mailto":[],"msg":""}' https://smtp-relay.hanzo.ai

Deployment

Create cluster named smtp-relay with 2 nodes:

$ gcloud container clusters create smtp-relay --num-nodes=2
Creating cluster smtp-relay...done.                                                                    Created [https://container.googleapis.com/v1/projects/crowdstart-us/zones/us-central1-b/clusters/smtp-relay].
kubeconfig entry generated for smtp-relay.
NAME        ZONE           MASTER_VERSION  MASTER_IP       MACHINE_TYPE   NODE_VERSION  NUM_NODES  STATUS
smtp-relay  us-central1-b  1.7.8-gke.0     35.202.117.238  n1-standard-1  1.7.8-gke.0   2          RUNNING

You can list clusters for in your project or get the details for a single cluster using the following commands:

$ gcloud container clusters list
$ gcloud container clusters describe smtp-relay

To create a deployment:

$ kubectl create -f deployment.yaml

Verify the three replicas are running by querying the list of the labels that identify the web frontend:

kubectl get pods -l app=smtp-relay

smtp-relay's People

Contributors

zeekay avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.