Moving the old mailserver to a new mailserver

Discussion in 'Installation/Configuration' started by vaio1, Jun 21, 2011.

  1. vaio1

    vaio1 ISPConfig Developer ISPConfig Developer

    Hi guys,

    I have looked for tutorial or hint to move my old mailserver to a new mailserver all the evening. I'd like to maintain the same IP address.

    I have a temporary IP address to use for this operation.

    I have already read the "moving mailserver" topics in this forum but they do not help me. I'd like to transfer
    all the configuration from the old mail server to the new one in few steps.

    What have I to copy into the new server from the old one ? Have I copy the db?
    The old mail server doesn't use the mbox folder, so where are the mails of the clients?

    Does anybody help me?

    thanks for your help
     
    Last edited: Jun 21, 2011
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Which ispconfig version is used on the old mailserver and which ispcoinfig version is used on the new mailserver?
     
  3. vaio1

    vaio1 ISPConfig Developer ISPConfig Developer

    Hi Till, both servers have the same version: 3.0.3.3
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    If this is just a mailserver without any websites hosted on it, then you will have to copy the dbispconfig database to the new server and all files and folders in /var/vmail directory. Make sure that you preserver owner and permissions of the files when you transfer them.
     
  5. vaio1

    vaio1 ISPConfig Developer ISPConfig Developer

    Yes it is a mailserver only. It contains all the email address configuration and mail messages.
     
  6. vaio1

    vaio1 ISPConfig Developer ISPConfig Developer

    Done, now how have I to change the ip address of both servers?
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    That depends on the linux distribution. For Debain and ubuntu you do this in the file /etc/network/interfaces, for suse you use yast and for centos and fedore you use the system-network-config command.
     
  8. vaio1

    vaio1 ISPConfig Developer ISPConfig Developer

    yes I have the debian distro.
    Have I to change also the /etc/hosts file too?
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    If you have the IP in there, then yes.
     
  10. vaio1

    vaio1 ISPConfig Developer ISPConfig Developer

    Ok Done, Servers Rebooted.

    I get this error at the fetching operation with thunderbird:
    Code:
    Sending of password did not succeed. Mail server mail.mymailserver.com responded: Couldn't open INBOX: Internal error occurred. Refer to server log for more information. [2011-06-22 12:11:04]
    
    Solved appling the right permissions.
     
    Last edited: Jun 22, 2011
  11. vaio1

    vaio1 ISPConfig Developer ISPConfig Developer

    I have renamed the hostname to the old mailserver with the name "backupserver.mydomain.com"

    Why ISPConfig continue to show me in the control panel the old hostname?

    Furthermore I get this Relay Access Denied when I send from the GMAIL account an email message to all my accounts:

    Code:
    Jun 22 12:27:54 mailserver postfix/smtpd[2566]: NOQUEUE: reject: RCPT from mail-vw0-f48.google.com[209.85.212.48]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-vw0-f48.google.com>
    Jun 22 12:27:54 mailserver postfix/smtpd[3045]: NOQUEUE: reject: RCPT from mail-vw0-f46.google.com[209.85.212.46]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-vw0-f46.google.com>
    Jun 22 12:27:54 mailserver postfix/smtpd[3046]: NOQUEUE: reject: RCPT from mail-vw0-f51.google.com[209.85.212.51]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-vw0-f51.google.com>
    Jun 22 12:27:54 mailserver postfix/smtpd[2566]: NOQUEUE: reject: RCPT from mail-vw0-f48.google.com[209.85.212.48]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-vw0-f48.google.com>
    Jun 22 12:27:54 mailserver postfix/smtpd[3045]: NOQUEUE: reject: RCPT from mail-vw0-f46.google.com[209.85.212.46]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-vw0-f46.google.com>
    Jun 22 12:27:54 mailserver postfix/smtpd[3046]: NOQUEUE: reject: RCPT from mail-vw0-f51.google.com[209.85.212.51]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-vw0-f51.google.com>
    Jun 22 12:27:54 mailserver postfix/smtpd[2566]: NOQUEUE: reject: RCPT from mail-vw0-f48.google.com[209.85.212.48]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-vw0-f48.google.com>
    Jun 22 12:27:54 mailserver postfix/smtpd[3045]: NOQUEUE: reject: RCPT from mail-vw0-f46.google.com[209.85.212.46]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-vw0-f46.google.com>
    Jun 22 12:27:54 mailserver postfix/smtpd[3046]: NOQUEUE: reject: RCPT from mail-vw0-f51.google.com[209.85.212.51]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-vw0-f51.google.com>
    
    
    Have I to copy also the old /etc/postfix/main.cf file to the new server?

    I have copied the /etc/postfix folder to the new server and I have set the right mysql password in the proxy files.
    I have set the right permissions of the files and now seems that it works also the relay!

    When I try to create a new email account the mailbox is added but not created in the postfix configuration. Why?
    I get this cron error:
    Code:
    PHP Warning:  mysql_error() expects parameter 1 to be resource, boolean given in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 64
    PHP Warning:  mysql_connect(): Access denied for user 'ispcsrv4'@'mailserver.mydomain.com' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 78
    PHP Warning:  mysql_errno() expects parameter 1 to be resource, boolean given in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 63
    PHP Warning:  mysql_error() expects parameter 1 to be resource, boolean given in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 64
    PHP Warning:  mysql_connect(): Access denied for user 'ispcsrv4'@'mailserver.mydomain.com' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 78
    PHP Warning:  mysql_errno() expects parameter 1 to be resource, boolean given in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 63
    PHP Warning:  mysql_error() expects parameter 1 to be resource, boolean given in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 64
    PHP Warning:  mysql_connect(): Access denied for user 'ispcsrv4'@'mailserver.mydomain.com' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 78
    PHP Warning:  mysql_errno() expects parameter 1 to be resource, boolean given in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 63
    PHP Warning:  mysql_error() expects parameter 1 to be resource, boolean given in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 64
    
    
     
    Last edited: Jun 22, 2011
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    No. ISPConfig has configured a correct main.cf while you installed it on the new server.

    ISPConfig does not show the hostname of a server. It can only show you a name that you have given thsi server in the ispconfig server settings and there you can change it to any text string that you like.

    Very bad idea as this destroys the postfix configuration. I hope you made a backup that you can restore now to fix the setup. The files contain passwords that are unique for every server, so they can and shall not be copied!
     
  13. vaio1

    vaio1 ISPConfig Developer ISPConfig Developer

    Yes I have the old original copy but it doesn't work if I try to restore them.
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    You have to restore them or the setup will not work. And you are sure that you installed ispconfig on the new server correctly before you migrated the data? Because when the original config does not work, then ispconfig was not correctly installed.

    I've just seen in your error message that you semm to alk about a multiserver setup here and not a single mailserver? And the new multiserver sever was correctly added/ registered to the master system so that it shwos up there?

    In that case, you will have to set the server_id in the two ispconfig config.inc.php files on the new server to the server_id of the old server.
     
    Last edited: Jun 22, 2011
  15. vaio1

    vaio1 ISPConfig Developer ISPConfig Developer

    Yes I am sure of it.
    The ISPConfig works well the problem is that if I restore the postfix config files I get the relay error described above.
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    According to postfix, you have not imported the ispconfig database on the new server as postfix says that the domain names are not in the local database that you specified as ispconfig was installed on the new server. Please check that again and ensure that you did not use a different database name.
     
  17. vaio1

    vaio1 ISPConfig Developer ISPConfig Developer

    You told me that I have to import the database from the old server to the new server. Now have I to restore the original ispconfig database dump again?!
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    No, I have not told you to restore the database dump. You have to move the database contents from the old to the new server, thats all. You do the export e.g. with mysqldump or phpmyadmin and import this into the ispconfig mysql database e.g. with phpmyadmin on the new server. and do this only with the ispconfig database and no other databases like the "mysql" database!

    If ISPconfig will not pick up changes afterwards from the new server, you can run a ispconfig update on the server manually and choose to reconfigure data┬┤base permissions during update.
     
  19. vaio1

    vaio1 ISPConfig Developer ISPConfig Developer

    Now I don't understand.
    Have i to dump and restore the dbispconfig database from the old to the new server?
    At the moment seems to me that the new server is not connected to the cluster. What have i to check?
    Thanks for your help till
     

    Attached Files:

    Last edited: Jun 22, 2011
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes. The database comnatins the email domains and users. So without that, you get relay access denied.

    Have you connected it as you installed ispconfig on the new server?
     

Share This Page