refactor(email,domain): unify primary domain and TLS handling

- replace localhost special-casing with valid FQDN (infinito.localhost)
- derive system email DOMAIN and HOST directly from DOMAIN_PRIMARY
- align Mailu TLS_FLAVOR with SYSTEM_EMAIL.TLS (mail vs notls)
- tie OIDC_VERIFY_SSL to TLS_ENABLED for consistent test/CI behavior
- update CI deploy script to use new primary domain

https://chatgpt.com/share/695311c0-fbe8-800f-8058-9d40a06b189a
This commit is contained in:
kevinveenbirkenbach committed 2025-12-30 00:41:46 +01:00
1 parent 42eb562b31
commit 6bc097f96f
4 files changed
+6 -11

No files matched your search

+1 -1
View File
@@ -38,7 +38,7 @@ WWW_REDIRECT_ENABLED: "{{ ('web-opt-rdr-www' in group_names) | bool }}"
AUTO_BUILD_ALIASES: False # If enabled it creates an alias domain for each web application by the entity name, recommended to set to false to safe domain space
# Domain
DOMAIN_PRIMARY: "localhost" # Primary Domain of the server
DOMAIN_PRIMARY: "infinito.localhost" # Primary Domain of the server
DOMAIN_TEST: "test.{{ DOMAIN_PRIMARY }}"
DNS_PROVIDER: "localhost" # The DNS Provider\Registrar for the domain -> Legit values: cloudflare
+2 -7
View File
@@ -1,12 +1,7 @@
# Internal email domain:
# - append .localdomain when DOMAIN_PRIMARY == localhost
# - avoids invalid email domains like user@localhost
_SYSTEM_EMAIL_DOMAIN: "{{ 'secondlevel.' if DOMAIN_PRIMARY == 'localhost' else '' }}{{ DOMAIN_PRIMARY }}"
# Email Configuration
DEFAULT_SYSTEM_EMAIL:
DOMAIN: "{{ _SYSTEM_EMAIL_DOMAIN }}"
HOST: "mail.{{ _SYSTEM_EMAIL_DOMAIN }}"
DOMAIN: "{{ DOMAIN_PRIMARY }}"
HOST: "mail.{{ DOMAIN_PRIMARY }}"
PORT: "{{ TLS_ENABLED | ternary(465,25) }}"
TLS: "{{ TLS_ENABLED }}" # true for TLS and false for SSL
START_TLS: false
+2 -2
View File
@@ -26,7 +26,7 @@ HOSTNAMES={{ MAILU_HOSTNAMES | join(',') }}
POSTMASTER=admin
# Choose how secure connections will behave (value: letsencrypt, cert, notls, mail, mail-letsencrypt)
TLS_FLAVOR=mail
TLS_FLAVOR={{ SYSTEM_EMAIL.TLS | ternary('mail','notls') }}
# Authentication rate limit (per source IP address)
AUTH_RATELIMIT=10/minute;1000/hour
@@ -181,7 +181,7 @@ OIDC_CLIENT_SECRET={{ OIDC.CLIENT.SECRET }}
OIDC_BUTTON_NAME={{ OIDC.BUTTON_TEXT }}
# Disable TLS certificate verification for the OIDC client. Possible values: True, False
OIDC_VERIFY_SSL=True
OIDC_VERIFY_SSL={{ TLS_ENABLED | ternary('True','False') }}
# Enable redirect to OIDC provider for password change. Possible values: True, False
OIDC_CHANGE_PASSWORD_REDIRECT_ENABLED=True
+1 -1
View File
@@ -307,7 +307,7 @@ infinito_exec sh -lc '
/etc/inventories/github-ci \
--host localhost \
--ssl-disabled \
--primary-domain localhost \
--primary-domain infinito.localhost \
--exclude "'"${EXCLUDE_CSV}"'" \
--vars-file inventory.sample.yml \
--authorized-keys "'"${AUTHORIZED_KEYS}"'"