Faster way to move emails from one folder to another?

René J.V. Bertin rjvbertin at gmail.com
Tue Sep 10 10:14:48 BST 2019


On Tuesday September 10 2019 10:20:07 Martin Steigerwald wrote:

>The only way I know that is faster it to move files around in the 
>filesystem. Preferably while Akonadi is running and monitoring the 
>directory where the Maildir resource points to via Inotify.

That only works if the emails are individual files somewhere on *your* computer (might be the case with a primitive protocol like POP3 since the OP mentions it). And Inotify doesn't work on all filesystems (and only on Linux, for that matter).

My 4.1x version of KMail (Kontact) has a command Tools/Find Messages which looks like its a kind of one-shot filter. It's hopeless in its own right though: takes forever to open, then turns out to be modal (so you can't do anything else in KMail/Kontact), the date selection procedure is about the worst (and slowest) I've ever seen in a desktop OS, insists on putting the results in a (virtual?) folder and then doesn't give me any results for the search "after 20161231" and "before 20180101" in a folder on a remote IMAP server which should have returned a whole list.
The slowness might be explained if it tries to do a "live search" but there's no indication it does.

An actual filter that does the work for you might be the way to go in this case. Or, presuming all those emails are in a single source folder (your INBOX),

- set the INBOX message sorting to date (sent or received, the one from which you want the 2017 range)
- create the destination folder
- find and click on the earliest sent or received in 2017 (in the source folder)
- find the latest in the range and SHIFT-click on it to make an extended selection
- right-click on the selection and use the move command (or trigger it from the Message menu) and send the bunch to the destination folder.

This will probably still take a very long time because of the Akonadi overhead but I expect fully that you'd get the same overhead when you do the move as Martin suggested, and by doing it inside the Akonadi universe you avoid any issues that might occur when relying on filesystem notifications (I wouldn't be surprised if something in Akonadi fails to keep up and things start disappearing or instead get duplicated).

R.


More information about the kdepim-users mailing list