Dovecot UIDs and POP.

@lbutlr
Sat, 21 Sep 2019 20:08:43 -0000

On Sep 20, 2019, at 10:38 PM, Plutocrat <plutocrat at gmail.com>
wrote:
> I recently performed a mail server migration for a client under fairly
serious time constraints (ahem, yes one of those jobs). I would normally use
imapsync to get all the mail copied to the new server, but under the
circumstances, I had to write a script to rsync each of the mailboxes over ssh,
from one server to another.
>
> This all worked fine, except for the fact that if a client was using a POP
email client, when they connected to the new server, they re-downloaded all
their mail, creating duplicates of everything in their Outlook client. Of course
they weren't happy about this. IMAP email clients were OK. No duplicates,
and everything was fine.

Dealing with weird POP3 things h is why I disabled it on my server more than a
decade ago; users have to beg for POP access and promise they will ONLY use it
to get their mail into gmail.

> So while I was migrating the mail, I did try for a while to understand the
format of the UID files, but failed to do so in the available time, so the
client just had to deal with duplicate emails. But now the smoke has cleared,
I'd like to understand the problem a little better, and I was hoping someone
on this forum could explain it to me, and the changes I'd need to make to
the files so that the POP client DIDN'T download the duplicate emails.

Did you check <https://wiki.dovecot.org/Migration>? It has a lot of info
on this.

Seems dsync would hav been the best way to do this?

<https://wiki.dovecot.org/Migration/Dsync>

> As a secondary question -- and perhaps I should put this in a separate
message -- I did notice that "doveadm sync" would apparently have
helped me with this, but I wasn't able to get that to work either. I believe
it was something to do with the fact that all the mailboxes were under the same
linux user account on the target server, and I couldn't figure out all the
paths and permissions in time. Would 'doveadm sync' have fixed all the
UID and duplicate POP email issues?

Don?t know, but dsync says it does this:

"The pop3-migration plugin is used to preserve POP3 UIDLs. When dsync is
handling IMAP INBOX and requests a POP3 UIDL, the plugin connects to the POP3
server and figures out which IMAP messages match which POP3 messages and then
returns the appropriate POP3 UIDL.?

Trouble is, if you are migrating POP and the server is not up, I am not sure
what you can do with dsync?


--
@mdhughes: One of the few regrets I have about lawn-less apartments:
Shallow graves are so much harder to come by.