Do explicit TLS where possible

master
Florent Daigniere 3 years ago
parent c817eaf608
commit 2b62a6327a

@ -255,16 +255,27 @@ class Domain(Base):
""" return list of auto configuration records (RFC6186) """ """ return list of auto configuration records (RFC6186) """
hostname = app.config['HOSTNAME'] hostname = app.config['HOSTNAME']
protocols = [ protocols = [
('submission', 587),
('imap', 143),
('pop3', 110),
('autodiscover', 443), ('autodiscover', 443),
] ]
if app.config['TLS_FLAVOR'] != 'notls': if app.config['TLS_FLAVOR'] != 'notls':
protocols.extend([ protocols.extend([
('submission', 0),
('submissions', 465),
('imap', 0),
('pop3', 0),
('imaps', 993), ('imaps', 993),
('pop3s', 995), ('pop3s', 995),
]) ])
else:
protocols.extend([
('submission', 587),
('submissions', 0),
('imap', 143),
('pop3', 110),
('imaps', 0),
('pop3s', 0),
])
return list([ return list([
f'_{proto}._tcp.{self.name}. 600 IN SRV 1 1 {port} {hostname}.' f'_{proto}._tcp.{self.name}. 600 IN SRV 1 1 {port} {hostname}.'
for proto, port for proto, port

@ -60,7 +60,7 @@
</tr> </tr>
{%- endif %} {%- endif %}
<tr> <tr>
<th>{% trans %}DNS client auto-configuration (RFC6186) entries{% endtrans %}</th> <th>{% trans %}DNS client auto-configuration entries{% endtrans %}</th>
<td>{{ macros.clip("dns_autoconfig") }}<pre id="dns_autoconfig" class="pre-config border bg-light"> <td>{{ macros.clip("dns_autoconfig") }}<pre id="dns_autoconfig" class="pre-config border bg-light">
{%- for line in domain.dns_autoconfig %} {%- for line in domain.dns_autoconfig %}
{{ line }} {{ line }}

Loading…
Cancel
Save