Autocreate of MX problem

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

  1. Prompt

    Prompt New Member


    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

    when the ISPConfig adds the MX record it adds:

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

    Thank you
  2. Prompt

    Prompt New Member

    Possible correction

    I have checked the file:


    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 Staff Member ISPConfig Developer

    If $server["server_host"] is empty you will get as result "" which is not valid. I think you will have to test first if the host is not empty.
  4. Prompt

    Prompt New Member

    you'r right,

    the new line is:

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

    benbalbo New Member

    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