Do explicit TLS where possible

master
Florent Daigniere 2 years ago
parent c817eaf608
commit 2b62a6327a

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

@ -60,7 +60,7 @@
</tr>
{%- endif %}
<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">
{%- for line in domain.dns_autoconfig %}
{{ line }}

Loading…
Cancel
Save