Keep the directory structures which are used to organize these emails.
offlineimap to synchronize the emails when the iMail at HKUST change to @Connect.
The configuration in my
[general] accounts = USTiMail [Account USTiMail] localrepository = Local remoterepository = Remote [Repository Local] type = Maildir localfolders = ~/Mail/USTiMail [Repository Remote] type = IMAP readonly = true remotehost = imap.ust.hk remoteuser = zma
readonly = true in the Remote repository part is to make sure changes at local by accident are not synced to the remote IMAP side.
After the emails are sync’ed from the IMAP server, archive or compress as you need.
mutt -f /path/to/a/mail/dir/