I've been migrating from a dovecot 2.2.22 instance to a dovecot 2.3.7.2 instance. (Said differently, from an ubuntu 16.04 host to a 20.04 host.) It's a tiny site: only a handful of users actually had to migrate, most either died on the old one or were born on the new one.? The main user in need of migration was me. After fiddling with dsync and not getting it working, I threw in the towel.? This is a migration I had to do once for precisely one user.? I had been using the old host exclusively, so it was easy to shut down both dovecot instances the time it took me to rsync my data from one to the other.? Now that seems to work, almost. Mail is being delivered to my inbox, anyway.? Most other folders are looking inaccessible to my mail client (thunderbird, for this test). The main difference between the two servers, aside from the above, is a switch from ??? mail_location = maildir:~/Maildir to ??? mail_home = /var/mail/vmail/%d/%n ??? mail_location = maildir:/var/mail/vmail/%d/%n/mail:LAYOUT=fs ??? mail_privileged_group = mail I corrected permissions and ownership when I copied the data. Now I think the problem is that LAYOUT=fs means that I should have a slightly different folder hierarchy now.? The question is how best to fix this. I have things like this ??? .Archives.2020 ??? .Archives.2020/new ??? .Archives.2020/tmp ??? .Archives.2020/cur when I think I should have things like this ??? Archives ??? Archives/2021 ??? Archives/2021/new ??? Archives/2021/tmp ??? Archives/2021/cur And, again, this is one-off, so a manual fix seems most appropriate.? I'm quite tempted simply to shut down the dovecot instance for a minute at a quiet moment (mail retries...) and rename directories as indicated above.? I only have to rename five directories. Having gotten myself in a bit of a muddle on this, I thought perhaps a reality check that I'm not about to make it worse would be appropriate. Many thanks. -- Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255 https://www.p27.eu/jeff/ https://www.mobilitains.fr/
On Sat, May 22, 2021 at 10:28:46PM +0200, Jeff Abrahamson wrote:> I've been migrating from a dovecot 2.2.22 instance to a dovecot > 2.3.7.2 instance.? [...] > > [...I failed with dsync and ended up using rsync, which almost > works...] > > The main difference between the two servers, aside from the above, > is a switch from > >???? mail_location = maildir:~/Maildir > > to > >???? mail_home = /var/mail/vmail/%d/%n >???? mail_location = maildir:/var/mail/vmail/%d/%n/mail:LAYOUT=fs >???? mail_privileged_group = mail > > I corrected permissions and ownership when I copied the data. > > Now I think the problem is that LAYOUT=fs means that I should have a > slightly different folder hierarchy now.? The question is how best > to fix this. > > I have things like this > >???? .Archives.2020 >???? .Archives.2020/new >???? .Archives.2020/tmp >???? .Archives.2020/cur > > when I think I should have things like this > >???? Archives >???? Archives/2021 >???? Archives/2021/new >???? Archives/2021/tmp >???? Archives/2021/curJust to provide documentation to future folks stumbling on this question: ? * Yes, that did what I expected. ? * Yes, I know, that only worked because it was a one-off, don't try ??? this for multiple users.???????????????????????????????????????? ? * Thunderbird remains relatively confused, mutt is perfectly happy. In particular, Thunderbird doesn't want to forget about some older folders and wasn't quick to learn about some of the new names.? In addition, some mail messages show up in thunderbird dated at the time of folder download even though they are clearly from quite a long while before that. In mutt, none of these problems appear.? Since I don't expect mutt to be prescient or magical, I have to conclude this is a bug (or errant feature) in thunderbird. This list is about dovecot.? Why am I telling you about these two MUAs?? Because it might be important to understand that thunderbird is capable of throwing such red herrings is all. Jeff Abrahamson https://www.p27.eu/jeff/ https://www.mobilitains.fr/
Sorry for late reply? imapsync is a great tool? for migrating accounts On 5/22/21 11:28 PM, Jeff Abrahamson wrote:> I've been migrating from a dovecot 2.2.22 instance to a dovecot > 2.3.7.2 instance. > (Said differently, from an ubuntu 16.04 host to a 20.04 host.) It's a > tiny site: > only a handful of users actually had to migrate, most either died on > the old one > or were born on the new one.? The main user in need of migration was me. > > After fiddling with dsync and not getting it working, I threw in the > towel.? This > is a migration I had to do once for precisely one user.? I had been > using the old > host exclusively, so it was easy to shut down both dovecot instances > the time it > took me to rsync my data from one to the other.? Now that seems to > work, almost. > Mail is being delivered to my inbox, anyway.? Most other folders are > looking > inaccessible to my mail client (thunderbird, for this test). > > The main difference between the two servers, aside from the above, is > a switch from > > ??? mail_location = maildir:~/Maildir > > to > > ??? mail_home = /var/mail/vmail/%d/%n > ??? mail_location = maildir:/var/mail/vmail/%d/%n/mail:LAYOUT=fs > ??? mail_privileged_group = mail > > I corrected permissions and ownership when I copied the data. > > Now I think the problem is that LAYOUT=fs means that I should have a > slightly different > folder hierarchy now.? The question is how best to fix this. > > I have things like this > > ??? .Archives.2020 > ??? .Archives.2020/new > ??? .Archives.2020/tmp > ??? .Archives.2020/cur > > when I think I should have things like this > > ??? Archives > ??? Archives/2021 > ??? Archives/2021/new > ??? Archives/2021/tmp > ??? Archives/2021/cur > > And, again, this is one-off, so a manual fix seems most appropriate.? > I'm quite tempted > simply to shut down the dovecot instance for a minute at a quiet > moment (mail retries...) > and rename directories as indicated above.? I only have to rename five > directories. > > Having gotten myself in a bit of a muddle on this, I thought perhaps a > reality check that > I'm not about to make it worse would be appropriate. > > Many thanks. >