Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Hellrazor

FQDN and mail server

6 hours ago, GM173 said:

No, I am not putting this on the internet. I just want a local server to simply receive and send emails. I am following this guide and because they used .com I thought it wouldn't be a problem to use it.

No issue in using .com or whatever you want (internally) - but you will definitely need a proper DNS server so you can create MX records. When a client attempts to send mail to say administrator@wantedstarling.com it will reach out to the DNS server to figure out what mail server(s) to use (this is the mx record) - the mx record will then point to the DNS entry for your mailserver (zimbra.wantedstarling.com) which will point to your IP (192.168.2.50).

 

However to make this work you either need to have these computers use your new DNS server as their primary or enter a domain override in your current DNS server for all wantedstarling.com queries to go to your DNS server.

 

There are a number of linux DNS servers, the most popular being unbound, BIND, and DNSmasq to name a few. I ~believe~ ubuntu 18+ ships with DNSmasq these days. Windows of course also has a DNS role you can use - but if DNS is your only need that's overkill imo.

 

**edit I just looked over the link you sent and they recommend DNSmasq - so there you go, just need to follow the guide you're referencing.

Recommended Posts

Posted · Original PosterOP

Hello, I have been trying for weeks to set up a mail server. I read everywhere about that FQDN. And I see in order to set the FQDN I must change the hostname on my linux distro. Everytime I do and try to ping it after it, I dont get a reply. So my question is, do I have to rent a domain? Can't I set the FQDN of my server by just changing the hostname on my linux to my preferred hostname? Is this the reason I don't get a reply when pinging?

 

Thank you for your time

Link to post
Share on other sites

1) When changing hostname, also change your /etc/hosts file to reflect the new hostname. This is a required step whenever changing hostname. Otherwise your machine has no idea what machine it is talking about, as it checks /etc/hosts and then turns to the DNS server.

In addition I recommend updating your DNS server records, if the DHCP/DNS does not pick it up itself.

2) You do not have to purchase a domain, you can use any domain. But if you use a publicly used one, you may run into IP resolving issues. There are four TLDs, that you can use freely, as they are reserved (RFC 6761) for private use:  .example, .invalid, .localhost, and .test


Skynet: MacBook Pro Late 2016 Space Gray | i7-6820HQ 2.7 GHz | 16 GB LPDDR3 | Radeon Pro 455 2048 MB | 512 GB NVMe SSD | 15" 2880x1800

HAL9000: Intel i5-9600k | Cryorig M9 | 16 GB Corsair Vengeance LPX DDR4 3200 MHz | Gigabyte Z390I AORUS PRO WIFI | MSI GTX 1080 Ti SeaHawk X | 1 TB Samsung 970 Evo Plus + 1 TB Crucial MX500 + 256 GB Samsung 850 Pro | Corsair TX650M | NZXT H210i | LG 34UM95 34" 3440x1440

Hydrogen server: Xeon E5-2675 v3 | Cooler Master Hyper 212X | 64 GB Kingston/Samsung DDR4 ECC | Asus Z10PA-D8 | Corsair HX1000 | 256 GB Samsung 850 Evo + 3x 3 TB WD Red + 2 TB Seagate | Fractal Design Define R5 | unRAID 6.7.0

Carbon server: Fujitsu PRIMERGY RX100 S7p | Xeon E3-1230 v2 | 16 GB DDR3 ECC | 60 GB Corsair SSD & 250 GB Samsung 850 Pro | Intel i340-T4 | ESXi 6.5.1

Big Mac cluster: 2x Raspberry Pi 2 Model B | 1x Raspberry Pi 3 Model B | 2x Raspberry Pi 3 Model B+

Link to post
Share on other sites
53 minutes ago, GM173 said:

Hello, I have been trying for weeks to set up a mail server. I read everywhere about that FQDN. And I see in order to set the FQDN I must change the hostname on my linux distro. Everytime I do and try to ping it after it, I dont get a reply. So my question is, do I have to rent a domain? Can't I set the FQDN of my server by just changing the hostname on my linux to my preferred hostname? Is this the reason I don't get a reply when pinging?

 

Thank you for your time

 

The FQDN is as the acronym describes..a fully qualified domain name. 

You need to be able to resolve all levels of the domain in your DNS. So if you're using something like emailserver.local, then <emailserver> has to exist in your DNS server under the Forward Lookup Zone called 'local' . 

 

If you just want to be able to resolve it from your test machine without a domain or a proper DNS server, then you can edit your C:\Windows\System32\Drivers\etc\hosts (Windows) or /etc/hosts (Linux) file on your test machine


