Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mailinabox
Commits
812ef024
Commit
812ef024
authored
Jan 04, 2016
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
status checks: check that the non-primary domains also resolve over IPv6, if configured
parent
40cdc5aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
status_checks.py
management/status_checks.py
+15
-8
No files found.
management/status_checks.py
View file @
812ef024
...
...
@@ -601,14 +601,21 @@ def check_web_domain(domain, rounded_time, ssl_certificates, env, output):
# for PRIMARY_HOSTNAME, for which it is required for mail specifically. For it and
# other domains, it is required to access its website.
if
domain
!=
env
[
'PRIMARY_HOSTNAME'
]:
ip
=
query_dns
(
domain
,
"A"
)
if
ip
==
env
[
'PUBLIC_IP'
]:
output
.
print_ok
(
"Domain resolves to this box's IP address. [
%
s ↦
%
s]"
%
(
domain
,
env
[
'PUBLIC_IP'
]))
else
:
output
.
print_error
(
"""This domain should resolve to your box's IP address (
%
s) if you would like the box to serve
webmail or a website on this domain. The domain currently resolves to
%
s in public DNS. It may take several hours for
public DNS to update after a change. This problem may result from other issues listed here."""
%
(
env
[
'PUBLIC_IP'
],
ip
))
return
ok_values
=
[]
for
(
rtype
,
expected
)
in
((
"A"
,
env
[
'PUBLIC_IP'
]),
(
"AAAA"
,
env
.
get
(
'PUBLIC_IPV6'
))):
if
not
expected
:
continue
# IPv6 is not configured
value
=
query_dns
(
domain
,
rtype
)
if
value
==
expected
:
ok_values
.
append
(
value
)
else
:
output
.
print_error
(
"""This domain should resolve to your box's IP address (
%
s
%
s) if you would like the box to serve
webmail or a website on this domain. The domain currently resolves to
%
s in public DNS. It may take several hours for
public DNS to update after a change. This problem may result from other issues listed here."""
%
(
rtype
,
expected
,
value
))
return
# If both A and AAAA are correct...
output
.
print_ok
(
"Domain resolves to this box's IP address. [
%
s ↦
%
s]"
%
(
domain
,
'; '
.
join
(
ok_values
)))
# We need a TLS certificate for PRIMARY_HOSTNAME because that's where the
# user will log in with IMAP or webmail. Any other domain we serve a
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment