Is it possible to setup DirectAdmin and DNS this way...

jim.thornton

Verified User
Joined
Jan 1, 2008
Messages
334
Currently I have DirectAdmin installed on one server and Zimbra installed on the other as my mailserver. I point my domain name to DirectAdmin and then I set each domain manually to NOT use DA as the mailserver for that domain.

I would like to know if there is a way to setup DirectAdmin to handle all of my webserver needs except that of my DNS.

My server has not gone offline since I separated my email like this. However, just recently my provider decided to change IP addresses on me and my server went down before that. When that happened, even though my mailserver was up and running, it was not receiving any mail because the DA server was down.

I would like to separate these two, or at least setup a way to build in a redundancy so that my mailserver is not dependant on my DA server. Can someone please help me with this by letting me know what I need to do?
 

If I use this solution though, then everytime I add a domain I would have to manually setup a bunch of DNS records wouldn't I?

I would like to have DA create the DNS records required automatically still. I just don't want to have my mailserver reliant on my DA server.

Right now I have NS1 and NS2 pointing to the same server (my DA server). Now that I have a second server running the mail server, should I set it up to have NS1 pointing to DA and NS2 pointing to my mailserver? Would this solve my problem? If so, can I have it so that DA will create a DNS record on both servers when the domains/accounts are created?
 
I think I should probably note that I do not run DA on the second server. And, it is not an option either.
 
You can use directslave for this. It replicates directadmin multiserver functionality
 
Oh, I understand what you're asking now. Please ignore my previous post (#2). This is what you need to do to accomplish what you're asking...

1) Create the following text file: /usr/local/directadmin/scripts/custom/domain_create_post.sh

Code:
touch /usr/local/directadmin/scripts/custom/domain_create_post.sh

2) Change the file permissions to 755:

Code:
chmod 755 /usr/local/directadmin/scripts/custom/domain_create_post.sh

3) Now insert the following code inside /usr/local/directadmin/scripts/custom/domain_create_post.sh:

Code:
#!/bin/sh
/bin/sed -e "/$domain/d" -i /etc/virtual/domains
exit 0;

So now every time you create a new domain on your DirectAdmin server, it will automatically disable the Local Mail Server setting for you. You no longer need to do it manually.

4) Then use DirectSlave for the DNS replication...

Code:
http://forum.directadmin.com/showthread.php?t=43924
 
Last edited:
@czotos:

That will set server so email is not handled by DirectAdmin server, but rather by the XZimbra servber, but I don't think that's the soltion jim.thornton thornton is looking for. I believe he's trying to get DNS running on both servers.

@jim.thornton:

I believe that user massive is correct and you should be using Multi-Server Option on your DirectAdmin server and Direct Slave on your Zimbra server, to handle DNS so if one server is down the other will continue to serve DNS.

Jeff
 
Thank you... That is the solution that I'm looking for, but I will not be running it on the Zimbra server because in the event of a Zimbra upgrade, I'm pretty sure I'll lose what I did and have to re-do it therefore causing more work. I am going to install DirectSlave on a 3rd server that I have.
 
I would hope that a Zimbra upgrade woldn't affect DNS setup, but of course I don't know. You don't need a physical server just for physical DNS; I run a network of slave DNS servers on very small VPS instances spread out in multiple locations.

Jeff
 
I think you are right. Zimbra recommends not installing any software onto the server, but it does required a working DNS setup prior to installation, so it would probably be okay, because upgrading never affects the DNS server.
 
Be sure they don't touch the BIND installation in any way, before you make the changes.

Or just rent some $5/month VPS instances. They're big enough :).

Jeff
 
Back
Top