-Challenge-
I have scoured the internet for weeks trying to figure this out, email must come from the same domain name that my website has as the URL (sub-domain is fine).
-What I have so far-
- NameCheap (registrar) domain name, and ssl certs for both website,com and mail,website,com
- Working out of Digital Ocean, and my account has access to ports 25/587
- Either glue records set up on NC, pointing to like mail,website,com (MIB server on a D.O. droplet) which gets MIB working but it’s impossible to do anything else with it (dynamic site, modifications to NGINX, etc.) OR I can get the dynamic site to work beautifully on it’s own by pointing to the registrar (NC) to D.O.'s nameservers (ns1/ns2/ns3 … or w/e it’s called), then using the D.O. DNS interface for all the website’s DNS (but then I can’t use MIB). Seems to be I can get one or the other working basically.
-So-
Apparently you can use the Glue Records at the parent registrar and send everything to the MIB on a D.O. Droplet from the get-go, then from within MIB you can set up all the DNS from there. For instance, naming the droplet to a FQDN like mail,website,com works for MIB setup, then when I go to the ‘Custom DNS’ settings from the admin panel, it has two fields and the one on the right has a forced item populating the field that cannot be altered like: ‘mail,website,com’ and it does not allow you to change it to say, just ‘website,com’, so I tried renaming my droplet to just the base domain fqdn like ‘website,com’’ and it works for MIB setup, but then the problem is the forced NGINX integration makes is so there is now a static site served at website,com’ so you’re screwed going that route (apparently you may be able to make changes to the NGINX config that aren’t overwritten by MIB but at that point I’d rather separate them out on separate droplets).
-Separate them out??-
Would it be possible to say have a simple glue record at source (NC), setup a basic MIB with like ‘mail,website,com’, then from MIB settings using MIB DNS settings you can send normal “website-style traffic” like URL/API requests to a different droplet / IP for the base domain ?? Like I want to be able to do email, and have a website, both using the same base domain name.
-Desired Outcome-
In the end, the ultimate goal would be to have one or two digital ocean droplets, where I can send/receive mail from the same domain name, whilst also having a dynamic website set up at the same base domain name (i.e. mail to/from as ‘mail,website,com’ and a working website with url of ‘website,com’). If the various settings requires me to have a subdomain, mail,website,com is fine and preferred, but raw domain is also fine for mail addresses if that is easier.
Thanks to anyone willing to offer their time to help, this would be significantly helpful to me if it’s something that’s possible.