Can't receive emails after changing the hostname

Hello,

I have recently change the hostname to HOSTNAME.DOMAIN.TLD because the Hestia Control Panel was showing a notification about the hostname being not correct.

Now, I am not receiving any emails other than the emails sent internally or to my self.

I checked the /var/log/exim4/mainlog and here what I found

2022-01-05 14:40:02 1n54eA-003HMe-3D <= [email protected] U=admin P=local S=839
2022-01-05 14:40:02 1n54e9-003HLq-Po ** [email protected]: Unrouteable address
2022-01-05 14:40:02 1n54e9-003HLq-Po Frozen (delivery error message)
2022-01-05 14:40:02 1n54eA-003HMp-4n U=admin Warning: Sender rate [limitlog]: log / account / admin / 110.4 / 1h
2022-01-05 14:40:02 1n54eA-003HMp-4n <= [email protected] U=admin P=local S=835
2022-01-05 14:40:02 1n54eA-003HMr-5Y U=admin Warning: Sender rate [limitlog]: log / account / admin / 111.4 / 1h
2022-01-05 14:40:02 1n54eA-003HMr-5Y <= [email protected] U=admin P=local S=834
2022-01-05 14:40:02 1n54e9-003HM6-Ta ** [email protected]: Unrouteable address
2022-01-05 14:40:02 1n54e9-003HM6-Ta Frozen (delivery error message)
2022-01-05 14:40:02 1n54e9-003HMC-U2 ** [email protected]: Unrouteable address
2022-01-05 14:40:02 1n54e9-003HMC-U2 Frozen (delivery error message)
2022-01-05 14:40:02 1n54e9-003HM7-UQ ** [email protected]: Unrouteable address
2022-01-05 14:40:02 1n54e9-003HM7-UQ Frozen (delivery error message)
2022-01-05 14:40:02 1n54e9-003HMD-Vt ** [email protected]: Unrouteable address
2022-01-05 14:40:02 1n54e9-003HMD-Vt Frozen (delivery error message)
2022-01-05 14:40:02 1n54eA-003HMP-1V ** [email protected]: Unrouteable address
2022-01-05 14:40:02 1n54eA-003HMP-1V Frozen (delivery error message)
2022-01-05 14:40:02 1n54eA-003HMe-3D => [email protected] R=dnslookup T=remote_smtp H=gmail-smtp-in.l.google.com [173.194.69.26] X=TLS1.3:ECDHE_X25519__ECDSA_SECP256R1_SHA256__AES_256_GCM:256 CV=yes K C=“250 2.0.0 OK d2si17599962ejc.653 - gsmtp”
2022-01-05 14:40:02 1n54eA-003HMe-3D Completed
2022-01-05 14:40:02 1n54eA-003HMp-4n => [email protected] R=dnslookup T=remote_smtp H=gmail-smtp-in.l.google.com [173.194.69.26] X=TLS1.3:ECDHE_X25519__ECDSA_SECP256R1_SHA256__AES_256_GCM:256 CV=yes K C=“250 2.0.0 OK w12si21433553edj.233 - gsmtp”
2022-01-05 14:40:02 1n54eA-003HMp-4n Completed
2022-01-05 14:40:03 1n54eB-003HQc-EG U=admin Warning: Sender rate [limitlog]: log / account / admin / 112.3 / 1h
2022-01-05 14:40:03 1n54eB-003HQc-EG <= [email protected] U=admin P=local S=825
2022-01-05 14:40:03 1n54eA-003HMr-5Y => [email protected] R=dnslookup T=remote_smtp H=gmail-smtp-in.l.google.com [173.194.69.27] TFO X=TLS1.3:ECDHE_X25519__ECDSA_SECP256R1_SHA256__AES_256_GCM:256 CV=yes K C=“250 2.0.0 OK dy16si14507349edb.30 - gsmtp”
2022-01-05 14:40:03 1n54eA-003HMr-5Y Completed
2022-01-05 14:40:04 1n54eB-003HQc-EG => [email protected] R=dnslookup T=remote_smtp H=gmail-smtp-in.l.google.com [173.194.69.27] TFO X=TLS1.3:ECDHE_X25519__ECDSA_SECP256R1_SHA256__AES_256_GCM:256 CV=yes K C=“250 2.0.0 OK ht9si19831846ejc.56 - gsmtp”
2022-01-05 14:40:04 1n54eB-003HQc-EG Completed
2022-01-05 14:41:27 no host name found for IP address 141.98.10.220
2022-01-05 14:41:29 dovecot_login authenticator failed for (User) [141.98.10.220]: 535 Incorrect authentication data (set_id=aw)
2022-01-05 14:41:52 Start queue run: pid=782130
2022-01-05 14:41:52 1n54Gw-003Gbm-0d Message is frozen
2022-01-05 14:41:52 1n54ZJ-003H9M-D0 Message is frozen
2022-01-05 14:41:52 1n53zV-003FtQ-W2 Message is frozen
2022-01-05 14:41:52 1n545J-003G63-9n Message is frozen
2022-01-05 14:41:52 1n54B7-003GLD-No Message is frozen
2022-01-05 14:41:52 1n54UU-003Gyj-46 Message is frozen
2022-01-05 14:41:52 1n54aH-003HE9-Vl Message is frozen
2022-01-05 14:41:52 End queue run: pid=782130

