resend whole inbox to user
Aki Tuomi
aki.tuomi at open-xchange.com
Thu Apr 7 06:54:05 UTC 2022
> On 07/04/2022 09:49 Shawn Heisey <elyograg at elyograg.org> wrote:
>
>
> On 2022-04-06 13:29, Marc wrote:
> > I was wondering if there is some way to force an imap client to
> > 're-download' all the messages from the inbox. I can remember in the
> > 'old days' that when the connection was dropped during a pop download,
> > the whole inbox was re-downloaded, resulting in quite a lot of
> > duplicates. I am looking for such action.
>
> I have my mail in Maildir format. Here's a directory listing of one of
> my folders:
>
> root at bilbo:/var/vmail/elyograg.org/elyograg at elyograg.org/.Sent# ls -al
> total 9428
> drwxr-x--- 5 vmail mail 4096 Apr 6 22:30 .
> drwxr-x--- 82 vmail mail 4096 Apr 7 00:38 ..
> drwxr-x--- 2 vmail mail 917504 Apr 6 22:08 cur
> -rw-r----- 1 vmail mail 131824 Apr 5 17:12 dovecot.index
> -rw-r----- 1 vmail mail 7851560 Apr 6 22:30 dovecot.index.cache
> -rw-r----- 1 vmail mail 552 Apr 6 22:30 dovecot.index.log
> -rw-r----- 1 vmail mail 91520 Apr 5 17:12 dovecot.index.log.2
> -rw-r----- 1 vmail mail 84 Feb 26 00:39 dovecot-keywords
> -rw-r----- 1 vmail mail 549725 Apr 6 22:08 dovecot-uidlist
> drwxr-x--- 2 vmail mail 4096 Jan 28 2003 new
> drwxr-x--- 2 vmail mail 69632 Apr 6 22:08 tmp
>
> Something I discovered mostly by accident: If I delete all the files in
> a mail folder matching a glob pattern of dovecot* then any IMAP client
> that accesses it will re-download all the messages in the folder. There
> are nearly 11000 messages in that Sent folder. Takes a while to
> redownload them.
>
> I don't know if there might be unintended side effects from deleting all
> those files. My mailbox seems to have survived it.
>
> Thanks,
> Shawn
Removing all dovecot* files causes UIDVALIDITY to be reset, which causes your client to download all the mails.
There is easier, less expensive way to achieve this:
doveadm mailbox update
Aki
More information about the dovecot
mailing list