Migration

Migration using POP / IMAP intercept mode

This is a simple zero downtime method for migrating all active accounts from any arbitraty mailserver to SurgeMail. This method configures SurgeMail to be the new mailserver for all users. When a user logs into SurgeMail and a local account does not exist, SurgeMail will login to the old server check the account is valid. If the account is valid SurgeMail will create an account and retrieve mail for this account storing it locally. From now on the user will use SurgeMail as their primary mailserver and mail for them will be delivered locally. Mail delivered to SurgeMail for users that have not yet logged in will be forwarded on to your old mail server.

  1. Backup your existing mail server's mailbox files 🙂
  2. Install SurgeMail onto your new server and configure to host your existing domains
  3. Setup the options old_POPhost / old_IMAPhost and fallback_relay for the domain you are migrating (on domain administration page). The fallback_relay setting will pass on all mail for accounts that not yet have been created locally to your old server and the old_pophost setting will allow SurgeMail to retrieve account information and email from the old mailserver.
  4. Test your migration by logging directly into the new surgemail server (specify the ip address of the server)
  5. Change your DNS and MX records to point to surgemail
  6. Whenever a user checks their mail an account with the same username and password will be created in SurgeMail and all outstanding mail will be retrieved.

Note! migration cannot be used in conjunction with CRAM-MD5 as that prevents surgemail from storing the old password. CRAM-MD5 is best not used as SSL offers better security.

You can also use this command line tool to import a single account or test importing an account. Examine migration.log if it is not successful:

tellmail imap_import newuser@domain oldimaphost olduser oldpass delete|keep create|nocreate

e.g. to import an account, without deleting the messages from the old one, use:

tellmail imap_import test@xyz.com mailsever.xyz.com test@xyz.com SECRET keep create

If you wish to test an account by logging in to it, and then you wish to delete the account and test it again you would need to issue this command so that surgemail will know it needs to retry:

tellmail pstat_delete "user@domain.name"

To make it do all accounts again use:

tellmail pstat_delete "*"

(this can result in duplicate messages, normally you would only do this if you had been testing and you wanted to delete the mailbox folders manually and start again!)

With some sites like gmail you will need to 'enable' insecure access in your account settings, then specify the imap server with the ssl port, e.g. imap.gmail.com:993

You may need to create an application specific password in gmail for imap access as well.

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support