[support] changing host: dealing with mails

Victor Trac victor.trac at gmail.com
Wed Mar 12 09:56:29 UTC 2008


On Wed, Mar 12, 2008 at 10:09 AM, Augustin (Beginner)
<drupal.beginner at wechange.org> wrote:
> Hello,
>
>
>  One of my web sites is changing host. I have prepared the Drupal
>  files, and used /etc/hosts to test the Drupal site at its new
>  location. Now, I only need to shut down the site, make a last sql
>  dump, import it and then, lastly, change the DNS.
>
>  But it only now occurred to me that migrating a web server is only
>  half of changing hosts.
>
>  What about mails?
>
>
>  What is a good procedure to migrate all the mails on the server, and
>  also to make sure that no mail is lost during the DNS change (during
>  the propagation of the new DNS)?
>
>  I have not found a page on the web about a best practice about
>  changing hosts, what data to migrate, what not, and how to be
>  prepared to avoid troubles.
>
>  Any hints?
>
>  Thanks.
>
>  Augustin.
>
>
>
>
>  --
>
>  --
>  [ Drupal support list | http://lists.drupal.org/ ]
>

This is not really Drupal related, but it kinds of depends on how the
mail is stored on the server.  On many hosts this could be ~/.Maildir,
~/.maildir, or depending on how the system is configured, a completely
different format altogether (mbox).  If you are running the same POP
or IMAP server with the same settings on both servers, you could
simply just copy these files.  With IMAP, I've found a simpler, and
often more reliable, solution is to use a mail client like Thunderbird
to create an account on both servers (connect via IP address if you
must), then just drag the mail folders from one account to the other.

As for MX DNS, you can lower your domain's TTL to 10 minutes or so a
day or two before you migrate so that when you make the MX change, the
old record won't be cached by other DNS servers for more than 10
minutes.  After migration, bring the TTL back up to some thing
reasonable, e.g. 12hrs.  You probably don't have to worry though, as
most mail transfer agents will try to find a mail server for a day or
two before giving up.

Hope that helps.

--Victor

-- 
http://www.victortrac.com


More information about the support mailing list