#!/bin/cat $Id: FAQ.Archiving.txt,v 1.7 2018/04/24 00:16:21 gilles Exp gilles $ This documentation is also at http://imapsync.lamiral.info/#doc ============================================ Imapsync issues and tips about archiving. ============================================ Questions answered in this FAQ are: Q. Can I archive different accounts on the same destination account, each account on a separate folder? Q. How to move emails from one IMAP folder to another either on the same IMAP server or a different one? For example, all messages older than 1 year, move from INBOX to Archive. Q. Can imapsync be used to maintain a local offline copy of a mailbox from host1, eg for backup purposes, so that if the server fails, then the mailbox could be reinstated, ideally without requiring a second IMAP host? ======================================================================= Q. Can I archive different accounts on the same destination account, each account on a separate folder? R. Yes. Use --subfolder2 --subfolder2 str : Move whole host1 folders hierarchy under the host2 folder str. It is done it by adding two --regextrans2 options before all others. Add --debug to see what's really going on. Example: imapsync ... --user1 foo --subfolder2 foo imapsync ... --user1 bar --subfolder2 bar In case you need a strict sync, add --delete2 --delete2foldersonly "foo" (or "bar"), il will delete on account2 what is not on account1 but only in the right place, ie, the subfolder "foo". imapsync ... --user1 foo --subfolder2 foo --delete2 --delete2foldersonly "foo" ======================================================================= Q. How to move emails from one IMAP folder to another either on the same IMAP server or a different one? For example, all messages older than 1 year, move from INBOX to Archive. R1. Solution: imapsync ... --minage 365 --folder Inbox --f1f2 INBOX=Archive --delete --noexpungeaftereach Add option --noexpungeaftereach if speed is a concern. Add option --delete if you want to move messages, instead of just copy/sync them. R2. See also file FAQ.Folders_Mapping.txt ======================================================================= Q. Can imapsync be used to maintain a local offline copy of a mailbox from host1, eg for backup purposes, so that if the server fails, then the mailbox could be reinstated, ideally without requiring a second IMAP host? R1. No. Imapsync plays with imap servers only. R2. Imapsync can't but rick-sanders-imap-tools can! See https://github.com/andrewnimmo/rick-sanders-imap-tools Back up and restore IMAP accounts with imapdump.pl and dumptoIMAP.pl ======================================================================= ======================================================================= =======================================================================