Proper multi-domain setup

Hi! So sorry for the newbie question. I’ve tried to follow other similar threads, but my situation isn’t quite the same.

  • Like others, also using DigitalOcean droplet for email - only ONE droplet.
  • I want this ONE droplet (single IP) to process email for multiple domains.
  • Using external DNS.
  • Websites reside on a number of different IPs for each of the domains.
  • All domains will have their webmail on the one droplet.

I can’t figure out the proper procedure to do this.

The first domain set up fine as part of the MIAB installation - no issues. It created the box.D1.com configuration, and the D1.com domain is properly mapped. Email flows fine. No issues.

I then created a user@D2.com, and the system automatically set up the D2.com configuration with SOME (not all that were created for D1.com) default users and all. The other issue was that the alias mappings all pointed to @box.D1.com, not @box.D2.com! Furthermore, the MX for D2.com is box.D1.com - I absolutely do not want that!

I manually adjusted aliases, users, DNS. Email IS working and flowing properly. However, when I go to the system status checks page it complains that the the D2.com MX and box.D2.com MX not pointing to box.D1.com as it thinks it should. Annoying and ugly, even though I do have things working.

The users now look like this:

Email Address		Actions								Mailbox Size

D1.com

postmaster@D1.com	admin (remove privilege) | set password | archive account	463 KB
U1@D1.com		set password | make admin | archive account			3 MB

D2.com

U2@D2.com		set password | make admin | archive account			907 KB
U1@D2.com		set password | make admin | archive account			837 KB

And the aliases look like this:

	Alias			Forwards To	Permitted Senders

box.D1.com

abuse@box.D1.com		administrator@box.D1.com
admin@box.D1.com		administrator@box.D1.com
administrator@box.D1.com	postmaster@D1.com
hostmaster@box.D1.com		administrator@box.D1.com
postmaster@box.D1.com		administrator@box.D1.com

D1.com

@D1.com (*)			catch-all@D1.com		U1@D1.com
catch-all@D1.com (*)		U1@D1.com		
abuse@D1.com			administrator@box.D1.com
admin@D1.com			administrator@box.D1.com

D2.com

@D2.com (*)			catch-all@D2.com		U1@D2.com
								U2@D2.com
catch-all@D2.com (*)		U1@D2.com
				U2@D2.com
abuse@D2.com			administrator@box.D2.com
admin@D2.com			administrator@box.D2.com
postmaster@D2.com		administrator@D2.com

box.D2.com

administrator@box.D2.com (*)	postmaster@D2.com
hostmaster@box.D2.com (*)	administrator@box.D2.com
abuse@box.D2.com		administrator@box.D2.com
admin@box.D2.com		administrator@box.D2.com
postmaster@box.D2.com		administrator@box.D2.com

(*) Items can be deleted.

Like I mentioned, the system status checks complain for D2.com and box.D2.com:

:heavy_multiplication_x: This domain’s DNS MX record is incorrect. It is currently set to ‘10 box.D2.com’ but should be ‘10 box.D1.com’. Mail will not be delivered to this box. It may take several hours for public DNS to update after a change. This problem may result from other issues listed here.

So, how does one properly set this up, or am I close and only need to make some final adjustments? It appears that I took a left turn from the get-go and drove on the sidewalk before nosediving into the river… Thanks! :slight_smile:

Your requirements make sense.

It’s technically fine for D2’s MX to be box.D1.com. Heck, it’s probably more reliable – fewer DNS records to maintain. Why is it an issue for you?

Here’s the catch: your mail host needs its reverse DNS to be set up correctly. And, you only get one reverse record [*].

As long as D2’s reverse DNS claims that it’s actually D1, D2’s mail will get marked as spammy.

Nice job setting all that up though.

* technically, that’s one reverse record per IP address. So, sure, you could assign multiple IP addresses to your mail-in-a-box, and have it respond correctly to multiple domains. To me, though, that sounds like a hassle… It’s probably easier just to run two separate MiaB instances.

The issue is that it’s not cool to say that company D2’s email is handled by company D1. I agree with your comment about simplicity. Thanks, Bronson!

@starbock Do you think that the millions of domains using GSuite (old GoogleApps) for their private & business domains with MX records as

Blank or @     3600     MX     1     ASPMX.L.GOOGLE.COM
Blank or @     3600     MX     5     ALT1.ASPMX.L.GOOGLE.COM
Blank or @     3600     MX     5     ALT2.ASPMX.L.GOOGLE.COM
Blank or @     3600     MX     10     ALT3.ASPMX.L.GOOGLE.COM
Blank or @     3600     MX     10     ALT4.ASPMX.L.GOOGLE.COM

Are not cool, too?

Why not to use just a generic sub-domain for your BOX, something like cloud.box4.mail or box.mail4.cloud or mail.cloud4.box, to manage all your DNS records and email accounts for company1.com, company2.net, company3.biz… and so on? … just an idea than may help you!

Hi, what I mean by not cool is, for example:

peta.org MX preference = 10, mail exchanger = box.furcare.org

Yes, a generic sub-domain was also Bronson’s thought for simplicity, which I agree with. Thanks!

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