diff --git a/docs/ci.md b/docs/ci.md index f80601a5..2584d4f2 100644 --- a/docs/ci.md +++ b/docs/ci.md @@ -19,7 +19,8 @@ The project includes a `.gitlab-ci.yml` that allows you to execute the deploymen When starting the pipeline through the GitLab UI, you will be queried for some variables plus the following ones: - `DOMAIN` = The domain to deploy to. -- `MAIL_DOMAIN` = The mail domain to use. +- `MAIL_DOMAIN` = (optional) Specify domain (f.e. root FQDN) for Mail, defaults to `DOMAIN`. +- `SYNAPSE_DOMAIN` = (optional) Specify domain (f.e. root FQDN) for Synapse, defaults to `DOMAIN`. - `NAMESPACE`: Defines into which namespace of your K8s cluster openDesk will be installed - `MASTER_PASSWORD_WEB_VAR`: Overwrites value of `MASTER_PASSWORD` diff --git a/docs/getting-started.md b/docs/getting-started.md index b2a0d91a..efa7e1ca 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -77,18 +77,27 @@ or via environment variable export DOMAIN=my.open.desk ``` -If the mail domain differs from the domain, the mail -domain has to be set either via `dev` environment +Additionally, you can announce/specify an alternative Domain for mail and chat. + +As example, your domain is `acme.tld` and you want to send mails with this domain, then you can deploy openDesk to +`*.opendesk.acme.tld` and send mail as `default.user@acme.tld`. +Webmail will be accessed via `mail.opendesk.acme.tld` in this scenario. +The required routing have to be implemented by yourself. +Users + +The alternative domains have to be set either via `dev` environment ```yaml global: - mail_domain: "open.desk" + mailDomain: "open.desk" + synapseDomain: "open.desk" ``` or via environment variable ```shell export MAIL_DOMAIN=open.desk +export SYNAPSE_DOMAIN=open.desk ``` ### Apps diff --git a/helmfile/apps/element/values-matrix-neodatefix-widget.yaml.gotmpl b/helmfile/apps/element/values-matrix-neodatefix-widget.yaml.gotmpl index 79fc0c10..2d8964f4 100644 --- a/helmfile/apps/element/values-matrix-neodatefix-widget.yaml.gotmpl +++ b/helmfile/apps/element/values-matrix-neodatefix-widget.yaml.gotmpl @@ -4,6 +4,7 @@ configuration: bot: username: "meetings-bot" + homeserver: {{ .Values.global.synapseDomain | default .Values.global.domain }} containerSecurityContext: allowPrivilegeEscalation: false diff --git a/helmfile/apps/element/values-synapse.yaml.gotmpl b/helmfile/apps/element/values-synapse.yaml.gotmpl index 47dfb325..133e2e4d 100644 --- a/helmfile/apps/element/values-synapse.yaml.gotmpl +++ b/helmfile/apps/element/values-synapse.yaml.gotmpl @@ -29,6 +29,7 @@ configuration: password: {{ .Values.databases.synapse.password | default .Values.secrets.postgresql.matrixUser | quote }} homeserver: + serverName: {{ .Values.global.synapseDomain | default .Values.global.domain }} appServiceConfigs: - as_token: {{ .Values.secrets.intercom.synapseAsToken | quote }} hs_token: {{ .Values.secrets.intercom.synapseAsToken | quote }} diff --git a/helmfile/apps/services/values-postfix.yaml.gotmpl b/helmfile/apps/services/values-postfix.yaml.gotmpl index 64b90492..56eacd4e 100644 --- a/helmfile/apps/services/values-postfix.yaml.gotmpl +++ b/helmfile/apps/services/values-postfix.yaml.gotmpl @@ -41,7 +41,7 @@ podSecurityContext: postfix: amavisHost: "" amavisPortIn: "" - domain: {{ .Values.global.mailDomain | quote }} + domain: {{ .Values.global.mailDomain | default .Values.global.domain }} hostname: "postfix" inetProtocols: "ipv4" milterDefaultAction: "accept" @@ -67,7 +67,7 @@ postfix: {{- else if .Values.clamavSimple.enabled }} smtpdMilters: "inet:clamav-simple:7357" {{- end }} - virtualMailboxDomains: {{ .Values.global.mailDomain | quote }} + virtualMailboxDomains: {{ .Values.global.mailDomain | default .Values.global.domain }} virtualTransport: "lmtps:dovecot:24" replicaCount: {{ .Values.replicas.postfix }} diff --git a/helmfile/apps/univention-management-stack/values-umbrella.yaml.gotmpl b/helmfile/apps/univention-management-stack/values-umbrella.yaml.gotmpl index 71e57acb..ba8574e4 100644 --- a/helmfile/apps/univention-management-stack/values-umbrella.yaml.gotmpl +++ b/helmfile/apps/univention-management-stack/values-umbrella.yaml.gotmpl @@ -6,7 +6,6 @@ global: configMapUcr: "ums-stack-data-swp-ucr" configMapUcrForced: null domain: {{ .Values.global.domain | quote }} - mailDomain: {{ .Values.global.mailDomain | quote }} imagePullSecrets: {{ .Values.global.imagePullSecrets | toYaml | nindent 4 }} @@ -610,7 +609,7 @@ stack-data-ums: # The openDesk configuration brings its own UMC policies. installUmcPolicies: false domainname: {{ .Values.global.domain | quote }} - externalMailDomain: {{ .Values.global.mailDomain | quote }} + externalMailDomain: {{ .Values.global.mailDomain | default .Values.global.domain }} hostname: {{ .Values.global.hosts.univentionManagementStack | quote }} ldapHost: {{ .Values.ldap.host | quote }} ldapBase: {{ .Values.ldap.baseDn | quote }} @@ -651,7 +650,7 @@ stack-data-swp: {{- end }} externalDomainName: {{ .Values.global.domain | quote }} - externalMailDomain: {{ .Values.global.mailDomain | quote }} + externalMailDomain: {{ .Values.global.mailDomain | default .Values.global.domain }} portalGroupwareLinkBase: {{ printf "https://%s.%s" .Values.global.hosts.openxchange .Values.global.domain | quote }} portalFileshareLinkBase: {{ printf "https://%s.%s" .Values.global.hosts.nextcloud .Values.global.domain | quote }} diff --git a/helmfile/environments/default/global.gotmpl b/helmfile/environments/default/global.gotmpl index 101a7e36..cb9951f7 100644 --- a/helmfile/environments/default/global.gotmpl +++ b/helmfile/environments/default/global.gotmpl @@ -13,7 +13,11 @@ global: ## Define mail host # - mailDomain: {{ env "MAIL_DOMAIN" | default "souvap.cloud" | quote }} + mailDomain: {{ env "MAIL_DOMAIN" | quote }} + + ## Define synapse host + # + synapseDomain: {{ env "SYNAPSE_DOMAIN" | quote }} ## Define docker registry address. #