Mailu, fetchmail, imapsync or my own experience of moving from Yandex 360 to my own server

container. From the interesting – it was found that in the mailbox migration script ( comments interfere with the launch of the whole command. I had to remove them. I also added a standard source server to the html form, and specified imap as the standard destination server (dns container name dovecot). Also, for the destination server, data will be transmitted without encryption. If you need to use ssl, then a separate container with the 993-port tag is available for this. The container turned out to be quite bold, almost 170Mb, because contains a bunch of dependencies for the imapsync utility, apache and php.

You also need to take into account that when you try to hang imapsync on a random port and try to work with it via http, then problems may arise due to HSTS. Clearing the HSTS cache in the browser every time to open a page is a pain, so you need to use nginx.

To add to an existing imapsync container docker-compose file, do the following:

cd /mailu
patch < docker-compose.patch
wget -P /mailu/overrides/nginx/
d stop front && d up -d front imapsync --no-deps

After that, you can connect to /imapsync/ and start the mailbox transfer process.

Transfer process

Knowing the login / password to your mailbox is far from a fact that you can synchronize it right away.

Firstly, Yandex does not allow using imap for those mailboxes that have not completed registration through the web interface. After resetting the password on the mailbox, every time I had to press a button in the web interface after authorization with a new password.

Secondly, not all users had an active checkbox to allow connections via imap with a standard user password. Even on those mailboxes that were previously guaranteed to be used in email clients. It also did not help to enable imap for all mailboxes by checking the “IMAP” checkbox in the domain admin panel.

Therefore, the following order was developed:

  1. Resetting a password for a user in the Yandex admin panel.

  2. Authorization under the user in a private tab.

  3. Confirm registration

  4. Gear -> All settings -> Mail programs and turn on the “Portal password” checkbox.

  5. Create a user in the Mailu admin panel

  6. Go to imapsync and start the synchronization.

  7. You can perform steps 1-5 for another mailbox while the current one is being transferred.
    Check the result and close the private tab.


This article does not claim to be a correct guide to action in all respects. The author did not aim to discredit Yandex services. For 10 years of successful use of Yandex services, I did not have any critical problems, and the decision was made to try to implement my mail server myself, because. there is no certainty that in another 10 years letters with all historical correspondence will be available at all (the data on Yandex Disk from the transferred users has already been deleted… perhaps there was a notification about this, but I just missed it 🙁 )

From the first quarter of the first grade until graduation, the author always had a solid three in the Russian language, so please don’t kick at spelling, etc. Just write in a personal if you find a jamb.

Artifacts from the article:

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *