This page is out of date, please use our new website https://surgemail.com

Moving SurgeMail to a new system


Please use our new website https://surgemail.com



How do I move SurgeMail to a new machine?

There are two ways of doing this, one is basically copying all the files to the new machine. The second is by setting up a mirror and letting SurgeMail mirror itself over to the second machine.

Automatic method, using Mirroring feature

When upgrading hardware or changing operating systems you can use mirroring to move your installation without disrupting users.

  1. Install surgemail on the 'new' system
  2. Setup mirroring settings on both systems, the existing system will be 'master' the new system will be 'slave'
  3. On the master issue the commands:
    1. tellmail resync_config
    2. tellmail resync_nwauth
    3. tellmail resync_mkdir
    4. tellmail resync
  4. Carefully check the new system is working and has all accounts/messages.
  5. Move the license key
  6. Move the users across.
  7. Stop both servers and swap the master/slave settings so the new system is the master.
  8. To ensure aliases are working on the slave copy domuser.dat from master to slave manually!

Manual method to move SurgeMail

  1. Install SurgeMail on new machine
  2. Setup anything you tailored on the original system (e.g. authent modules)
  3. Stop SurgeMail on new machine
  4. tellmail deactivate on old machine
  5. Stop SurgeMail on old machine
  6. Copy surgemail.ini from old machine to new machine  /etc/surgemail.ini or \windows\surgemail.ini
  7. (note all other paths you need are defined in surgemail.ini, particularly g_home and mailbox_path)
  8. Copy the SurgeMail directory, the mail directory and the database over to new machine.
    Check surgemail.ini for the paths to copy for the mail directory (g_mailbox)
    The default database is nwauth which will be stored in the surgemail directory but consists of the files (nwauth.add, nwauth.txt)
  9. Check surgemail.ini and check everything is located correctly. Change all the paths if necessary
  10. Chown -R mail files (if on UNIX) for all mail folders etc...
  11. Start surgemail on new machine, check logging in etc
  12. tellmail activate on new machine
  13. If you have moved from one OS to a different OS then you should run the installer on the new server again so that it places the correct binaries on the new system.

Merging one or more domains from one SurgeMail server with Another:

  1. The Vdomain sections for each domain from the old system and append to surgemail.ini on the new system.
  2. copy mailbox_path directory tree for each domain from old to new system.
  3. grep nwauth.add and nwauth.txt for the domain(s) in question, and append those lines to nwauth.add on the new system.
       grep xyz.com nwauth.txt nwauth.add >nwauth.append (then copy and append that file)
  4. If you have dlist mailing lists on the old system:
  5. append dlist/lists.dat from old to new system.
  6. Copy existing dlist/listname folders and contents from old to new system.

For a large active system you might use rsync or multiple copy commands to get the two exactly in sync before the changeover (for mailbox_path data).