0

I have postfix in rhel 7.7 and in system I have users such as root, james, peter etc. My FQDN of server is zwados.yutery.com and hostname is zwados. I need to send a mail from here from user root@gedyuyu.com to james@gedyuyu.com. Now how can I configure or create this domain gedyuyu.com which is just a domain in my machine zwados?

I am thinking in terms of hmail server in Windows where you can add domains in a Windows OS machine and then under that domain add users. You don't have to purchase domains in hmail server as they are locally viable.

Raghav Gupta
  • 111
  • 3
  • You can setup a nameserver. Then, if your server is zwados.yutery.com, make the e-mail like mail.yutery.com. – Overmind Apr 28 '20 at 06:54
  • By nameserver you mean to say I can create a domain like @gedyuyu.com ? – Raghav Gupta Apr 28 '20 at 07:16
  • Here's a setup example: https://www.tecmint.com/setup-local-dns-using-etc-hosts-file-in-linux/ – Overmind Apr 28 '20 at 07:34
  • It doesn't tell how to setup multiple domains - Like I want to have domains with same IP gedyuyu.com 172.16.4.5 kiop.com 172.16.4.5 – Raghav Gupta Apr 28 '20 at 08:56
  • It is really simple, because you can create as many zones (aka domains) as you want. Any host on those domains can point to the same IP address. So you could host `domain.com` and `domain.net` on the same server and let them point to the same IP address. I host 4 mail domains that way. – Lasse Michael Mølgaard Apr 28 '20 at 10:53
  • @LasseMichaelMølgaard, any blog or link for configuring that? Also are some changes need to be done in postfix configuration file after that? – Raghav Gupta Apr 29 '20 at 10:18
  • Yes postfix needs to know which domains are local to the postfix server. You do not want the postfix to be responsible for accepting a mail sent from Internet to the server for non-local domain, because that means your server is an open relay. Spammers love to abuse open relay mailserver. The server should accept mails from the internet to your domains or **authenticated** clients sending from your domains to the Internet. Everything else should be discarded by default. – Lasse Michael Mølgaard Apr 30 '20 at 01:02

0 Answers0