1

Topic: sudo: unable to resolve host: name or service known

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.2
- Deployed with iRedMail Easy or the downloadable installer? Installer
- Linux/BSD distribution name and version: Debian 10
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

```
sudo: unable to resolve host mx.domain.tld: Name or service not known
sudo: cd: command not found
```

I was attempting to cd into /opt/iredapd/tools/ to add an IP to the whitelist, per <a href="https://docs.iredmail.org/amavisd.wblist.html">this guide</a>, I ran cd /opt/iredapd/tools/, was given "permission denied", tried to run it as sudo, and got the output seen above, obviously theres something wrong with my system hostname, I thought I set the hostname properly when I deployed the system but obviously not.

In an effort to not break things further, the server is currently still handling mail perfectly fine, but see my hosts files below, advise on how to correct this issue highly appreciated!

hosted in AWS:

/etc/hosts/ (where 1's represents an IP im trying to mask)
```
127.0.0.1 ip-111-11-11-111.ca-central-1.compute.internal ip-111-11-11-111
127.0.0.1 localhost

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
```

/etc/hostname
```
mx.domain.tld
```

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: sudo: unable to resolve host: name or service known

Try to switch to root user first, then run the commands.