ISP Server as sec. dns and fallback mx mailserver

Discussion in 'Installation/Configuration' started by pesja, Jul 15, 2006.

  1. pesja

    pesja New Member

    Hello,

    I now have running and ISPConfig Hosting Server (ISP1) Almost everything (except munin and webalizer) is working fine. I want to configurate another ISPConfig Hosting Server (ISP2)

    This second Hosting server will mainly function as and secundairy DNS server and as an fallback mailserver. So I imaged my ISP1 to another server and called it ISP2 (off course I replaced hostname, IP adresses etc.)

    Everything, (except the above programms from the ISP1) is working fine. Also ISP2 as the second DNS server is working splendid on the testing domains.

    Now the second job is to make the ISP2 server also working as an fallback mailserver for the domains of ISP2.

    Can somebody help me with this?
     
  2. jockstrap

    jockstrap New Member

    Pesja,

    A quick Question!

    Does ISP2 automatically add the domains to the DNS when added to ISP1 or do you have to manually add each one? If automatic, how did you set this up?
     
  3. falko

    falko Super Moderator

  4. pesja

    pesja New Member

    OK Falco. I understand that part. MX 10 will be the prio 1 mailserver and MX 20 (or MX 100) will be the fallback mailserver.

    Now my question is how to configurate the fallback mailserver. If I simplefy it into my own words: The fallback mailserver received the mail if de prio 1 mailserver is off-line. Now the fallback mailserver have to try to forward all the mails, normally sent to the prio 1 mailserver, let's say for several hours and if still no luck then rebound the mails to the original sender. So the fallback mailserver must have a sort of forwardfunction which know that the mails must forward to the prio 1 mailserver

    It 's simple as I write it down but is it simple to configurate the fall-back mailserver?
     
    Last edited: Jul 16, 2006
  5. falko

    falko Super Moderator

    You don't have to configure anything else. The secondary MX looks at the DNS records and "knows" that it must forward the mails to the primary MX as soon as it's back online. :)
     
  6. pesja

    pesja New Member

    OK Falco, I will test it this week.
     
  7. pesja

    pesja New Member

    I tested like you said, although my feeling says that I had to configurate something at the fallback mailserver.

    In my own words I think that the fallback mailserver must know some how that mails it receives (because the main mailserver is down) it must try deposit them to the original mailserver for an amount of hours (or until the main mailserver is up).

    So I didn't worked out. and mails I sent to an adress engined by the main mailserver didn't arrived when it was down. So the fallback mailserver didn't received those mails and forward them.

    Can anybody give me a clue?
     
  8. falko

    falko Super Moderator

  9. jockstrap

    jockstrap New Member

    Hi,

    Is it possible as Pesja says above to clone your primary ispconfig server - change hostname & ip and have it as an automated secondary dns?

    IE: when you add a new domain to isp1 then the dns in ISP2 will automatically be configured as secondary for that zone!

    or does the addition of secondary dns zone have to be a manual process where you add it to isp2 manually ?

    Any advice on how to setup an automated secondary dns for ispconfig would be appreciated.
     
  10. falko

    falko Super Moderator

    Just install ISPConfig on your second server (using the normal installation procedure), and then have a look at this tutorial: http://www.howtoforge.com/ispconfig_dns_godaddy
    It has all the details you need. :)
     
  11. jockstrap

    jockstrap New Member

    Thanks falko for the reply...

    However, that shows how to manually add the domain to the secondary dns.
    I was hopeing that there was a way that the secondary zone could be created automatically when the primary zone is added (without having to logon to the secondary and manually add it) - but at this stage, looks like it can not ... oh well... manual addition it is... :)
     
    Last edited: Aug 16, 2006
  12. jockstrap

    jockstrap New Member

    I found one! possibly... if I use simple dns as the secondary, it has an http post interface to add and remove domains...

    Falko/till I need your help here - can you please tell me what part of the ispconfig scripts would be the best place to put the following;

    Adding a new host domain or adding a new dns primary zone:
    ---------------------------------------------------------
    The simple dns interface is posting to http://ip:8053/updatezone=domain.com&masterip=ip

    this command adds the secondary zone to simple dns - could you suggest which script and where in ispconfig to put a http post instruction so that it gets issued only once when a new domain or primary dns zone is added?


    Removing a host domain or primary dns zone:
    ------------------------------------------
    The simple dns interface is posting to http://ip:8053/removezone=domain.com

    This command removes the zone from the secondary dns..

    Can you please tell me where and in what scripts to add this so the zone will be deleted when a domain or dns primary is deleted...

    PS: i'm not strong in php - can you also suggest the appropriate php code for issueing a http post ?

    Sorry for asking so much, any help appreciated...

    This would be fantastic if I could get it working.... :) :) :)
     
    Last edited: Aug 16, 2006
  13. jockstrap

    jockstrap New Member

    Maybe just a hint as to which scripts to modify maybe ????

    PLEASE! PLEASE! PLEASE! :)
     
  14. falko

    falko Super Moderator

    No, you have to add the slave zone manually, but afterwards, all changes in the primary zone are transferred to the slave zone automatically.
     
  15. jockstrap

    jockstrap New Member

    But Falko - I have found a potential method..

    I just need to know what part of the scripts to put it in...

    I just need to know where in the addition and removal scripts to put it so that it gets issued just once when adding a domain or dns zone. AND when removing a domain or dns zone...

    Most likely if there is a final return code checking routine or something..

    ie: if there is a routine somewhere to the effect of;

    if rc=0 then
    blah blah
    end

    I could put it before the blah blah!

    Hope this makes sense..
     
  16. till

    till Super Moderator

    Have a look at the script:

    /root/ispconfig/scripts/lib/classes/ispconfig_bind.lib.php
     
  17. jockstrap

    jockstrap New Member

    Thanks Till,

    Seeing I don't know php fully yet - too difficult for me!

    The idea is simple - issue a http post to secondary dns whenever a dns zone is added or deleted... but beyond me at this moment..

    I know what should be posted - very simple (as per posts above), but just don't know how to code it!

    However, using simple dns plus as a secondary would work well as a fully automated secondary!

    Maybe someone else in the future will work it out... ;)
     

Share This Page