Fresh setup of mailinabox with GoDaddy Domains

Hello,

I am so glad that I have come across ‘mailinabox’ by submitting a post in reddit. So far, only heard good things about it.

However, I having troubles with its intial setup. The guide looks straight forward but I am not sure where I went wrong.

My scenario:

I own a server that is in my office that has Ubuntu 14.04 freshly installed for mailinabox. It has access to the internet.

I have a domain called- ‘gcode.com’. I also have a subdomain for this purpose- ‘mail.gcode.com’ hosted by GoDaddy. I would like my users send email using - ‘user1@gcode.com’,‘user2@gcode.com’ and so on…I want to access the mailinabox admin using ‘mail.gcode.com/admin

My questions:

During mailinabox setup, what do I put my hostname as in the mailinabox setup?
Do I need to make any change in my GoDaddy?
Do I have to add new NameServers to point to my Server?
Do I have to add new Mail Exchange under GoDaddy?

Currently, my subdomain- ‘mail.gcode.com’ points to an internal server that is hosting hmail and roundcubewebmail. I intend to change it for mailinabox.

Please help. Thank you.

This is something that I need to configure as well.

but I cannot even get the basic setup working.

I manage to get to the admin interface by adding the localhost as the hostname. However, I cannot login even with the credentials made during the setup of mailinabox

I don’t understand what you’ve done, so I can’t really provide any advice.

Hey gcode,

To give you a bit of an overview, here’s what a model configuration might look like:

If MIAB setup completed successfully then the appropriate firewall ports will be opened on your-server.example.com to receive and send email. You should be using a static IP from your ISP, and they cannot be blocking port 25.

* You will need to set the Glue Records at your domain registrar. However, you can host the DNS anywhere you wish, but MIAB likes to do that for you since it will automatically configure the proper records for your hosted domains. If you go to the System -> External DNS page you will see a list of DNS records to set for your domains, if you wish to host their DNS elsewhere.

CAUTION: Changing your DNS settings may cause your other web services, such as website hosting, to stop functioning. Don’t change your name servers for gcode.com unless you can configure MIAB to point to the right IP addresses for your GoDaddy hosted services, and keep any such IPs up to date. Configure those on your MIAB before changing your name server records to the MIAB. Remember, you can use the External DNS page in the MIAB admin panel to find the DNS records to enter at GoDaddy instead of changing your domain name servers.

This gets you a basic working MIAB. Substitute in your own variables and see if there’s a mismatch.

@J376A @JoshData

Hey, Thank you for your reply. I do not intend to change GoDaddy Name Servers as that might cause my other web services to stop working.

My MIAB is on an internal network ip address- 192.168.1.25
The host name of the Server is- mail.gcode.com
so should I create:

A record for mail.gcode.com:192.168.1.25?
MX record for gcode.com: mail.gcode.com?
DNS Server will be GoDaddy NameServers

How do I go about setting up the External DNS to make this work?

Please advice. Thank you.

Hi @gcode,

Unfortunately that will not work, and why your mail is not being delivered. You need the IP address of the MIAB server to be a globally routable, public IP address (e.g. 8.8.8.8). The 192.168.1.25 address cannot be routed over the Internet, just the local network. That is going to be the first thing that you’ll need to address. You would most easily do this by getting a Virtual Private Server (e.g. digitalocean.com, vultr.com are both popular with MIAB users).

Example:
My MIAB lives at box.example.com, which is a DigitalOcean server. The A record for box.example.com is pointing to that servers IP: 8.8.8.8. Everyone on the internet can reach 8.8.8.8, and I added MX (the Mail Exchange) records for example.com as box.example.com in the GoDaddy control panel.

@J376A Thank you for your prompt response.

So one cannot host MIAB on an internal server? The reason being is we got plenty of in-house resources to host servers, we do not want to pay DigitalOcean for a VPS.

Do you have any suggestions as how one can use an internal server to host MIAB?

Hey @gcode,

Not a problem. I certainly understand wanting to use the resources you already have. To host it internally you’ll need a few things:

  • Make sure you can put the server in a DMZ. This is the most straightforward and lowest maintenance way to host it on your network.
  • Make sure you have a static IP from your ISP.
  • Run your IP through the MXToolbox SuperTool to ensure your IP and domain are squeaky clean and not on any spam blacklists. MIAB set up will do this for you too. If they are on such blacklists, you should not deploy the MIAB right away. Instead work with your ISP/the blacklist provider to remove your IP, or ask them to assign another and test again.*
  • Make sure the ISP does not block ports 25, 465, or 587. These are the ports that mail clients and other email servers will use to connect to your email server. You can set up MIAB and then use the MXToolbox SuperTool to help you determine that the SMTP ports are open and available.
  • Ask your ISP to create or update the PTR record for that IP address to the hostname for your mail server.*
  • Add an A record in GoDaddy for your mail server, pointing at the IP address your ISP has assigned you.

