<html dir="ltr"><head></head><body style="text-align:left; direction:ltr;"><div>An update:</div><div><br></div><div>I was able to migrate using 3rd option (Google Takeout + mb2md). After running mb2md I converted from Maildir++ (dotted) folders to hierarchical folders by hand, moved everything from under Inbox/cur to cur, and removed Inbox folder. Then simply copied the converted folders to mail_location and restarted Dovecot. Dovecot seemed to re-index everything and I was able to access my converted account from Evolution. Things would be simpler if I didn't use hierarchical folders (LAYOUT=fs). </div><div><br></div><div>One thing I noticed there is some duplication of messages in Inbox and Archived folders. Another thing is I'm not sure if I can merge Inbox and Archvied folders into a single Inbox folder (I can try). And I'd still would very much like to use Option #1 (doveadm backup directly from gmail), so if anyone has any success with this option please share your experience.</div><div><br></div><div>Thank you,</div><div>Yuri</div><div><br></div><div>On Sun, 2019-08-11 at 15:05 -0700, Yuri via dovecot wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><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>
</blockquote></body></html>