Restored mail folders conflict with renamed original ones

Aki Tuomi aki.tuomi at open-xchange.com
Tue Feb 21 07:56:11 UTC 2023


> On 20/02/2023 23:42 EET Nikolaos Milas <nmilas at noa.gr> wrote:
> 
> 
> Hello,
> 
> We are running Dovecot 2.3.18 (together with Postfix) on CentOS 7. It uses a Maildir structure.
> 
> We have a user who has organized his mailbox as shows up at the end of this mail. The user had forgotten that he had renamed his "Grants Active \ European" (.Grants Active.European) folder to "Grants Active \ International" (.Grants Active.International), he thought that it was lost and requested a restore of "Grants Active \ European" (with all of its subfolders) from backup. 
> 
> Since we did that (using a simple "cp -rp" from a backup, observing timestamps, ownership and permissions), mail client software won't see "European" mail folder in"Grants Active" mail folder; "International" mail folder shows up but only with two folders, those which do not exist in "European" branch (obviously, these were created later). 
> 
> I have tried to run the command "doveadm index -u userx Grants\ Active" and likewise for each and every mail subfolder under "Grants\ Active"; I have also tried deleting the dovecot.index.cache and dovecot.index.log from the latter ("Grants\ Active") and then run: 
> 
> > doveadm -vD force-resync -u userx Grants\ Active
> but it didn't do the trick: Mail clients are still stuck as I explained. 
> 
> In the end, I thought that the snag might be that mail folders that are not appearing have identical (duplicate) UIDs; As an example: 
> 
> > [root at mailx .Grants Active.European]# cat dovecot-uidlist
> >  3 V1548680759 N1 G64e70a1130343f61003c0000715faa8d
> >  [root at mailx .Grants Active.European]# cd ..
> >  [root at mailx Maildir]# cd .Grants\ Active.International
> >  [root at mailx .Grants Active.International]# cat dovecot-uidlist
> >  3 V1548680759 N1 G64e70a1130343f61003c0000715faa8d
> > 
> If so, how should we overcome this issue? 
> 
> I guess I could simply delete the restored folders to return to an acceptable state? If nevertheless we need to restore the ".European" mail folder from a backup (as it was before getting renamed), what would be the right way to do so?
> 
> Is there another way to resolve the issue without deleting the restored mail folders?
> 
> Here is the list of mail folders in this mailbox (I have intentionally removed lots of them, to reduce irrelevant content; this mailbox includes a large number of mail folders):
> 

Can you enable mail_debug=yes, restart, ask the user to access the folder(s) and provide those logs?

Aki


More information about the dovecot mailing list