You should go ahead and re-run MIAB setup to reconfigure the MIAB stack. Don’t worry, if you already have data it should not delete anything.

Now, once MIAB is reconfigured, login and go to System -> External DNS, and add the entries for your domain to GoDaddy’s DNS service. Make sure to set low TTLs in case something goes wrong, so you can easily correct the error with a minimum of downtime. Once you’re done, you can use intoDNS to make sure everything looks kosher. Good luck!

* Be aware of any fees your ISP may charge for these services. Some do, some do not.

Check back if you need more help or have more questions about how MIAB works :slight_smile:

@J376A Thank you so much for helping me out!. I will still need some help as this is all new to me… you know like they say- ‘it gets worse before it gets better’ :stuck_out_tongue:

I am sure my ISP does not block any ports because before trying out MIAB, I deployed HMAIL with RoundCube Webmail, I was able to use emails just fine.

I was introduced to MIAB and heard its pretty good, so I am trying to install this.

As to calling my ISP and asking them to create/update PTR record- will that cause any of my existing websites to go down? Plus I have several other domains resting on that IP address for example gmcode, grcode and couple others are also hosted on GoDaddy and have webpages. ‘gcode’ is the main one so I want to have an email address using that. Hence, using implementing an email server using MIAB for ‘gcode’ domain so I can have email address such as user1@gcode.com and so on…

Please advice. Thank you!

Hey @gcode,

Not a problem! Email and DNS can be a tricky topics and we all start somewhere :slight_smile:

Changing the PTR (pronounced ‘pointer’) record shouldn’t harm any of the web services you’re already running unless you’re running email services at that IP address right now, or something unusual is in place. HTTP traffic generally only cares about getting to your IP address using your domain name, so changing the PTR record shouldn’t affect anything. You shouldn’t experience downtime with your ISP for this change either.

Without getting too far ahead of ourselves, you’ll be able to have this MIAB handle email for all your domains, so you don’t need to run multiple mail servers (unless you wish to, but doing that on a single IP is not advised.)

Thank you @J376A for taking some time to help me.

To my knowledge- there should not be any other email services running on that IP Address. However, I do have another domain in GoDaddy that uses GoDaddy email provider for our emails at the moment if that matters.

So I just call my ISP, tell them pointer my to mail.gcode.com? Where mail.gcode.com is ‘A’ host in the GoDaddy ‘gcode’ domain that points to my

Do I have to add any CNAME or MX in GoDaddy while I am it ?

Please advice.

@gcode

No problem! :smile:

As long as there isn’t another email server at that IP you should be okay. The GoDaddy email won’t become an issue for you to change your PTR.

Yep - just call them and ask them to update your PTR to mail.gcode.com. Then at GoDaddy, make an A record for mail.gcode.com point to your IP address. Once both of those steps are done you’ll have a mail server that passes forward-confirmed reverse DNS. That means that in the reverse DNS zone that ties IP addresses to domain names, mail.gcode.com will appear for that IP, and in your gcode.com DNS zone, the IP for mail.gcode.com will be your IP address. This is essential for good email deliverability.

You won’t need to add any CNAMEs for this, and we’ll want to make sure you can send and receive email before changing the MX records, to make sure you only change them after everything is working.

Once you have that done, you will:

  • Make sure your server can send and receive internet traffic. If you haven’t changed the network configuration from when you used hMail, you should be okay here. Remember we need the server to be in the DMZ.
  • Make sure that the reverse DNS is set properly (check out http://www.intodns.com/gcode.com, scroll down to the PTR section in MX [fourth up from the bottom]). If your IP address is for example 1.2.3.4, you should see “4.3.2.1.in-addr.arpa -> mail.gcode.com”. What you’re seeing is correct, the IP will be backwards and have .in-addr.arpa at the end. It should point to your mail server hostname.
  • Re-run MIAB setup on the server.

Now, you’ll want to test it to make sure it all works before deploying it into production use. To do so, you could create a test domain, for example: test.gcode.com in GoDaddy. Make the MX records for test.gcode.com to be your mail server. Then add a test user (maybe test@test.gcode.com) to receive mail on MIAB, and send some emails to the test user at the test domain (test@test.gcode.com). If you can send and receive to another provider, then you should be good to go. (Try sending and receiving to Gmail accounts, since those can be tricky.)

Once everything is up and running properly:

  • Add all the domains and users you want into MIAB.
  • Add the records from System -> External DNS to your GoDaddy DNS. You can delete the existing MX records from your domains and point them to mail.gcode.com.

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