Spoiler

Desktop: Ryzen 7 2700x | Aorus X470 Gaming Ultra | EVGA GTX1070 FTW | 32GB (4x8GB) Corsair Vengeance RGB Pro 3200Mhz | Corsair H105 AIO, NZXT Sentry 3 | Corsair SP120's | 1TB Crucial P1 NVMe, 4TB WD Black | Phanteks Enthoo Pro | OCZ ZX 1250w | LG 32" 32GK850G Monitor | Ducky Shine 3 Keyboard, Logitech G502, MicroLab Solo 7C Speakers, Razer Goliathus Extended, X360 Controller | Windows 10 Pro | SteelSeries Siberia 350 Headphones

 

Spoiler

Server 1: Fractal Design Define R6 | Ryzen 3900x | ASRock X570 Taichi | EVGA GTX1070 FTW | 64GB (4x16GB) Corsair Vengeance LPX 3000Mhz | Corsair RM650w | Fractal S36 Triple AIO | 10 x 8TB WD White Labels | 1TB Corsair MP600 Gen4 NVMe | 1TB Samsung 970 Evo Plus NVMe | 2 x 2TB Samsung 860 EVO | LSI 9211-8i HBA

 

Server 2: Corsair 400R | IcyDock MB998SP & MB455SPF | Seasonic X-Series 650w PSU | 2 x Xeon E5540's | 24GB DDR3-ECC | Asus Z8NA-D6C Motherboard | AOC-SAS2LP-MV8 | LSI MegaRAID 9271-8i | RES2SV240 SAS Expander | Samsung 840Evo 120GB | 2 x 8TB Seagate Archives | 12 x 3TB WD Red

 

Link to post
Share on other sites
Posted · Original PosterOP

So if I understand well, the following configuration on /etc/hosts is not valid:

 

Annotation 2019-05-20 120849.png

 

I need something like zimbra.wantedstarling.local.

Link to post
Share on other sites
5 hours ago, GM173 said:

So if I understand well, the following configuration on /etc/hosts is not valid:

 

Annotation 2019-05-20 120849.png

 

I need something like zimbra.wantedstarling.local.

 

I thought you were setting this up for internal testing. 

Are you trying to get this working on the internet? 

 

You either need to 

 

A) Own the domain and configure MX / SPF records. Need an SSL certificate to enable TLS (assuming your ISP blocks port 25 and you want some security). Need a static IP address

 

or B) You'll need a domain and to configure a send connector to a Smart Host service

 

You don't need to set the FQDN in your servers hostname. Your point your domain names A / MX records at your IP address, and then port forward your mail ports (e.g 25, 587) on your router like any other service. 


Spoiler

Desktop: Ryzen 7 2700x | Aorus X470 Gaming Ultra | EVGA GTX1070 FTW | 32GB (4x8GB) Corsair Vengeance RGB Pro 3200Mhz | Corsair H105 AIO, NZXT Sentry 3 | Corsair SP120's | 1TB Crucial P1 NVMe, 4TB WD Black | Phanteks Enthoo Pro | OCZ ZX 1250w | LG 32" 32GK850G Monitor | Ducky Shine 3 Keyboard, Logitech G502, MicroLab Solo 7C Speakers, Razer Goliathus Extended, X360 Controller | Windows 10 Pro | SteelSeries Siberia 350 Headphones

 

Spoiler

Server 1: Fractal Design Define R6 | Ryzen 3900x | ASRock X570 Taichi | EVGA GTX1070 FTW | 64GB (4x16GB) Corsair Vengeance LPX 3000Mhz | Corsair RM650w | Fractal S36 Triple AIO | 10 x 8TB WD White Labels | 1TB Corsair MP600 Gen4 NVMe | 1TB Samsung 970 Evo Plus NVMe | 2 x 2TB Samsung 860 EVO | LSI 9211-8i HBA

 

Server 2: Corsair 400R | IcyDock MB998SP & MB455SPF | Seasonic X-Series 650w PSU | 2 x Xeon E5540's | 24GB DDR3-ECC | Asus Z8NA-D6C Motherboard | AOC-SAS2LP-MV8 | LSI MegaRAID 9271-8i | RES2SV240 SAS Expander | Samsung 840Evo 120GB | 2 x 8TB Seagate Archives | 12 x 3TB WD Red

 

Link to post
Share on other sites

You could try using something like no-ip that offers a free domain for this or you could buy one for cheap at namecheap

