From f21931eb32a3aa9b686370b0340851017ff0a937 Mon Sep 17 00:00:00 2001 From: wizzdom Date: Mon, 14 Oct 2024 20:21:58 +0100 Subject: [PATCH] add initial mail config files --- jobs/services/mail/autodiscover.hcl | 86 ++++++++++ jobs/services/mail/mailserver.hcl | 236 ++++++++++++++++++++++++++++ jobs/services/mail/roundcube.hcl | 91 +++++++++++ 3 files changed, 413 insertions(+) create mode 100644 jobs/services/mail/autodiscover.hcl create mode 100644 jobs/services/mail/mailserver.hcl create mode 100644 jobs/services/mail/roundcube.hcl diff --git a/jobs/services/mail/autodiscover.hcl b/jobs/services/mail/autodiscover.hcl new file mode 100644 index 0000000..e6ef1e8 --- /dev/null +++ b/jobs/services/mail/autodiscover.hcl @@ -0,0 +1,86 @@ +job "autodiscover" { + datacenters = ["aperture"] + + type = "service" + + meta { + tld = "rb.dcu.ie" + mail = "mail.rb.dcu.ie" + } + + group "autodiscover" { + count = 1 + + network { + port "http" { + to = 8000 + } + } + + service { + name = "autodiscover" + port = "http" + + check { + type = "http" + path = "/" + interval = "10s" + timeout = "2s" + } + + tags = [ + "traefik.enable=true", + "traefik.http.routers.autodiscover.rule=Host(`autoconfig.${NOMAD_META_tld}`) || Host(`autodiscover.${NOMAD_META_tld}`)", + "traefik.http.routers.autodiscover.entrypoints=web,websecure", + "traefik.http.routers.autodiscover.tls.certresolver=lets-encrypt", + ] + } + + task "autodiscover" { + driver = "docker" + + config { + image = "monogramm/autodiscover-email-settings:latest" + ports = ["http"] + } + + template { + data = <