0

I recently got a VPS and have a fresh Ubuntu install, but I'm a bit confused as to how I should be setting up the hostname and /etc/hosts file if I'm wanting to set up an email server (Dovecot/Postfix) as well as use it for a NodeJS dev platform (and later hosting production stuff).

I read that you're supposed to set your FQDN (and hostname) to mail.domain.com to avoid issues with Postfix, but that seems odd to do in my use case if I'm going to be using this VPS for a few other things as well.

Should I still do this, then handle other subdomains/etc via something like nginx if I'm going to point traffic at various Express/React apps once they're running?

I'm pretty new to the server/system administration side of all of this.

Thanks in advance for any advice!

MisutoWolf
  • 103
  • 2
  • your physical hostname has nothing to do with your postfix. my server's have cryptic names and how wonderful my mailserver is respond to mx.domain.tld or mail.domain.tld – djdomi Jul 10 '21 at 22:04

1 Answers1

3

Name it whatever you want. There's nothing magical about mail.example.org; it's just a commonly used name for mail server. The mailserver may as well be named example.org or zaphod.beeblebrox.is.alien.example.org. Heck, it need not be in the same domain as the domain it's handling mail for.

vidarlo
  • 6,654
  • 2
  • 18
  • 31
  • Alrighty. I’ll work on getting it set up tonight then. – MisutoWolf Jul 10 '21 at 22:27
  • Just be sure to keep in mind that many mail servers perform forward confirmed reverse DNS (FCrDNS) checks on sending servers. If the check fails, the mail may be rejected or even discarded. – Paul Jul 11 '21 at 12:45