1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-14 10:53:30 +02:00

Update autoconfig too

(cherry picked from commit b3d49599cf)
This commit is contained in:
Florent Daigniere 2024-06-22 10:04:10 +02:00 committed by Mergify
parent 42b4dd2004
commit fd4ba4bd86
2 changed files with 8 additions and 7 deletions

View File

@ -87,6 +87,7 @@ DEFAULT_CONFIG = {
'TLS_PERMISSIVE': True,
'TZ': 'Etc/UTC',
'DEFAULT_SPAM_THRESHOLD': 80,
'PORTS': '25,80,443,465,993,995,4190',
'PROXY_AUTH_WHITELIST': '',
'PROXY_AUTH_HEADER': 'X-Auth-Email',
'PROXY_AUTH_CREATE': False,

View File

@ -259,16 +259,16 @@ class Domain(Base):
""" return list of auto configuration records (RFC6186) """
hostname = app.config['HOSTNAME']
protocols = [
('imap', 143, 20),
('pop3', 110, 20),
('submission', 587, 20),
('imap', 143, 20 if 143 in app.config['PORTS'].split(',') else 0),
('pop3', 110, 20 if 110 in app.config['PORTS'].split(',') else 0),
('submission', 587, 20 if 587 in app.config['PORTS'].split(',') else 0),
]
if app.config['TLS_FLAVOR'] != 'notls':
protocols.extend([
('autodiscover', 443, 10),
('submissions', 465, 10),
('imaps', 993, 10),
('pop3s', 995, 10),
('autodiscover', 443, 10 if 443 in app.config['PORTS'].split(',') else 0),
('submissions', 465, 10 if 465 in app.config['PORTS'].split(',') else 0),
('imaps', 993, 10 if 993 in app.config['PORTS'].split(',') else 0),
('pop3s', 995, 10 if 995 in app.config['PORTS'].split(',') else 0),
])
return [