Using IP address in place of hostname causes issues with Postfix

Centos
6.10

Apologies if this post is similar to another, I’ve looked for a while and couldn’t find anything that helped.
So im running the installer, and when it prompts me to give me hostname, since it cant be fully qualified, I enter my ip, since that is the hostname of the vps, I checked by running hostname --fqdn. however while configuring PostFix, it returns this error.
Failed to regenerate table /etc/postfix/virtual: postmap: warning: valid_hostname: numeric hostname: myiphere
postmap: fatal: unable to use my own hostname.
It then halts the install and wont let me progress, is there a solution at the moment? any help greatly appreciated :slight_smile:

Says who???!

Ah sorry I confused you, I didnt’t write it correct, I mean the hostname it has cant be qualified, it returns this error
[ERROR] Your system hostname lolznet is not fully qualified.
I tried to change my hostname to lolznet to see whether that could correct the issue, but it then returns that error again.

A fully qualified hostname is a combination of some identifier DOT a fully-qualified domain name, as declared by the authoritative name server for the domain. for example:

server1.example.tld

WHERE

“example.tld” is a registered domain

AND

the authoritative name server for “example.tld” has entries for “server1.”

A server name without a domain cannot be fully-qualified.

What exactly is the role of this server?

Richard

So I cant setup virtualmin without a domain/website name? And I’m just trying out different ones too see what I like the most.

You certainly could setup virtualmin without a domain/website name. Many people do.

You will have to use your imagination and come up with a name which you could use as the hostname of the server on which you install Virtualmin - using an IP address in place of hostname will not do; it causes issues with Postfix, as you have seen.

For people who are challenged in thinking up suitable hostnames, there is a website (and maybe even an app) for that: Ideas for Hostnames

So I dont need a domain name to host? But I thought with the solution RJM said you need it to be in the format server1.example.tld with example.ltd being a registered domain name? Also ty for that website lol if I somehow struggle to think of a hostname I’ll use it

It depends on the role of the server. If it’s a local testing server, for example, then no, you don’t. If it’s a public Web server (or mail server, or whatever) that you want the world to be able to access using the usual convention of a human-language name, then yes, you do. That’s why I asked the server’s role.

In other words, you can name the server whatever you want. But for the world to be able to access it by that name, it has to be on a registered domain and declared in that domain’s authoritative DNS server’s settings.

Richard

1 Like

Oh so I’d just need to purchase a domain name? That’s easy enough, so for example I purchase from namecheap a domain, if I then redirect the domain name to my vps, or link it in some way, I can then have a fully qualified hostname? You basically summed up my issue so once this query is cleared I’ll figure out how to close the thread or say your answer was the solution :slight_smile:

Basically, yes. But for a public server you would also want to purchase hosting. If you want to use Virtualmin, you would have to either buy a shared plan that uses Virtualmin, or a VPS or dedicated plan that allows you to install whatever OS and panel you like.

You also would have to decide on what DNS to use. Virtualmin includes BIND and installs it by default. If you want to use it, however, you need to register the nameservers you create. You would do this through whatever registrar registered the domain name that the server will be using. Then you would set the nameservers for the domain to the ones you just registered.

I get the impression that running a public Web server isn’t what you want to do, however. If it is, then you probably should study up on it a bit and/or keep asking questions here before actually doing it. It’s not rocket surgery, but there are some things you have to know and do to make it all work.

If you’re looking for something to play with at home or to use as a learning lab for setting up a public Web server in the future, using a standard DHCP Internet connection, that can be done, too. However, since I’ve never actually set up Virtualmin on anything other than a public server, someone else who has would be better-qualified to help you with that.

Richard

That sums it up perfectly, thank you so much for helping me through with this I appreciate it alot, I’ll most likely stick with my current vps cause it’s quite good, but I’ll get a domain and watch or read more on it to set it all up, Once again, thank you :slight_smile:

Matt

Glad to help.

Richard

1 Like

No, that’s not necessary for installing and setting up Virtualmin. But, your system must have a fully qualified domain name. It does not have to be one that resolves for anyone else, just for testing. The system host name has nothing to do with DNS or registering domain names.

If you plan to actually use your Virtualmin server for hosting, it obviously must have a domain name that resolves for the rest of the world.

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.