<html dir="ltr"><head></head><body style="text-align:left; direction:ltr;"><div><font face="monospace" size="3">Hi everyone,</font></div><div><font face="monospace" size="3"><br></font></div><div><font face="monospace" size="3">I'm trying to migrate my gmail to dovecot following instructions at <a href="https://wiki.dovecot.org/Migration/Gmail">https://wiki.dovecot.org/Migration/Gmail</a></font></div><div><font face="monospace" size="3"><br></font></div><div><font face="monospace" size="3">Using -a 'virtual/All' option does not seem to work because the gmail folder with that name does not exist, but -a '[Gmail]/All Mail' seem to work. I'm using the following command:</font></div><div><br></div><div><font face="monospace" size="3">sudo doveadm \</font></div><div><font face="monospace" size="3">-o imapc_host=imap.gmail.com \</font></div><div><font face="monospace" size="3">-o <a href="mailto:imapc_user=yuriry@gmail.com">imapc_user=user@gmail.com</a> \</font></div><div><font face="monospace" size="3">-o imapc_password=gmailpassword \</font></div><div><font face="monospace" size="3">-o imapc_features="rfc822.size gmail-migration" \</font></div><div><font face="monospace" size="3">-o imapc_port=993 \</font></div><div><font face="monospace" size="3">-o imapc_ssl=imaps \</font></div><div><font face="monospace" size="3">-o ssl_client_ca_dir=/etc/ssl/certs \</font></div><div><font face="monospace" size="3">-o imapc_ssl_verify=yes \</font></div><div><font face="monospace" size="3">backup -a '[Gmail]/All Mail' -O '-$GmailHaveLabels' -R -u user<a href="file:///@ex">@exmaple</a>.com imapc:</font></div><div><font face="monospace" size="3"><br></font></div><div><font face="monospace" size="3">The problem is this command only migrates approximately 25% of my emails by size. Google Takeout exports 4 times more data in mbox format, the size of exported mboxes aligns with what Google tells me a the bottom of gmail settings page.</font></div><div><font face="monospace" size="3"><br></font></div><div><font face="monospace" size="3">I experimented with other options of 'doveadm backup' command, but they all resulted in less data being migrated. The above options are the best I was able to achive so far.</font></div><div><font face="monospace" size="3"><br></font></div><div><font face="monospace" size="3">Another option I was considering is to convert Google Takeout mboxes to dovecot format. I tried using 'doveadm import' command, but got confused with various user and search query options of the command. The best I was able to achive was to output a folder under /Takeout which mimics my mbox structure, but with no imported messages.</font></div><div><font face="monospace" size="3"><br></font></div><div><font face="monospace" size="3">A third option I'm considering is to convert </font><span style="font-family: monospace; font-size: medium;">Google Takeout mboxes using mb2md command. Conversion seems to work fine, but the output is in the traditional (dotted) format, and for historical reasons I use 'LAYOUT=fs' option. So I need to do some extra work to convert folder names. And even if I do so, I'm still not sure if I can import Maildir to dovecot because dovecot's Maildir has other information, such as indices, logs, etc., not just email folders.</span></div><div><font face="monospace" size="3"><br></font></div><div><font face="monospace" size="3">I'll keep investigating the second and the third option because it seems that Google Takeout gives me all my emails, but I'm not sure if those are the right paths.</font></div><div><br></div><div>I wanted to ask the experts about the best option to migrate gmail to dovecot. Has anyone being able to successfully migrate all their emails from gmail and what steps have been used for that?</div><div><font face="monospace" size="3"><br></font></div><div><font face="monospace" size="3">My Dovecot version: 2.3.4.1</font></div><div><font face="monospace" size="3"><br></font></div><div><font face="monospace" size="3">Thank you,</font></div><div><font face="monospace" size="3">Yuri</font></div><div><font face="monospace" size="3"><br></font></div></body></html>