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
---
> ?>
Recent comments
21 hours 28 min ago
1 day 2 hours ago
1 day 3 hours ago
1 day 4 hours ago
1 day 6 hours ago
1 day 10 hours ago
1 day 11 hours ago
1 day 13 hours ago
2 days 3 hours ago
2 days 4 hours ago