Can you help me fix this issue please.

Thank you for your support.

Make sure you hostname is in /etc/hosts file

Hello eris,

Thank you for your support.

I checked /etc/hostname and the hostname is already updated to the new hostname.

This is the content of the hosts file

Your system has configured ‘manage_etc_hosts’ as True.

As a result, if you wish for changes to this file to persist

then you will need to either

a.) make changes to the master file in /etc/cloud/templates/hosts.debian.tmpl

b.) change or remove the value of ‘manage_etc_hosts’ in

/etc/cloud/cloud.cfg or cloud-config from user-data

127.0.1.1 HestiaCP HestiaCP
127.0.0.1 localhost

The following lines are desirable for IPv6 capable hosts

::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

This is the content of hosts.debian.tmpl

template:jinja

{#
This file (/etc/cloud/templates/hosts.debian.tmpl) is only utilized
if enabled in cloud-config. Specifically, in order to enable it
you need to add the following to config:
manage_etc_hosts: True
-#}

Your system has configured ‘manage_etc_hosts’ as True.

As a result, if you wish for changes to this file to persist

then you will need to either

a.) make changes to the master file in /etc/cloud/templates/hosts.debian.tmpl

b.) change or remove the value of ‘manage_etc_hosts’ in

/etc/cloud/cloud.cfg or cloud-config from user-data

