Migration - Metadata
I am new to Zimbra and didn't find any posts about this so please forgive me if someone has already asked this and I missed it.
Does anyone know if the metadata of the emails is maintained when migrating to the Zimbra platform? (i.e. Date/Time of the emails sent/received, and maintaining the "To", "From", "cc", "bcc" and "subject" fields).
Most of that is retained when you migrate using imapsync, or other imap related sync methods.
BCC is not an actual header, so that will not be retained, but the rest should be there.
I'd like to follow up on the question of metadata, specifically the Seen flag.
You can use IMAP to get the status flags but unfortunately IMAP is not an option in the project I am working on. (Our users's passwords are encrypted so my IMAP script can't log into their Zimbra accounts).
I'm using the REST command zmmailbox -z -m <user> getRestURL '//?fmt=zip&query=is:anywhere' to extract mailboxes but I don't see any way to obtain the flags with that command. I read that you can use 'http://localhost/home/<user>/?id=<id>&fmt=sync' to get the metadata on a per-message basis but as far as I can tell there is no way to correlate that info with the messages extracted with zmmailbox.
Is there a way to get the flags for exported messages?
The GetRestURL command extracts all of the metadata as well. If you look at the .tgz or .zip file it creates, there is a .meta file for each email, and "unread" is one of the flags (which corresponds to the IMAP "seen" flag).
On the IMAP note, one thing you can do is extract the crypted password from the previously mentioned commands, set the password to a generic one that your script is aware of to access the account with IMAP, and then reset it back to the crypted password when the IMAP process is complete.
> The GetRestURL command extracts all of the metadata as well. If you look at the .tgz or .zip file it creates, there is a .meta file for each email
Hmm, for some reason I didn't get any .meta files when I unzipped the output file, just *.eml messge files.
drwxr-x--- 2 zimbra zimbra 4096 Apr 14 09:17 .
drwxr-x--- 5 zimbra zimbra 4096 Apr 14 09:15 ..
-rw-rw---- 1 zimbra zimbra 1277 Apr 13 11:27 Service mailbox.eml
-rw-rw---- 1 zimbra zimbra 1259 Apr 13 11:27 Service mailbox stoppep.eml
-rw-rw---- 1 zimbra zimbra 1261 Apr 13 11:27 Service mailboxd started.eml
> set the password to a generic one that your script is aware of to access [...] and then reset it back to the crypted password.
Good idea, that didn't occur to me. :-(
Any idea why the .meta files didn't get written?
> for some reason I didn't get any .meta files when I unzipped the output file, just *.eml messge files. Any idea why the .meta files didn't get written?
To answer my own question, the .meta files _were_ exported when I specified 'fmt=tgz' instead of 'fmt=zip'.