Skip to content

australiangreens/kubernetes-postfix-relay-host

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kubernetes-postfix-relay-host

A SMTP relay host for transactional based emails from within a k8 cluster.

Overview

This repository contains Kubernetes config files and a docker image to easily set up a SMTP relay for services such as SendGrid.

Background

We needed a simple docker image that can be configured with env vars. Also, the functionality is easily overridded by providing an alternate init script.

Quickstart

Run on docker

docker run --rm -it -p 2525:25 \
	-e TX_SMTP_RELAY_HOST="smtp.sendgrid.net" \
	-e TX_SMTP_RELAY_PORT=25 \
	-e TX_SMTP_RELAY_MYHOSTNAME=tx-smtp-relay.yourhost.com \
	-e TX_SMTP_RELAY_USERNAME=username \
	-e TX_SMTP_RELAY_PASSWORD=password \
	applariat/tx-smtp-relay

Note that all parameters except TX_SMTP_RELAY_PORT are required. The default value for the port is 25.

Send a test message

telnet localhost 2525
220 tx-smtp-relay.yourhost.com ESMTP Postfix
helo localhost
250 tx-smtp-relay.yourhost.com
mail from: noreply@yourhost.com
250 2.1.0 Ok
rcpt to: chris@applariat.com
250 2.1.5 Ok
data
354 End data with .
Subject: What?
My hovercraft is full of eels.
.
250 2.0.0 Ok: queued as 982FF53C
quit
221 2.0.0 Bye
Connection closed by foreign host

About

A SMTP relay host for transactional based emails from within a cluster.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 90.0%
  • Dockerfile 10.0%