Autocreate of MX problem

Discussion in 'Developers' Forum' started by Prompt, Nov 22, 2005.

  1. Prompt

    Prompt ISPConfig Developer

    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
     
  2. Prompt

    Prompt ISPConfig Developer

    Possible correction

    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"]);
     
  3. till

    till Super Moderator

    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.
     
  4. Prompt

    Prompt ISPConfig Developer

    you'r right,

    the new line is:

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

    benbalbo ISPConfig Developer

    Thanks for this Prompt!

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

Share This Page