Chatmail deploy problem: port 53

Hello,

I am trying to deploy my own chatmail instance, but I am stuck because of port 53 being unavailable:

[$ pyinfra --ssh-user root test.com /Users/test/relay/cmdeploy/src/cmdeploy/deploy.py -y]

--> Loading config...

--> Loading inventory...

--> Connecting to hosts...

[**test.com**] Connected

--> Preparing operation files...

Loading: **/Users/test/relay/cmdeploy/src/cmdeploy/deploy.py**

Checking if port 25 is available for ['master', 'smtpd']...

Checking if port 53 is available for unbound...

Deploy failed: port 53 is occupied by: systemd-resolve

--> Disconnecting from hosts...

Deploy failed

Any ideas how to fix this? Many thanks! :slight_smile:

You can disable the resolver by running systemctl stop systemd-resolved, systemctl disable systemd-resolved, and replacing the symlink at /etc/resolv.conf with a regular file containing some nameserver statements. If you want to keep using the same nameservers, check the output of resolvectl before doing all of that.

The deployment process always adds 9.9.9.9 to resolv.conf, IIRC.

1 Like

One thing to look out for: on my installation (Ubuntu 24.04), the deployment script installed Unbound, but resolv.conf remained unchanged. So it might be a good idea to make sure that resolv.conf points to 127.0.0.1 after successful deployment.

Hi, I have the same problem.

Deploy failed: port 53 is occupied by: systemd-resolve

But the suggested solution does not work for me. Look what I have here:

root@chatmail:~# systemctl status systemd-resolved
Unit systemd-resolved.service could not be found.

What should I do?

Thank you

Odd. What does netstat -lnpt or ss -lnpt say is listening on local port 53?

Hey, thank you @alxndr for your message. The thing is that problem disappeared and did not manage to know why, I was troubleshooting different things.

Sorry, I should have mentioned it here.

2 Likes