Helm chartv2.4.1App 1.2.3Verified publisher

exim based smtp smarthost / mail relay

About this chart

smtp

This chart installs an smtp daemon in kubernetes to work as a mail relay.

The recommended approach is to configure it with authentication to a mail service and then from other applications within the cluster (or namespace) send mail to this relay.

Configuration

Add a config: key to your values.yaml override (or helm --set parameters) with the necessary values (without the # prefix for the values you set):

config:
  # See documentation at https://gitlab.com/egos-tech/smtp#readme
  #SMARTHOST_ADDRESS: mail.example.com
  #SMARTHOST_PORT: "587"
  #SMARTHOST_USER: myuser
  #SMARTHOST_PASSWORD: secret
  #SMARTHOST_ALIASES: "*.example.com"

  # colon separated, must start with : !
  RELAY_NETWORKS: :10.42.0.0/16

One quirk is that for authentication to work, the name of the mail server in SMARTHOST_ADDRESS has to be covered/included in the SMARTHOST_ALIASES setting.

You can also use Gmail or Amazon SES with just a couple of configuration values as described in the egos-tech/smtp documentation.

Deploy smtp with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has smtp on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartsmtp is pinned at v2.4.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply