This commit is contained in:
Daniel Berteaud 2023-12-21 23:22:39 +01:00
parent 9e6ae0655a
commit b873920b6d
3 changed files with 10 additions and 10 deletions

View File

@ -1 +1 @@
[[ template "common/mv_conf.sh.tpl" dict "ctx" . "services" (dict "smtp-relay" .mail.relay.instance) ]]
[[ template "common/mv_conf.sh" dict "ctx" . "services" (dict "smtp-relay" .instance) ]]

View File

@ -1,6 +1,6 @@
[[ $c := merge .mail.relay . -]]
job [[ .mail.relay.instance | toJSON ]] {
job [[ .instance | toJSON ]] {
[[ template "common/job_start.tpl" $c ]]
@ -21,7 +21,7 @@ job [[ .mail.relay.instance | toJSON ]] {
}
service {
name = "[[ .mail.relay.instance ]][[ .consul.suffix ]]"
name = "[[ .instance ]][[ .consul.suffix ]]"
port = 8025
[[ template "common/connect.tpl" $c ]]
@ -35,13 +35,13 @@ job [[ .mail.relay.instance | toJSON ]] {
}
vault {
policies = ["[[ .mail.relay.instance ]][[ .consul.suffix ]]"]
policies = ["[[ .instance ]][[ .consul.suffix ]]"]
env = false
disable_file = true
}
env {
HOSTNAME = "[[ .mail.relay.instance ]].service.[[ .consul.domain ]]"
HOSTNAME = "[[ .instance ]].service.[[ .consul.domain ]]"
LOCAL_DOMAINS = ""
RELAY_FROM_HOSTS = "127.0.0.1"
DISABLE_SENDER_VERIFICATION = "true"

View File

@ -1,12 +1,12 @@
---
# The Nomad job name
instance: smtp-relay
mail:
relay:
# The Nomad job name
instance: smtp-relay
# The image to use
image: danielberteaud/exim-relay:23.12-1
image: '[[ .docker.repo ]]exim-relay:23.12-1'
# Number of instances to run
count: 1
@ -24,7 +24,7 @@ mail:
port: 587
tls: True
user: smtp@example.org
password: '{{ with secret "[[ .vault.prefix ]]kv/service/[[ .mail.relay.instance ]]" }}{{ .Data.data.pwd }}{{ end }}'
password: '{{ with secret "[[ .vault.prefix ]]kv/service/[[ .instance ]]" }}{{ .Data.data.pwd }}{{ end }}'
# The volume to use for /var/spool/postfix
volume: