On 29 Oct 2018, at 22.32, Frank-Ulrich Sommer <f-u.s@gmx.net> wrote:
Hi, due to a failing disk I had to restore everything from a backup including dovecot (2.2.22) and the Maildir containing the stored mails. A period of some days must later be restored manuall, but that is beyond scope for this question.
Naturally this causes confusion for the clients as they keep mails that are no longer on the server. That was expected but what puzzles me is that mails arriving after the succesful restore are only sporadically detected by some clients (e.g. K9 and Thunderbird) that were connected before the crash. A client that was connected for the first time after restoring from the backup works exactly as expected.
Might this situation lead to reusing UUIDs that some clients still remember as belonging to a different mail? Is there a clean solution for this on the server side or is it necessary to purge locally stored data by the clients (e.g. by temporarily removing account)?
You can try to change the mailbox UIDVALIDITY with doveadm mailbox update. When UIDVALIDITY changes clients should invalidate their caches and at minimum redownload all mail headers again. Some will also redownload all mail bodies. But then there is also clients that do not obey RFC and do nothing. For those the only way is to temporarily remove account and reconfigure account.
And then there is POP3 clients that require to remove and reconfigure accounts or the end users might see duplicate emails.
Sami