On 2025-12-29 05:22 PM, "Michael" <[email protected]> wrote:
> Considering a Kmail client approach you can use IMAP4 to download your 
> messages from the server to the client, but large numbers of messages on 
> multiple accounts will take time.  It is easier if you copy over the whole 
> maildir backup from the server filesystem directly to the client PC, then re-
> index the akonadi SQL database:
> 
> Close kmail, stop the akonadi back end:
> 
> akonadictl stop
> 
> copy your messages from the server storage/backup to the corresponding  
> .maildir/{cur,new,tmp} subdirectories on your user's home on your desktop.
> 
> Disconnect the NIC and finally restart akonadi, it will crunch through the 
> message storage and with some patience it will re-index all your messages.

Okay. Did all that.

> If it doesn't reindex them correctly, you can right click on your top imap 
> folder within Kmail, typically this is the Inbox folder for each account and 
> navigate to Folder Properties > Maintenance, then click "Reindex folder".

It's had two hours so far...

> The incantations of:
> 
> akonadictl fsck
> 
> and 
> 
> akonadictl vacuum

Did those too, before starting.

... If the Kmail GUI 
> is not showing all expected messages, you can shut it down, shutdown akonadi 
> and restart Kmail. This will normally refresh Kmail's list of messages, but 
> with large numbers of accounts/folders/messages you have to be patient for 
> the 
> whole process to complete before you start interfering with it.

I'll give it the rest of the afternoon to finish the 40k messages. I'm still 
seeing occasional reports from org.kde.pim.imapresource, so the process is 
still alive.

> Once it's done you can reconnect the PC to the network, so it can continue to 
> sync with your mail server and can fetch newer messages.

The desktop is connected via WiFi, so I have to stop and start NetworkManager. 
Not a problem.

> The IMAP4 protocol 
> allows bidirectional data synchronisation, as long as you have enabled both 
> local and remote subscriptions on Kmail accounts.  Therefore any changes you 
> make in your Kmail folders will be reflected on the server storage too once 
> the client has sync'ed with the server.  I have used this method to move 
> messages between different servers as part of account migration.  Moving only 
> a few hundred messages at a time so as to not overload the remote server and 
> cause the mail ISP to throttle my connection, has worked flawlessly here many 
> a time.

If the current reindexing job fails, I may have to take that piecemeal approach 
too.

> Separating the server operation from the client PC, whether this is physical 
> or virtual separation, has its benefits and disbenefits.  Virtual separation 
> reduces the hardware and running costs, but the workflow will not change 
> materially.  Only you can tell what benefits you think such a simplification 
> could bring, given the capital outlay for the server is already a sunk cost.

It's already like that; has been for years: Mail server etc on serv.mynet, 
client on dtop.mynet.

> HTH.

Indeed; I'm grateful. :)







Reply via email to