I'm also interested in learning how to do this best. Last time I thought about it is if users have a different e-mail address on the archive server, you can setup a BCC map in postfix that matches the pair of emails (primary email - archive email), this will automatically send all sent messages in the inbox of the archived email account. In that archive server you can setup sieve rules to move the emails to the sent folder. But that's rather a complicated solution, besides it doesn't work draft folder.
From: KT Walrus kevin@my.walr.us To: Dovecot Mailing List dovecot@dovecot.org Sent: Friday, June 17, 2016 9:18 PM Subject: archive all saved IMAP messages
I need to archive (i.e., send to another mail server) all messages saved on my mail servers. I’ve implemented for SMTP submission, but haven’t figured out how to archive messages saved by IMAP (like to Drafts, Sent, etc.).
How would I best implement this? Can I enable Sieve plugin for IMAP? Or, some other method? Like one way backup to archive server?
I really only need to archive the messages sent/saved by a user and not the messages received from other users.
Kevin