Duplicate Domain Problem with Email

Discussion in 'ISPConfig 3 Priority Support' started by Tomnick, Sep 11, 2016.

  1. Tomnick

    Tomnick New Member HowtoForge Supporter

    Hi, I am running 2 Server with IPSConfig 3.1 ( Master and Slave). I need to move some domains from Server 1 to Server 2 which works great by adding the domain via ISPConfig on Server 2 and copy all the data from Server 1 to Server 2. ISPConfig does not complain about duplicate domain at all. Now I would like to move also the email domain over to Server 2 but as soon as I want to create an Email domain via ISPConfig on Server 2 it tells me "1.duplicate domain" although it is on Server 1. Is there any way to get around this problem?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if the new duplicate check which takes the server in account as well has not been implemented for mail yet. I guess there are just two options, either modify the ispconfig source code and comment out the duplicate checks for mail domains, mail users etc. or you try to modify the server_id of the mail_domain, the mail_user's, mail aliases etc. to the ID of the second server and then run Tools > Resync to create them there. Afterwards sync the mailbox content from server 1 to server2 e.g. with rsync.
     
  3. Tomnick

    Tomnick New Member HowtoForge Supporter

    I would like to prefer the first option, can you tell me which file to modify, please?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    /usr/local/ispconfig/interface/web/mail/form/mail_domain.tform.php

    remove these lines (around line 89):

    1 => array ( 'type' => 'UNIQUE',
    'errmsg'=> 'domain_error_unique'),

    you might have to remove the unique validator also in the mail_user.tform.php file and maybe other form files if errors about duplicate records occur.
     

Share This Page