DNS records for site and MaiB hosted on different servers

Hi, I host my site as a ‘gitlab page’ with custom domain. gitlab requires it to point sites A record to gitlabs IP. but MiaB. Also my domain provider is cloudflare, so I can’t add custom nameserver / glue records.
The external DNS tab in control panel of MiaB shows I ‘need’ to point my A record to IP address of MiaB machine. what is the alternative here I can’t add two A records definitely.
Also, the DNS records generated are with my domain name directly. like control panel tells me to use example.com/mail to go to webmail but as it’s a gitlab page, that will give 404 so I need to go to 1.2.3.4/mail instead.
because of one of these issues, I am able to send the mail but can’t receive.
Can you tell me what is the correct process to setup the server for MaiB only and make emails work

This is only true if you are hosting a static web page on the MiaB server itself. In your case, point the A record to where it needs to be pointed and ignore the error on the status page. This of course does not apply for the subdomain that your MiaB is installed on as the A record for that subdomain needs to point to your MiaB server so that the admin page and webmail can be properly hosted.

Please PM me your box’s hostname so I can see how your DNS is set up and guide you in the rest of your question.

1 Like

This does not sound right … would you also PM me a screen shot of your external DNS page if you’d like me to look at it.

1 Like

It should work like this:

box.domain.com/mail for all domains

IF website is also hosted on MIAB server then domain.com/mail will work

IF website is NOT hosted on MIAB server then domain.com/mail WILL NOT work.

Want /mail on server not hosted in MIAB server, then you need to do an HTML redirect from domain.com/mail to box.domain.com/mail.

The bos’s primary domain (typically box.yourdomain.com) must have an A record that points to the box, otherwise no server would be able to contact it to deliver mail! (Or, likewise, for users to check their mail.)

For other domains that the box is hosting mail for, the A record can point anywhere.

In the OP’s example he was referring to the A record for example.com, not box.example.com. I did make a minor edit to my original response to avoid any confusion.

@alento is correct, I am pointing A record to IP of example.com and not box.example.com. In fact, I am not using box.example.com for any reason. I guess that’s what went wrong. I installed the MiaB again and guess the mail incoming/outgoing is working now.

Still here are the steps I followed just in case if you want to debug errors from the first attempt:

before MiaB:

A --> 1.2.3.4 (IP of example.com)
that’s the only DNS record I hold

After MiaB:

  1. digital ocean droplet named: box.example.com
  2. Ran the installation script directly as I can’t add glue records
    a. in installation, used box.example.com as hostname
  3. suggested email was me@box.example.com changed it to me@example.com as I want root level domain for email
  4. setup was complete, went to webmail on given ip/admin address which was digital oceans droplet IP for webmail
  5. added all the domain records from ‘System -> External DNS’
    a. I doubt if I am supposed to add TXT records for ns1.box.example.com and ns2.box.example.com as I don’t hold glue records for ns1 ans ns2 with my domain
  6. Now my A record points to gitlab pages IP and ALL other records are given by MiaB.

Is this correct? hopefully it is, as it’s working now, also I can visit box.example.com/mail for webmail instead of IP address.

Yes, I think that you have it correct now.

The hostname of the server used for MiaB needs to be a specific host name. The creators of MiaB made box the standard host name used for demonstration purposes but it can be a different host name. I was suspecting that when you initially set up MiaB that you did not assign the box an actual host name, but instead called it example.com? If not, which host name did you use?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.