Skip to content

Commit 527dc33

Browse files
committed
DNS: add 9.9.9.9 to resolv.conf if unbound isn't there yet
1 parent 71160b8 commit 527dc33

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
- unbound: check that port 53 is not occupied by a different process
2828
([#537](https://github.com/chatmail/server/pull/537))
2929

30+
- unbound: before unbound is there, use 9.9.9.9 for resolving
31+
([#518](https://github.com/chatmail/relay/pull/518))
32+
3033
- Limit the bind for the HTTPS server on 8443 to 127.0.0.1
3134
([#522](https://github.com/chatmail/server/pull/522))
3235
([#532](https://github.com/chatmail/server/pull/532))

cmdeploy/src/cmdeploy/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,12 @@ def deploy_chatmail(config_path: Path, disable_mail: bool) -> None:
592592
ensure_newline=True,
593593
)
594594

595+
if host.get_fact(Port, port=53) != "unbound":
596+
files.line(
597+
name="Add 9.9.9.9 to resolv.conf",
598+
path="/etc/resolv.conf",
599+
line="nameserver 9.9.9.9",
600+
)
595601
apt.update(name="apt update", cache_time=24 * 3600)
596602
apt.upgrade(name="upgrade apt packages", auto_remove=True)
597603

0 commit comments

Comments
 (0)