resend whole inbox to user
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.
On 2022-04-06 12: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.
While not a 'dovecot' question.. IMAP does NOT download messages in the first place, so there is no such thing as re-download.
You simply set the IMAP client to 'synchronize' if you want a copy stored locally. Eg, in Thunderbird, click on properties, synchronization, Select this folder for offline use, download.
Every email client calls this something else, but the idea is the same. 'Keep local copy' is another common term.
Please check the help documentation on the email client of choice.
-- "Catch the Magic of Linux..."
Michael Peddemors, President/CEO LinuxMagic Inc. Visit us at http://www.linuxmagic.com @linuxmagic A Wizard IT Company - For More Info http://www.wizard.ca "LinuxMagic" a Registered TradeMark of Wizard Tower TechnoServices Ltd.
604-682-0300 Beautiful British Columbia, Canada
This email and any electronic data contained are confidential and intended solely for the use of the individual or entity to which they are addressed. Please note that any views or opinions presented in this email are solely those of the author and are not intended to represent those of the company.
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.
While not a 'dovecot' question.. IMAP does NOT download messages in the first place, so there is no such thing as re-download.
I am not sure. In the worst case you have to change all unique msgids or so, not?
You simply set the IMAP client to 'synchronize' if you want a copy stored locally. Eg, in Thunderbird, click on properties, synchronization, Select this folder for offline use, download.
I think the default behaviour of most clients is synchronize the inbox. Download synchronize, what is in the name.
On 04/06/2022 1:29 PM Marc marc@f1-outsourcing.eu 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.
You can change the UIDVALIDITY of the mailbox. This invalidates the client cache which would cause a (well-behaving) client to rebuild that mailbox from current server state.
https://datatracker.ietf.org/doc/html/rfc3501#section-2.3.1.1
michael
On 2022-04-06 20: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.
This mere action might work, try mail client apps, I think some keep account data in storage after removing from device, then you can remove account and close the app, and add the account back again, anyhow it will re-download all messages and might simulate the 'old days' experience. If didn't you might need to clear app cache before adding an account.
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@bilbo:/var/vmail/elyograg.org/elyograg@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
On 07/04/2022 09:49 Shawn Heisey elyograg@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@bilbo:/var/vmail/elyograg.org/elyograg@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
participants (6)
-
Aki Tuomi
-
hi@zakaria.website
-
Marc
-
Michael Peddemors
-
Michael Slusarz
-
Shawn Heisey