I had originally asked the original, closely-related question on superuser.com, but I feel this might be a little more stackoverflow speed since I want som开发者_如何转开发ething programmatic and automated, using tools no one there knows well. Here is the scenario:
Two accounts:
- Account A (original work account with quota)
- Account B (new backup email account)
Process:
- Create folder in Account B (e.g. "2010 Email Backup" folder).
- Migrate all folders in Account A nested into new folder on Account B (e.g. "2010 Email Backup" -> "Inbox", "Sent", "Trash", etc.).
I want to be able to do this every couple of months or every year, and script it for my needs with either imapsync or offlineimap. So: will using these tools, if this is possible, cause an issue when it checks Account A and clears out Account B because the original folders are different? I am not sure how specific they are, so I wanted some reports from the field. If anyone has experience with these tools, PLEASE let me know. I would love to figure this out before I hit a quota.
From the imapsync
FAQ:
Q. I have moved from Braunschweig to Graz, so I would like to have my
whole Braunschweig mail sorted into a folder INBOX.Braunschweig
of my
new mail account.
R. 1) First try (safe mode):
imapsync \
...
--regextrans2 's/INBOX(.*)/INBOX.Braunschweig$1/' \
--dry --justfolders
2) See if the output says everything you want imapsync
to do,
--dry
option is safe and does nothing real.
3) Remove --dry
.
Check the imap folder tree on the target side.
4) Remove --justfolders
.
Good tip, never realized you could use --dry or pick another folder with --regextrans2
Could of been possible with:
--prefix1 INBOX.Braunschweig
You might also want to use --subscribe
to make sure that you don't have any folders your not subscribed to that could otherwise get missed.
We actually wrote a cPanel IMAPSYNC too.
精彩评论