MaiB domain redirects to www on different server

For my rochesterfsc.org domain, my goal is to move my mail server from a shared Bluehost account to my own box on Linode. I set it up last week, but I couldn’t make the necessary changes in the Bluehost DNS so I re-enabled services at Bluehost temporarily. The MaiB server sat with all ports disabled (per the “Moving to a New Box” instructions) for a week while I transferred my domain name and DNS to Google. I was finally able to complete the transfer and set up my DNS at Google this afternoon.

I ran sudo mailinabox to reopen the ports

If I do dig mail.rochesterfsc.org I get the correct address. If I try going to mail.rochesterfsc.org in a browser it takes me to my old website. If I do curl mail.rochsesterfsc.org or curl <ip-address> I get:

<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>

I’m not sure where that’s coming from. I have checked the Nginx config and default page locations and I don’t see where it’s coming from. The index.html in /home/user-data/www/default/index.html is the standard MaiB boilerplate.

This could very well be something I did to get services back to Bluehost temporarily, but I don’t remember doing anything. I’m going to continue digging and eventually rerun the MaiB installer. But in the mean time, any guesses where else I can look? Most of my work has been with Apache so I’m not real familiar with the ins and outs of Nginx.

Well, I think this may have been a false alarm. Sorry. It’s starting to look like a propagation problem. Weird thing is it isn’t consistent. I’ll post back if it ends up resolving itself.

The 301 is probably correctly reaching MiaB because you are asking for the http response and it is telling you to use the https and curl doesn’t do redirects without being told to.

@openletter I finally got to that conclusion myself. If I forced the curl to https I would get the full website. It was a real doh moment, but in my defense I was running on fumes at that point. The other confusing thing was that the 301 had an Nginx tag line. That’s why I thought it was coming from MaiB. My old host claimed to use Apache.

And exacerbating the issue, I swear to god the name server kept flip-flopping. I would do a dig and get the new server the next would get the old server. I should have just let the thing rest and come back to it in the morning.

So, long story short (I know, too late) the issue is hopefully resolved and boiled down to dns propagation weirdness I think. I now have three MaiB installs running, for the most part, smoothly.

Just be aware that MiaB is intended to be it’s own DNS server, so you will likely have regular issues related to this.

What I choose to do is have a domain that is exclusively for the mail server, that way it’s always automatically configured and doesn’t interfere with or limit anything.

@openletter That sounds intriguing. I’ll have to look into it if I have any more problems.

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