mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-24 02:37:05 +00:00
add autoconfig domains before subtracting domains with overridden A records so that a custom DNS record can be used to suppress TLS certificate generation for those domains if needed
This commit is contained in:
parent
9e29564f48
commit
a70ba94b0c
@ -23,11 +23,6 @@ def get_web_domains(env, include_www_redirects=True, exclude_dns_elsewhere=True)
|
|||||||
# to the main domain for. We'll add 'www.' to any DNS zones, i.e.
|
# to the main domain for. We'll add 'www.' to any DNS zones, i.e.
|
||||||
# the topmost of each domain we serve.
|
# the topmost of each domain we serve.
|
||||||
domains |= set('www.' + zone for zone, zonefile in get_dns_zones(env))
|
domains |= set('www.' + zone for zone, zonefile in get_dns_zones(env))
|
||||||
|
|
||||||
if exclude_dns_elsewhere:
|
|
||||||
# ...Unless the domain has an A/AAAA record that maps it to a different
|
|
||||||
# IP address than this box. Remove those domains from our list.
|
|
||||||
domains -= get_domains_with_a_records(env)
|
|
||||||
|
|
||||||
# Add Autoconfiguration domains, allowing us to serve correct SSL certs.
|
# Add Autoconfiguration domains, allowing us to serve correct SSL certs.
|
||||||
# 'autoconfig.' for Mozilla Thunderbird auto setup.
|
# 'autoconfig.' for Mozilla Thunderbird auto setup.
|
||||||
@ -35,6 +30,11 @@ def get_web_domains(env, include_www_redirects=True, exclude_dns_elsewhere=True)
|
|||||||
domains |= set('autoconfig.' + maildomain for maildomain in get_mail_domains(env))
|
domains |= set('autoconfig.' + maildomain for maildomain in get_mail_domains(env))
|
||||||
domains |= set('autodiscover.' + maildomain for maildomain in get_mail_domains(env))
|
domains |= set('autodiscover.' + maildomain for maildomain in get_mail_domains(env))
|
||||||
|
|
||||||
|
if exclude_dns_elsewhere:
|
||||||
|
# ...Unless the domain has an A/AAAA record that maps it to a different
|
||||||
|
# IP address than this box. Remove those domains from our list.
|
||||||
|
domains -= get_domains_with_a_records(env)
|
||||||
|
|
||||||
# Ensure the PRIMARY_HOSTNAME is in the list so we can serve webmail
|
# Ensure the PRIMARY_HOSTNAME is in the list so we can serve webmail
|
||||||
# as well as Z-Push for Exchange ActiveSync. This can't be removed
|
# as well as Z-Push for Exchange ActiveSync. This can't be removed
|
||||||
# by a custom A/AAAA record and is never a 'www.' redirect.
|
# by a custom A/AAAA record and is never a 'www.' redirect.
|
||||||
|
Loading…
Reference in New Issue
Block a user