outbound-smtp

by DevHat

Helm chartv0.1.0App 2.0.0Verified publisher

Outbound-only SMTP relay with DKIM signing

About this chart

outbound-smtp

Outbound-only SMTP relay with DKIM signing

Maintainers

NameEmailUrl
vukomir[email protected]https://github.com/vukomir

Source Code

Requirements

Kubernetes: >=1.25.0-0

Values

KeyTypeDefaultDescription
acme.agreeTOSboolfalseACME_AGREE_TOS: must be true with ACME; you accept the CA's terms of service
acme.challengestring"http"ACME_CHALLENGE: http (needs port 80 of every name to reach the pod) or dns
acme.directoryURLstring""ACME_DIRECTORY_URL (empty = Let's Encrypt production; use staging while testing)
acme.dnsProviderstring""ACME_DNS_PROVIDER for DNS-01: cloudflare, hetzner or cpanel
acme.domainslist[]ACME_DOMAINS: certificate names (defaults to config.hostname)
acme.emailstring""ACME_EMAIL: optional contact address
acme.enabledboolfalseObtain the certificate from Let's Encrypt instead of tls (stored under /data/acme)
acme.existingSecretstring""Existing Secret with the DNS provider credentials as env vars (CLOUDFLARE_DNS_API_TOKEN, HETZNER_API_TOKEN, or CPANEL_USERNAME/CPANEL_TOKEN/CPANEL_BASE_URL)
acme.httpPortint80Service port for the HTTP-01 challenge (container listens on 8080)
affinityobject{}Affinity
config.enablePort25boolfalseSMTP_ENABLE_PORT25: enable plain SMTP for trusted networks
config.hostnamestring""Required. SMTP_HOSTNAME: name used in EHLO; must match the PTR record of the sending IP
config.logLevelstring"info"LOG_LEVEL: debug, info, warn or error
config.logRecipientsboolfalseLOG_RECIPIENTS: also log full recipient addresses (personal data)
config.maxMessageSizestring"25MB"MAX_MESSAGE_SIZE: largest accepted message
config.port25StartTLSbooltrueSMTP_PORT25_STARTTLS: offer STARTTLS on port 25
config.queueMaxAgestring"72h"QUEUE_MAX_AGE: queue lifetime before a message bounces
envobject{}Any other environment variable the relay reads, keyed by name (e.g. DELIVERY_CONCURRENCY: "20", OTEL_EXPORTER_OTLP_ENDPOINT). Values are quoted.
envFromlist[]Extra envFrom sources (ConfigMaps or Secrets)
extraVolumeMountslist[]Extra volume mounts
extraVolumeslist[]Extra volumes
fullnameOverridestring""Override the full resource name
image.digeststring""Image digest (sha256:...); wins over tag when set
image.pullPolicystring"IfNotPresent"Image pull policy
image.repositorystring"ghcr.io/devhatro/outbound-smtp"Image repository
image.tagstring""Image tag (defaults to the chart appVersion)
imagePullSecretslist[]Image pull secrets
metrics.serviceMonitor.enabledboolfalseCreate a Prometheus Operator ServiceMonitor for the metrics Service (port 9090, never exposed publicly)
metrics.serviceMonitor.intervalstring"30s"Scrape interval
metrics.serviceMonitor.labelsobject{}Extra ServiceMonitor labels (e.g. for the Prometheus selector)
nameOverridestring""Override the chart name
nodeSelectorobject{}Node selector
persistence.accessModestring"ReadWriteOnce"Access mode
persistence.annotationsobject{}PVC annotations
persistence.enabledbooltruePersist /data (SQLite queue, domains, DKIM keys, users). Without it everything is lost on pod restart.
persistence.sizestring"1Gi"Volume size
persistence.storageClassstring""Storage class (empty = cluster default)
podAnnotationsobject{}Pod annotations
podLabelsobject{}Extra pod labels
podSecurityContextobject{"fsGroup":10001,"fsGroupChangePolicy":"OnRootMismatch","runAsGroup":10001,"runAsNonRoot":true,"runAsUser":10001,"seccompProfile":{"type":"RuntimeDefault"}}Pod security context. The image runs as uid/gid 10001; fsGroup makes the data volume writable.
probesobject{"liveness":{"failureThreshold":3,"httpGet":{"path":"/healthz","port":"metrics"},"periodSeconds":30,"timeoutSeconds":5},"readiness":{"failureThreshold":3,"httpGet":{"path":"/healthz","port":"metrics"},"periodSeconds":10,"timeoutSeconds":5},"startup":{"failureThreshold":60,"httpGet":{"path":"/healthz","port":"metrics"},"periodSeconds":5}}Startup, liveness and readiness probes. All use /healthz on the metrics port. The startup probe allows 5 minutes for a first ACME certificate to be issued.
resourcesobject{"limits":{"memory":"256Mi"},"requests":{"cpu":"50m","memory":"64Mi"}}Container resources
securityContextobject{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true}Container security context
service.annotationsobject{}Service annotations (e.g. load balancer settings)
service.externalTrafficPolicystring""Local keeps the client source IP; required if you trust networks (network add) for clients outside the cluster, otherwise the relay sees node addresses.
service.smtpPortint25Plain SMTP port for trusted networks, exposed only when config.enablePort25 is true (container listens on 8025)
service.smtpsPortint465Implicit TLS port (container listens on 8465)
service.submissionPortint587STARTTLS submission port (container listens on 8587)
service.typestring"ClusterIP"Service type for the SMTP ports. Use LoadBalancer to accept mail from outside the cluster.
serviceAccount.annotationsobject{}ServiceAccount annotations
serviceAccount.createbooltrueCreate a ServiceAccount
serviceAccount.namestring""ServiceAccount name (generated from fullname if empty)
smarthost.existingSecretstring""Existing Secret holding the smarthost password
smarthost.hoststring""SMARTHOST_HOST: send everything through this host instead of MX lookup
smarthost.passwordKeystring"password"Key in existingSecret holding the password
smarthost.portint587SMARTHOST_PORT: 465 uses implicit TLS, others STARTTLS
smarthost.usernamestring""SMARTHOST_USERNAME (requires existingSecret)
terminationGracePeriodSecondsint40Seconds to wait on shutdown; the relay gives open sessions and deliveries 30s
tls.existingSecretstring""Existing kubernetes.io/tls Secret (keys tls.crt, tls.key) for SMTP_HOSTNAME, e.g. from cert-manager. Renewals are picked up without a restart.
tls.selfSignedboolfalseGenerate a self-signed certificate. For testing only: clients will not trust it.
tolerationslist[]Tolerations

Autogenerated from chart metadata using helm-docs v1.14.2

Deploy outbound-smtp with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has outbound-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 chartoutbound-smtp is pinned at v0.1.0 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