move many mails from one folder to another
-
During a migration from Outlook I have to move thousands of mails from one folder to another… (different Sent folders)
This is difficult and tedious… (mark mails and move them… slowly reaction of the webapp…)
Is there a simple way to do this? -
I only found two ways to move emails all emails from one folder to another.
- via IMAP sync (or kopano-sync can’t remember the name) essentially using IMAP.
- by hand in webapp (actually the old webaccess I find it faster for this).
In both cases it is very tedious.
Something more simple would be very much welcome from me too…
-
Thank you - now I do it via IMAP connection with thunderbird…
Something more simple would be very much welcome from me too…
sometimes simple things matter
-
I understand the right solution here is kopano-python.
I was however wondering if someone has written a script for this already.
-
in the end the easiest way I could do it was via Thunderbird (IMAP).
I still believe there should be an option somewhere in webapp to say “move all emails from this folder to another folder”.
-
Hello,
I had the same need for a bulk move of many (>10.000) Mails from one folder to another. The advanced wish was moving many mails to another (archive) user.
At first I searched this forum and the internet and found this documentation:
https://documentation.kopano.io/kopano_python_kopano/PythonKopano.pdfFor now I have made a quick’n’dirty Python script to move Mails from one Folder to another - even to another mailbox. Here it is. Hope it helps anyone:
import kopano from datetime import datetime, timedelta dont_move_days = datetime.now() - timedelta(days=90) server = kopano.Server() store1 = server.user('office').store store2 = server.user('archiv_office').store srcfolder = store1.folder('Weiterleitungen') dstfolder = store2.folder('Weiterleitungen') #other_folder = store1.folder('Archiv/Weiterleitungen') print("SRC: Folder {} has {} Mails.".format(srcfolder.name, srcfolder.count) ) print("DST: Folder {} has {} Mails.".format(dstfolder.name, dstfolder.count) ) print("Mails older than {} will not moved.".format(dont_move_days)) count = 0 count_src = srcfolder.count for item in srcfolder: count += 1 item_created = item.created if item_created < dont_move_days: print("Move Mail {}/{} to {}...".format(count, count_src, dstfolder.name)) item.move(dstfolder) # else: # print("Mail not moved {}.".format(count))
-
that’s great this will be very helpful!
I do believe that this funcitonality should be visible somewhere other than the back end…
I.e. some button in Webapp.
I am sure we won’t be the last two that need something like this.