Where does this hostname come from

I run webmin/virtualmin on a new ubuntu server 22.04
Before I installed Virtualmin I changed hostname on it but now I see in the mail log this

Feb 4 06:00:32 server postfix/qmgr[631702]: 41B5D124505B: from=root@vmi2433889.contaboserver.net, size=703, nrcpt=1 (queue active)
Where does this come from

Likely the PTR, which is the reverse DNS for your IP address. Your host controls this, since they control the network block.

Some will allow you to edit the PTR name directly and some will delegate the IP to DNS servers of your choosing.

You should follow the docs for the PTR, too. Don’t set it to a name you’ll be virtually hosting in Virtualmin. (But the current one is probably fine as long as it resolves correctly both ways. It doesn’t matter what PTR is, just that one exists and the name resolves back to the IP.)

I can set te PTR myself in the controlpanel by the host and that is correct on all servers so its something else

Then it must be the hostname of the system itself.

hostname -f

Last login: Mon Feb 3 14:24:55 2025 from 185.98.107.185
root@server:~# hostname -f
server.jv80.se
root@server:~#

A guess would be if Contabo set up/provided the initial image then you are probably using their DNS servers?

root@main:~# cat /etc/resolv.conf 
domain onlinehome-server.com
search onlinehome-server.com
nameserver 10.255.255.4
nameserver 10.255.255.3

I use cloudflare dns, has never used contabo dns

I don’t think this is the same thing. Do
cat /etc/resolv.conf

or look here

Some DNS is answering to that and I’d guess it would be Contabo’s.

root@main:~# ping vmi2433889.contaboserver.net
PING vmi2433889.contaboserver.net (167.86.100.222) 56(84) bytes of data.
64 bytes from jv80.se (167.86.100.222): icmp_seq=1 ttl=56 time=116 ms
64 bytes from jv80.se (167.86.100.222): icmp_seq=2 ttl=56 time=114 ms
64 bytes from jv80.se (167.86.100.222): icmp_seq=3 ttl=56 time=114 ms
64 bytes from jv80.se (167.86.100.222): icmp_seq=4 ttl=56 time=114 ms
64 bytes from jv80.se (167.86.100.222): icmp_seq=5 ttl=56 time=114 ms
^C
--- vmi2433889.contaboserver.net ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4002ms
rtt min/avg/max/mdev = 113.502/114.167/115.831/0.870 ms

Your Postfix is probably looking to their DNS servers. I’d guess you have DNS turned off if you are using Cloudflare. That doesn’t mean your local server is looking up requests at Cloudflare.

Interesting. When I installed webmin I added cloudflare dns but I can see that contabos is listed.
but still from where come the address. I changed hostname before I installed webmin

And again where does webmin find contabo address. Its nowhere

Most of these machines are set up with DHCP. Reboot the machine or possibly restart networking and the DHCP kicks in. I know on my home router I can make the DNS servers ‘sticky’. I’m pretty sure you can do that on Ubuntu also.

Note the resolution order. You can add your machine to the hosts file and it should start returning the name you expect. I’m guessing that Postfix relies on resolvable host names so is checking DNS instead of blindly using the hostname.

When I look at the PTR, I see this:

$ host 167.86.100.222
222.100.86.167.in-addr.arpa domain name pointer jv80.se.

Not related to your specific question, but if you’re hosting email for jv80.se virtually in Virtualmin you shouldn’t name the server that (and the PTR shouldn’t be that). It should be anything else (server.jv80.se from above is fine as long as you add an A record for that name so it resolves both ways).

No that server host no email. 2 webshops on that server send mail via our email server using phpmail

@Mediasafe,

See if the following command returns any results.

grep -rl "contaboserver.net" /etc/

The above searches the “/etc” folder recursively for files including “contaboserver.net” then returns just the filename in its results.

*** most system configs live inside the “etc” folder tree. if something is found, it may lead to a solution. (this is just one possible path to search) ***

Which machine use dhcp you mean? If you mean my home computer you are wrong. I have a static IP

No. The Contabo server.

I really doubt that a company with 400000 +vps servers use dhcp

Vultr uses DHCP (I’m sure they would to that or more VPS’s), how else would they distribute IP’s to new machine?

DHCP can be used to push specified IPs to specified clients giving best of both worlds.

@Mediasafe,

As @shoulders has explained, DHCP is NOT always about assigning a “random” IP address, but can actually be setup to “map” an IP to for instance a “MAC address” of a computer therefore making it “static” in nature.

*** I do this within my own home network for instance ***

The primary difference is, instead of “hard-coding” the static IP address in the intended system configuration, the network operator can configure the IP address assigned to a VPS or Bare Metal system at the “network level”, then have the VPS or Bare Metal system request their IP address via DHCP.

It’s quite common for large data centers to make use of DHCP in order to streamline deployment of servers.