Running ISPConfig without the mail server

Discussion in 'Installation/Configuration' started by piers, Sep 13, 2006.

  1. piers

    piers New Member

    Is it possible to install ISPConfig without SMTP/POP/IMAP as I have a dedicated mail server which handles all my domains mail.

    How easy is it to configure ISPConfig so that the MX record for all domains handled by ISPConfig point to my external mail server automaticaly? Is there somewhere in the config file that lets you set these as default values?

    Can anyone show me an example?
    Thank you!!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The installer checks for the presence of a smtp and pop3 daemon. But you may stop the smtp / pop3 and imap after you installed ISPConfig.

    You can not set them automatically, but you can set mailserver to external in the website and co-domain settings and then create a MX record that points to your external mailserver.
     
  3. oxxmoxx

    oxxmoxx New Member

    Good morning,

    I have another question for this topic. My intention is to separate mail-services to another (mail-)server too.

    Now the following idea: At "server_01" I will register all domains for web/mysql/ftp etc. For mail I will use in ispconfig "ext. Mailserver" as you described. At "server_mail" I will register the domains again and manage all users with their mailboxes.

    The MX-record will be create either on server_01 or at the nameserver from the domainprovider.

    I think/hope this construct will work - or isn't? :confused:

    Greetz


    p.s: for automation I could work with scripts for syncing the config-files as you described in another thread ... I have to consider ...
     
  4. piers

    piers New Member

    Thank you for your help till, you confirmed what i thought.

    oxxmoxx - at the domain registrar they are likely to offer their own DNS servers to use or let you use your own DNS server, if you use your own DNS then set the NS record at the registrar to point to your own ISPConfig machine and then you (or your customer) can do what you like with the DNS without having to ever bother the registrar again. i.e. point the MX record on ISPConfig to your mail server.

    I would be handy for me to set global defaults on the MX record in ISPConfig to always point to a dedicated mail machine.
     
  5. falko

    falko Super Moderator Howtoforge Staff

    Yes, that should work. :)
     
  6. meemu

    meemu New Member

    patch to allow default external ip records

    I ran into a similar problem with having external mailservers but still wanting to create proper DNS zone files etc and even having them manageable through the DNS Manager.

    I have hacked into the relevant parts of ISPConfig so that:

    * add a custom field in sys - ISP Server (Management|Edit Form)
    Name: server_custom_mailservers type: longText

    * Patch to create default MX entries and the dep stuff for these

    I wanted to post a simple diff but there's been quite a bit of development in that part so if you want to use this you have to do a manual patch (sorry):

    This is a patch against 2.2.11 - /home/admispconfig/ispconfig/lib/classes/ispconfig_isp_web.lib.php
    Later versions, SVN are quite different but I can't yet patch against them. But have a look it should be quite obvious:

    Code:
    1049c1049,1079
    <         if(!empty($mailserver)) {
    ---
    >       # mimo hack for default external mx records
    >       $mailservers = trim($server["server_custom_mailservers"]);
    >       if(!empty($mailservers)) {
    >               $userid = $go_info["user"]["userid"];
    >               $groupid = $web["groupid"];
    >               $type = 'a';
    >               $parent = '';
    >               $status = 1;
    >               $title = '';
    >               $mailservers_array = explode("\n",$mailservers);
    >               foreach($mailservers_array as $mxline) {
    >                       list($prio,$mailserver) = preg_split("/\s+/",$mxline);
    >                       if(!is_numeric($prio)) // very basic sanity check
    >                               continue;
    >                       $sql = "INSERT INTO dns_mx (host,prioritaet,mailserver) VALUES ('','$prio','$mailserver')";
    >                       $go_api->db->query($sql);
    >                       $mx_doc_id = $go_api->db->insertID();
    >                       $sql = "INSERT INTO dns_nodes (userid,groupid,parent,type,doctype_id,status,doc_id,title) VALUES ('1','$group                       id','$parent','$type','$mx_record_doctype_id','$status','$mx_doc_id','$title')";
    >                       $go_api->db->query($sql);
    >                       $mx_tree_id = $go_api->db->insertID();
    >                       $status = 1;
    >                       $parent_doctype_id = $dns_doctype_id;
    >                       $child_doctype_id = $mx_record_doctype_id;
    >                       $parent_doc_id = $dns_doc_id;
    >                       $child_doc_id = $mx_doc_id;
    >                       $parent_tree_id = $dns_tree_id;
    >                       $child_tree_id = $mx_tree_id;
    >                       $sql = "INSERT INTO dns_dep (userid,parent_doc_id,parent_doctype_id,parent_tree_id,child_doc_id,child_doctype                       _id,child_tree_id,status) VALUES ('$userid','$parent_doc_id','$parent_doctype_id','$parent_tree_id','$child_doc_id','$child_doctype_i                       d','$child_tree_id','$status')";
    >                       $go_api->db->query($sql);
    >               }
    >         } else if(!empty($mailserver)) {
    1218c1248
    < ?>
    \ No newline at end of file
    ---
    > ?>
    
     

Share This Page