Mail migration: how to easily move from one server and go to another

The topic indicated in the title may not be relevant for respected Khabrovites, but sometimes it is simply necessary to raise it. The fact is that I have been working as an administrator for many years in a humanitarian research institute, where employees have such qualifications in the field of modern information technologies that the notorious bookkeeping from anecdotes about IT seems like a collection of philosophers dedicated to all the secrets of being. Dear scientists, manage to enter the names of the mail servers in Russian letters, instead of the “@” sign, write “dog” in brackets (and then say that it was so written in the mailing address sent to them), try to send mail to WhatsApp using The Bat! and do a bunch of weird things, often in the same message. It is useless to teach them; it is impossible to fight them; it remains to accept your fate and automate all operations related to the correction of their errors to the utmost.



One of the most sinister and dangerous operations in my practice was the migration of Web mail from server to server. The fact is that the institute’s employees already have three service mails: one includes an internal Exchange server, the other runs on Mail.ru, and the third on Gmail. No, it's not me idiot, and not even them. This is a directive order related to some departmental games. Something must remain inside the institute on the "corporate" server, something related to applications and grants must certainly go through Russian mail, and the mail of Gmail from my dear colleagues is connected with such certainly necessary things as documents and tables Google, backup to disk, etc. The only trouble is that the seven nannies, as you know, have a child without an eye - that is, in this case, between the three mail servers my colleagues in the most explicit way manage to lose the most important letters!



There is another problem that often necessitates mail migration. Modern mail services often allow automatic relaying of messages from one server to another, that is, mail collection. And a user who is used to the fact that his messages on the server, say Mail.ru, are automatically copied to Yandex mail, sometimes forgets as a result that in this way he gets access not to all messages, but only to those that were received after mail collection settings. Therefore, he may have a natural desire to complete the complete migration of mail from the old server to a new, more frequently used one, and to whom will he go with this desire? Correct: to the nearest system administrator!



I think a similar situation arises for anyone who is somehow forced to have several email accounts, much less to administer them, or simply wants to move from server to server without losing important information. Of course, IT bison can easily solve this problem with two clicks of the mouse, but if you are inexperienced in such matters, then email migration can turn into a difficult task for you. Therefore, I decided to briefly share my experience on how to easily export mail letters to some storage and then import mail to another server. Perhaps this operation will help someone get rid of minor troubles or simply make life easier!



Export letters: a bit of theory, a bit of practice



In principle, mail servers work with client programs using one of two protocols: POP3 or IMAP. If these names suddenly do not tell you anything (does this happen?), I’ll try to explain in simple words: the POP3 protocol downloads letters from the server to your computer, and the IMAP protocol processes them directly on the server. Old mail clients by default worked (and continue to work) with the POP3 protocol, unloading mail messages in a folder specially allocated for the client (usually it is located somewhere in the user directory, among the folders with application data hidden by default). IMAP is more modern, and with it you can also import emails to local or network storage. So the question is mainly not how to download the letters you need, but how to forward them to the right server to perform mail migration. The easiest option is to use the IMAP protocol, copy all letters to some storage in EML format on it, and then upload them to another folder on another account, taking advantage of the fact that the format of the message files is generally the same.



How to do it?



The simplest method that I use at the lowest cost is to migrate mail letters using some kind of data copying program that supports IMAP. This is done in two steps.





At the same time, the mail migration program from the point of view of both servers behaves like a regular IMAP client. (By the way, most mail servers will require permission from you to use the specified program as an email client, so be sure to log into your mail account and allow the server to use this utility in the list of available clients via IMAP before migrating mail with any utility). Such programs typically require a minimum of manual work to pre-configure email migration. Usually you can even set up a schedule for regular automatic migration of mail from server to server, if you need it for some reason. Personally, I use the Handy Backup program to export mail letters, since it is installed on almost all machines and requires a minimum of settings, which are also centralized from the administrator’s machine - you don’t have to go anywhere. But, by and large, the software used is unimportant, if only it could skillfully export and import mail directly to Web servers, and support a single format for letters on both servers.



And Microsoft, as usual ...



A separate headache is the migration of Exchange or Outlook e-mail (I do not mean the Outlook.com mail server, but the client), because Microsoft, as usual, follows a non-standard path. Well, if in this situation you have at hand specialized software for exporting Outlook mail letters or Exchange servers, then the task is simplified before reading the instructions for migrating mail letters running the corresponding program. It’s good that there are a lot of such programs, as well as specialized plugins for the corresponding software oriented to Microsoft products.



POP3 Email Migration



Some people like perversions, but in general this is not so. Therefore, it is not necessary to transfer mail from server to server using the POP3 protocol, it is old and ugly. Go to IMAP on both servers (how to do this, almost every provider has detailed instructions), and then do everything as described above (or at least use the migration tool built into the mail service - sometimes there are such tools, although their convenience and the logic of work usually leaves much to be desired). You can also try the old-fashioned manual method: using the client program, transfer letters from folder to folder, or simply select them and send them to a new server. Once, when we were young, we all acted just like that, and it didn’t seem indecent to us, so in a hopeless situation, you can try again to do such manual work ...



In general, the migration of email from server to server by sequentially importing mail to the repository, and then exporting mail to a new server via IMAP, meets all the basic criteria for working with programs. These criteria are clear logic, security, automation and the availability of a large number of ready-made tools available that can do the job for you. So, I hope this my note will be useful to someone and simplify my life in those cases when the accounting department or planning department suddenly urgently needs to transfer them from Yandex to Mail.ru, from Google to Yahoo! or somewhere else, where the chief suddenly preoccupied with dislocation of mail orders. Do not let yourself tire, colleagues!



All Articles