Is it true that there are currently bugs in the ISP module regarding the automatic creation of DNS entries. Specifically MX entries. It would seem that for any given site, the *Domain Name* of the ISPConfig server (Administrative Domain) gets added as the MX. This should be corrected either by prepending the ISPConfig servers *Host Name* followed by a dot to its Domain Name, or to follow the example of the DNS manager module and set up a link to mail.site.tld. Until this is resolved, I would reccommend *ALL* DNS configuration through the DNS manager module.
I don't think there's a bug, but let me check first. ISPConfig takes the host name + domain name that you specified during the ISPConfig setup which is ok since this FQDN points to the ISPConfig server (otherwise you wouldn't be able to access the web interface). This is always recommended if you want to use settings that go beyond the default records.
No, I'm running two servers and in both cases, the FQDN was not added to the MX of my vhosts. Only the domain name portion was added. I've had to manually edit them.
You seem to be right. I've just changed /home/admispconfig/ispconfig/lib/classes/ispconfig/isp_web.lib.php and added this line right after line 976: PHP: if(trim($server['server_host']) != '') $domain = trim($server['server_host']).'.'.$domain; Please try this; if it works it will go into the next ISPConfig release. Things like these happen if you test in an environment where you don't have a hostname... - then the result looks ok...
I think there is a slight problem with this behaviour. The FQDN of the web and not the server should be added as an MX record. I have tried to use the $web["web_host"] and $web["web_domain"] variables in the above mentioned code, but the output seems to be w.w Perhaps you might have more success falko [edit] perhaps the web should use $web["web_domain"] only as you would send mail to [email protected] and not [email protected]
I just had a look at the code. I think a solution will be to replace lines 976 - 978: Code: $domain = trim($server["server_domain"]); $host = $go_api->db->queryOneRecord("SELECT web_host FROM isp_isp_web WHERE doc_id = $doc_id"); $host = trim($host['web_host']); with this code: Code: $web = $go_api->db->queryOneRecord("SELECT web_host, web_domain FROM isp_isp_web WHERE doc_id = $doc_id"); $domain = trim($web["web_domain"]); if(trim($web['web_host']) != '') $domain = trim($web['web_host']).'.'.$domain; $host = ''; if you want to use the domain only, without the host, you can use this: Code: $web = $go_api->db->queryOneRecord("SELECT web_host, web_domain FROM isp_isp_web WHERE doc_id = $doc_id"); $domain = trim($web["web_domain"]); $host = '';
I don't think there's a problem with this because both - the FQDN of the server and the web site - point to the same IP address. If you want an MX record for domain.tld instead of www.domain.tld, go to the Co-Domain tab and create a default MX record for domain.tld. ISPConfig gives you the possibility to create MX records for www.domain.tld and domain.tld because there are quite a lot people who need MX records for www.domain.tld.
I know, but it is just about keeping the DNS record "clean" looking. Its a cosmetic thing I think. Yes, I think till's first modification should suit that. Thats what you should patch into the next release, I think. [edit]Till, your changes cause the IP address to dissappear from the www A record in the newly created DNS
I have re read it.I understand what you mean by that. The only outstanding issue, if it is an issue (as for most its not), is the cosmetics of having the FQDN of the server instead of the web written in the MX records. Unfortunatly, while the code posted by till fixes this, it breaks other things. I have noticed that the IP address field entered for the default WWW is blank. This may be due to a variable not being set that previously was. Although I haven't tested it, I would suspect that using the variable $web is the problem. I'd suspect it is already being used earlier in the script for some purpose, and the results of the new query overwrite some vital details. I will test this when I get the opportunity.
I have confirmed the problem I mentioned in the above post: I have replaced lines 976-978 : Code: $domain = trim($server["server_domain"]); $host = $go_api->db->queryOneRecord("SELECT web_host FROM isp_isp_web WHERE doc_id = $doc_id"); $host = trim($host['web_host']); with Code: $web2 = $go_api->db->queryOneRecord("SELECT web_host, web_domain FROM isp_isp_web WHERE doc_id = $doc_id"); $domain = trim($web2["web_domain"]); $host = $go_api->db->queryOneRecord("SELECT web_host FROM isp_isp_web WHERE doc_id = $doc_id"); $host = trim($host['web_host']); if(trim($web['web_host']) != '') $domain = trim($web['web_host']).'.'.$domain; Now, I need to edit the code behind the co-domains feature as it is still exhibiting the old behaviour. Could one of you point me in the right direction? Also, the above code still does not respect the web_dns_mx (variable name ???) as set in the web. I think it should be called $web2["web_dns_mx"] but I couldnt verify it.
Any look locating the DNS code for the co-domains section of the web module. This needs to be updated independantly from the web code above??
Please have a look at the file /home/admispconfig/ispconfig/lib/classes/ispconfig_isp_domain.lib.php The code is in the lines 464 ++
Hi, I have changed lines 466 in /home/admispconfig/ispconfig/lib/classes/ispconfig_isp_domain.lib.php to the following. Code: $domain2 = $domain; $domain = trim($domain["domain_domain"]); if (trim($domain2["domain_host"]) != '') $domain = trim($domain2["domain_host"]).'.'.$domain; This leaves us with one last bug. The code in /home/admispconfig/ispconfig/lib/classes/ispconfig_isp_web.lib.php does not respect the Create DNS MX option.
Code: The code in /home/admispconfig/ispconfig/lib/classes/ispconfig_isp_web.lib.php does not respect the Create DNS MX option. Is the record always created even when "Create DNS MX" is not set?
Unfortunatly it is. The correct variable is not being checked for int the code so a record gets created wheather or not the option is checked.