{# The value ‘{{hostname}}’ will be replaced with the local-hostname -#}
127.0.1.1 {{fqdn}} {{hostname}}
127.0.0.1 localhost

The following lines are desirable for IPv6 capable hosts

::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

This is the content of cloud.cfg

The top level settings are used as module

and system configuration.

A set of users which may be applied and/or used by various modules

when a ‘default’ entry is found it will reference the ‘default_user’

from the distro configuration specified below

users:

  • default

If this is set, ‘root’ will not be able to ssh in and they

will get a message to login instead as the default $user

disable_root: true

This will cause the set+update hostname module to not operate (if true)

preserve_hostname: false

If you use datasource_list array, keep array items in a single line.

If you use multi line array, ds-identify script won’t read array items.

Example datasource config

datasource:

Ec2:

metadata_urls: [ ‘blah.com’ ]

timeout: 5 # (defaults to 50 seconds)

max_wait: 10 # (defaults to 120 seconds)

The modules that run in the ‘init’ stage

cloud_init_modules:

  • migrator
  • seed_random
  • bootcmd
  • write-files
  • growpart
  • resizefs
  • disk_setup
  • mounts
  • set_hostname
  • update_hostname
  • update_etc_hosts
  • ca-certs
  • rsyslog
  • users-groups
  • ssh

The modules that run in the ‘config’ stage

cloud_config_modules:

Emit the cloud config ready event

this can be used by upstart jobs for ‘start on cloud-config’.

  • emit_upstart
  • snap
  • ssh-import-id
  • locale
  • set-passwords
  • grub-dpkg
  • apt-pipelining
  • apt-configure
  • ubuntu-advantage
  • ntp
  • timezone
  • disable-ec2-metadata
  • runcmd
  • byobu

The modules that run in the ‘final’ stage

cloud_final_modules:

  • package-update-upgrade-install
  • fan
  • landscape
  • lxd
  • ubuntu-drivers
  • write-files-deferred
  • puppet
  • chef
  • mcollective
  • salt-minion
  • reset_rmc
  • refresh_rmc_and_interface
  • rightscale_userdata
  • scripts-vendor
  • scripts-per-once
  • scripts-per-boot
  • scripts-per-instance
  • scripts-user
  • ssh-authkey-fingerprints
  • keys-to-console
  • install-hotplug
  • phone-home
  • final-message
  • power-state-change

System and/or distro specific settings

(not accessible to handlers/transforms)

system_info:

This will affect which distro class gets used

distro: ubuntu

Default user name + that default users groups (if added/used)

default_user:
name: ubuntu
lock_passwd: True
gecos: Ubuntu
groups: [adm, audio, cdrom, dialout, dip, floppy, lxd, netdev, plugdev, sudo, video]
sudo: [“ALL=(ALL) NOPASSWD:ALL”]
shell: /bin/bash
network:
renderers: [‘netplan’, ‘eni’, ‘sysconfig’]

Automatically discover the best ntp_client

ntp_client: auto

Other config here will be given to the distro class and/or path classes

paths:
cloud_dir: /var/lib/cloud/
templates_dir: /etc/cloud/templates/
upstart_dir: /etc/init/
package_mirrors:
- arches: [i386, amd64]
failsafe:
primary: Index of /ubuntu
security: Index of /ubuntu
search:
primary:
- http://%(ec2_region)s.ec2.archive.ubuntu.com/ubuntu/
- http://%(availability_zone)Index of /ubuntu
- http://%(region)Index of /ubuntu
security: []
- arches: [arm64, armel, armhf]
failsafe:
primary: Index of /ubuntu-ports
security: Index of /ubuntu-ports
search:
primary:
- http://%(ec2_region)s.ec2.ports.ubuntu.com/ubuntu-ports/
- http://%(availability_zone)Index of /ubuntu-ports
- http://%(region)Index of /ubuntu-ports
security: []
- arches: [default]
failsafe:
primary: Index of /ubuntu-ports
security: Index of /ubuntu-ports
ssh_svcname: ssh

Here is the log from /var/log/exim4/mainlog file

2022-01-06 09:00:02 1n5Lof-000pA6-Tn ** [email protected]: Unrouteable address
2022-01-06 09:00:02 1n5Lof-000pA6-Tn Frozen (delivery error message)
2022-01-06 09:00:02 1n5Lof-000pAA-VX => **************@gmail.com R=dnslookup T=remote_smtp H=gmail-smtp-in.l.google.com [173.194.69.26] TFO X=TLS1.3:ECDHE_X25519__ECDSA_SECP256R1_SHA256__AES_256_GCM:256 CV=yes K C=“250 2.0.0 OK cb22si592166edb.279 - gsmtp”
2022-01-06 09:00:02 1n5Lof-000pAA-VX Completed
2022-01-06 09:00:02 1n5Lof-000p9e-Qq => **************@gmail.com R=dnslookup T=remote_smtp H=gmail-smtp-in.l.google.com [173.194.69.27] TFO X=TLS1.3:ECDHE_X25519__ECDSA_SECP256R1_SHA256__AES_256_GCM:256 CV=yes K C=“250 2.0.0 OK c13si672017ede.597 - gsmtp”
2022-01-06 09:00:02 1n5Lof-000p9e-Qq Completed
2022-01-06 09:00:02 1n5Lof-000pA4-Rz => ***************@gmail.com R=dnslookup T=remote_smtp H=gmail-smtp-in.l.google.com [173.194.69.27] TFO X=TLS1.3:ECDHE_X25519__ECDSA_SECP256R1_SHA256__AES_256_GCM:256 CV=yes K C=“250 2.0.0 OK w10si665510edc.176 - gsmtp”
2022-01-06 09:00:02 1n5Lof-000pA4-Rz Completed
2022-01-06 09:00:03 1n5Loh-000pDv-5v F=[email protected] rejected by non-SMTP ACL: Website of user admin is sending too many emails - rate overlimit = 200.2 / 1h
2022-01-06 09:00:03 1n5Loh-000pDx-6X U=Debian-exim Warning: Sender rate [limitlog]: log / account / / 140.0 / 1h
2022-01-06 09:00:03 1n5Loh-000pDx-6X <= <> R=1n5Loh-000pDv-5v U=Debian-exim P=local S=1657
2022-01-06 09:00:03 1n5Loh-000pDx-6X ** [email protected]: Unrouteable address
2022-01-06 09:00:03 1n5Loh-000pDx-6X Frozen (delivery error message)

Please note that I did not add the domain HOSTNAME.DOMAIN.TLD to the user or to the admin accounts.

Today the mail.DOMAIN.TLD and webmail.DOMAIN.TLD are not working.

Here are my DNS.


Can you help me fix this issue please.

Thank you.

read that again, something is sending a lot of mails

Hello ScIT,

Thank you for your support.

  • I did not add HOSTNAME.DOMAIN.TLD to the domains.
  • I didn’t add [email protected] to the accounts.
  • I don’t see any admin email accounts on the HsetiaCP.

I am not sure how [email protected] have been created in the first place!

Just to be safe I have stopped all mailing services.

Can you please help me fix this issue please?

Thank you.

https://forum.hestiacp.com/uploads/default/original/2X/0/0f9ac49779b69c0da3622772d7cbe00d9cf6d0ba.jpeg

You can’t enable proxy for mail.domain.com

Hello eris,

Thank you for your support.

I have change the DNS settings.

Do you think this will fix the issue?

I am receiving “Cron Daemon” emails from [email protected]
sudo: unable to resolve host HOSTNAME.DOMAIN.TLD : Name or service not known

Can you please help me fix this issue please?

Make sure hostname.domain.com exists …

I was using ADMINDOMAIN.COM on Admin account and it was the hostname. Then I no longer needed that domain so I changed the Hostname to the HOSTNAME.USERDOMAIN.TLD.

I am not sure how can I make HOSTNAME.USERDOMAIN.TLD exists.

Can adding the domain HOSTNAME.USERDOMAIN.TLD to the user account or admin account fix this issue?