Link to post
Share on other sites
7 hours ago, GM173 said:

So if I understand well, the following configuration on /etc/hosts is not valid:

 

Annotation 2019-05-20 120849.png

 

I need something like zimbra.wantedstarling.local.

 

Are you editing the hosts file on the mail server, or your client computer? Host file is just an over-ride for DNS resolutions.

 

If you want to browse the webpage from say your windows computer, you will need to either edit the windows' computer hosts file or make a manual DNS entry on your local DNS server (probably 192.168.1.1 your router or if you have a windows domain, would be your domain controller). For windows this file would be c:\windows\system32\drivers\etc - you need to edit it with Notepad ran as administrator.

 

If you want to receive mail you will need MX records and for that you need a little more than what your basic router can provide you. I think you also need a little more understanding of DNS in general.

 

 

and as @Jarsky asked - are you putting this on the internet? If so, you will need to purchase wantedstarling.com if you haven't done so already.

Link to post
Share on other sites
Posted · Original PosterOP

No, I am not putting this on the internet. I just want a local server to simply receive and send emails. I am following this guide and because they used .com I thought it wouldn't be a problem to use it.

Link to post
Share on other sites

If it's local, its not a problem to use it - but you need to specify it in your DNS server, or you need to add a static host entry into your hosts files on all machines you want to be able to talk to the server.

 

DNS is hierarchical . 

 

First it will check your local hosts file on your machine

Then it will go to your local DNS server/lookup zones

Then it will go to your regional DNS (e.g ISP, Google, Cloudflare, etc...as you have it configured)

Then it will go to gTLD then root DNS servers

 

So if you configure it locally, then you can resolve it locally; but its best practice to use private TLD's like .local or .lan or .localdomain when testing. 


Spoiler

Desktop: Ryzen 7 2700x | Aorus X470 Gaming Ultra | EVGA GTX1070 FTW | 32GB (4x8GB) Corsair Vengeance RGB Pro 3200Mhz | Corsair H105 AIO, NZXT Sentry 3 | Corsair SP120's | 1TB Crucial P1 NVMe, 4TB WD Black | Phanteks Enthoo Pro | OCZ ZX 1250w | LG 32" 32GK850G Monitor | Ducky Shine 3 Keyboard, Logitech G502, MicroLab Solo 7C Speakers, Razer Goliathus Extended, X360 Controller | Windows 10 Pro | SteelSeries Siberia 350 Headphones

 

Spoiler

Server 1: Fractal Design Define R6 | Ryzen 3900x | ASRock X570 Taichi | EVGA GTX1070 FTW | 64GB (4x16GB) Corsair Vengeance LPX 3000Mhz | Corsair RM650w | Fractal S36 Triple AIO | 10 x 8TB WD White Labels | 1TB Corsair MP600 Gen4 NVMe | 1TB Samsung 970 Evo Plus NVMe | 2 x 2TB Samsung 860 EVO | LSI 9211-8i HBA

 

Server 2: Corsair 400R | IcyDock MB998SP & MB455SPF | Seasonic X-Series 650w PSU | 2 x Xeon E5540's | 24GB DDR3-ECC | Asus Z8NA-D6C Motherboard | AOC-SAS2LP-MV8 | LSI MegaRAID 9271-8i | RES2SV240 SAS Expander | Samsung 840Evo 120GB | 2 x 8TB Seagate Archives | 12 x 3TB WD Red

 

Link to post
Share on other sites
Posted · Best Answer
6 hours ago, GM173 said:

No, I am not putting this on the internet. I just want a local server to simply receive and send emails. I am following this guide and because they used .com I thought it wouldn't be a problem to use it.

No issue in using .com or whatever you want (internally) - but you will definitely need a proper DNS server so you can create MX records. When a client attempts to send mail to say administrator@wantedstarling.com it will reach out to the DNS server to figure out what mail server(s) to use (this is the mx record) - the mx record will then point to the DNS entry for your mailserver (zimbra.wantedstarling.com) which will point to your IP (192.168.2.50).

 

However to make this work you either need to have these computers use your new DNS server as their primary or enter a domain override in your current DNS server for all wantedstarling.com queries to go to your DNS server.

 

There are a number of linux DNS servers, the most popular being unbound, BIND, and DNSmasq to name a few. I ~believe~ ubuntu 18+ ships with DNSmasq these days. Windows of course also has a DNS role you can use - but if DNS is your only need that's overkill imo.

 

**edit I just looked over the link you sent and they recommend DNSmasq - so there you go, just need to follow the guide you're referencing.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×