PDA

View Full Version : Autocreate of MX problem


Prompt
22nd November 2005, 12:47
Hi,

I have noticed when creating a new domain and activate check box "Create MX", the ISPConfig is adding the server name in a bad way.

I explain:

my server name is hostrXXlXX.mydomain.com

when the ISPConfig adds the MX record it adds: mydomain.com.

I think the best way is to add a host "mail" for the new domain, and then add the MX record to point to mail.newdomain.com

Thank you

Prompt
22nd November 2005, 18:33
I have checked the file:

/home/admispconfig/ispconfig/lib/classes/ispconfig_isp_web.lib.php

I have changed the line 976

Old line:
$domain = trim($server["server_domain"]);

New line:
$domain = trim($server["server_host"].'.'.$server["server_domain"]);

till
22nd November 2005, 18:39
If $server["server_host"] is empty you will get as result ".domain.com" which is not valid. I think you will have to test first if the host is not empty.

Prompt
22nd November 2005, 18:58
you'r right,

the new line is:

$domain = trim((($server["server_host"])?$server["server_host"].'.':'').$server["server_domain"]);

benbalbo
30th November 2005, 02:13
Thanks for this Prompt!

I've also made the same change to /home/admispconfig/ispconfig/lib/classes/ispconfig_isp_domain.lib.php.