I'm trying to learn about linux and network administration, so I'm not especially concerned if this is not the most efficient way to do things.
I have a server at home running Ubuntu 20.04.
I've set up SSH including keys, OpenVPN, remote desktop and basic file-sharing. So far so good.
My ISP won't provide a static IP, so I access the server using the noIP service. Let's call the address myserver.ddns.net - so my ssh login is user@myserver.ddns.net.
I have several domain names that I'd like to add email addresses to. Let's call one of them 'example.com'. These are hosted by a small hosting company - to set MX records on these I open a support ticket and the admin sets them for me.
I'm looking at managing this server using postfix (because it seems best supported) and probably just having it forward email to an outlook.com box. I know that the first step of the setup is to make sure that any email sent to mail.example.com is directed to the postfix server, which will reside at whatever IP myserver.ddns.net is currently pointing to.
I also know that the Ubuntu hostname of the server running Postfix needs to match the FQDN in the MX record.
Can you please help a newbie really break down the connections from the FQDN -> noip -> my postfix server.
- The FQDN is example.com - therefore I ask my hosting server admin to place an MX record to redirect mail heading to mail.example.com?
- Because I don't have a static IP, this redirect needs to go to my noIP service. So I'm asking my hosting admin to direct mail.example.com to a) mail.myserver.ddns.net? b) myserver.ddns.net? c) something else?
- The Ubuntu server running postfix needs to have its hostname property set to match a) the FQDN name (hostname "example") b) the noIP address (hostname "myserver.ddns.net?" - but then I'm running into issues with "."s) c) something else?
I think that it should be:
- mail.example.com -> myserver.ddns.net (Ubuntu hostname "example")
Like many things when I'm learning, I think the thing that's causing me the most grief is the initial step... Everything beyond this seems reasonably straightforward.
Thanks all!