Editing the "master domain"

ramdiamond

Verified User
Joined
Jan 24, 2009
Messages
7
I can do ~most~ things I would like to do from the user-level. How do I get to do them things with the "master domain"? Shouldn't the admin user's "user-level" configure the master domain?

At the moment I really need a catch-all e-mail at the master domain level. Should I just edit /etc/aliases? (I have ssh access)
 
I found a solution for the catch-all e-mail.

Code:
cd /etc/virtual/masterdomain.com
cp -a ../userlevel_domain.com/* ./

Then you just edit your files with your fav editor (like /etc/virtual/masterdomain.com/aliases)

my aliases file looks like this:
Code:
*: myuser

There is other things that I think should happened at the user-level for master-domains though. For instance I can have ns(1/2).userlevel_domain.com show up in the IP list if the master-domain was treaded like a user-level domain (like it would for a 2-ip or 3-ip server config). I'm sure there's a way to trick DA into thinking the master domain is also a user-level domain.

EDIT ---

There seems to be a problem with this alias... All e-mail from my other domains get's sent to the [email protected] account. I'm guessing *@masterdomain.com will achieve the desired results; but then anything sent locally to say joe@localhost will sit in the mail queue indefinitely (or until bounced). I'd like all e-mails sent to other domains to be processed by said domain's aliases file; basically checking if a domain exists, and using that domain's rules. If said domain can't be found, like in the case of localhost, to use the masterdomain's aliases file.

I'm going to look over my exim.conf file and see what can be done XD
 
Last edited:
Ok, I got it all working :)

My server came set-up as hostname "masterdomain". I set-up two user-level, "user1" and "user2" each with a user-level domain(1/2).com.

I wanted a catch-all for *@domain1/2.com -> user1/2@domain1/2.com and it was easy to do. I also wanted *@masterdomain.com -> [email protected]. I also wanted user-level control of masterdomain.com.

WARNING THESE STEPS WILL STOP DIRECT ADMIN FROM WORKING!!! You will need ssh access!!! domain1/2.com never had any downtime durring this process, but no garantees.You follow these steps at your own risk!!! Bad things will happend, be prepared!

I usually keep an ssh connection as root user durring the process and test everything before I allow that ssh connection to go down!

1) At admin level, change your server's domain to server.masterserver.com
2) backup your masterserver.db named records (/var/named usually)
3) Remove your DNS entry at admin-level (PS: if you are your own ns this could really hurt you, like it almost did me!)
4) You might need to do the following in DirectAdmin via your IP address. Go to user-level and create your masterdomain.com
5) Go back to admin-level and edit your masterdomain.com DNS record. Add ns(1|2).masterdomain.com. A records as needed. Add server.masterdomain.com A record.
6) Now edit your DNS records to taste, I like "* CNAME www" with www, mail, server, ns1, ns2 A records.

You should now restart named and directadmin. Make sure you can connect via your dns name (masterdomain.com:2222).

If everything worked, you'll have a "virtual" masterdomain.com httpd, and mail server.

Now edit /etc/aliases NOT /etc/virtual/masterdomain.com/aliases. Make sure all local names eventually point to your [email protected].

I'll update if I find any more issues.
 
Your server was set up incorrectly from the beginning. If the instructions for installing DA are followed none of these steps are necessary.
 
Still, I don't see why DA doesn't relize, hey, your the admin of this "masterdomain.com" ... so clearly, your user-level panel should be populated with a "masterdomain.com" domain. You should be able to add ns1/2.masterdomain.com to your IPs at any time, since... you know... it's the masterdomain ~.~ you should have an e-mail account set-up at the masterdomain.com virtual mail server, and be able to add aliases, catch-alls, forwards etc... to that domain as required.

Least it could do is catch on that it's been configured incorrectly, and do some sort of auto-reconfiguration for me. DA's supposed to ease administration, not complicate it :P

All in all though, I will put the blam on my datacenter's staff. Let's hope thier internet pipe is better then thier admins XD
 
Still, I don't see why DA doesn't relize, hey, your the admin of this "masterdomain.com"

Because administrators are supposed to be smarter than the setup script.
 
DirectAdmin doesn't by default have a masterdomain. For example we run multiple servers of this format:

dax.example.com

where x is a number.

Only one of those servers hosts example.com, but for many users of DirectAdmin, example.com could be hosted elsewhere.

Jeff
 
Back
Top