0

Let's say I bought this domain: example.com Name servers under DNS manager all points to example.com That subdomain(example.com) of nameservers points to an IP. Also, note that hostname unique is under an A record to said IP

My First question: under etc/hosts, how should the FQDN be

  • xx.xx.xxx.xxx unique.example.com unique OR
  • xx.xx.xxx.xxx example.com example OR
  • xx.xx.xxx.xxx unique unique

Both have dns records and both represent the same ip. In the first case unique is the hostname and the FQDN is unique.example.com. In the second case, example is the hostname and example.com is the FQDN.

So, given a FQDN have to represent the server name. Which one is true ?!

Given all that, when I try to install postFix, and it asks for FQDN, I just don't know what to write as both options seems valid.

However, if I write unique.example.com then my emails become user@unique.example.com which is not what I would expect.

Context: Ubuntu 14.04 VPS, webmin/virtualmin. I accidentaly installed sendmail package and my whole postfix virtual min is no longer working! So, that question comes from me trying to install back postfix.

delmalki
  • 115
  • 5

2 Answers2

0

unique.example.com is the correct FQDN, where unique denotes the hostname and example.comis the parent domain.

example is not a hostname, and com is a TLD (Top Level Domain), so example.com is not a fqdn and as such is not valid and not same as unique.exampl.com. Read deatils here: What is a fully qualified domain name (FQDN)?

A fully qualified domain name (FQDN) is the complete domain name for a specific computer, or host, on the Internet. The FQDN consists of two parts: the hostname and the domain name. For example, an FQDN for a hypothetical mail server might be mymail.somecollege.edu. The hostname is mymail, and the host is located within the domain somecollege.edu.

When you enter unique.example.com as fqdn, this will be used as to configure myhostname and mydestination in /etc/postfix/main.cf and so there is nothing to be worried about.

Diamond
  • 9,001
  • 3
  • 24
  • 38
  • Thanks for the answer, I wasn't able to fix the postfix problem as I completely destroyed the MTA bridge and the logs were driving me crazy issue after issue. It's my 4 days as a sysadmin lol, I just reformatted and now webmine controls the DNS zone therefore the associated mail stuff records. – delmalki Feb 02 '16 at 00:29
0

The FQDN (Fully Qualified Domain Name) the is complete name ending with a dot (https://en.wikipedia.org/wiki/Fully_qualified_domain_name)

In /etc/hosts you put the full and short name (but no fqdn)

127.0.0.1 localhost 1.2.3.4 mail.example.com mail

Forging the email address for locally generated mails is the role of your mailer program or your local mail server (like exim or postfix). There you can choose to generate user@mail.example.com or user@example.com or user@cia.gov.

François
  • 171
  • 3