Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Hi,

We are in the middle of migration phase and we have issues with our mail provider, we cannot sync our data in a stable manner.
We asked for a backup of our data, and finally we got it, we then configured a local dovecot server and pushed some maildir backups on it to test the migration.
The maildir could not be used directly we had to alter its directory tree. We did a test and we could get the data transferred to our new mail server but with some issues :
1 - The timestamp of the email was not kept correct on the backup (mtime), so after the migration, all emails are being shown as if they were received/sent on the same day, this problem was mitigated using this script : https://github.com/mikebrady/imap_maildir_date_fixer (if it can help someone else).

2 -The email flags were not recovered, so all emails are being shown as unread.

The source server is still accessible despite it's poor service, is there a way using imapsync to sync email flags from the source server after the local migration?

Regards.

You must be logged in to vote

Replies: 2 comments

Comment options

we cannot sync our data in a stable manner.

What is the imap server? mainstream provider?

1 - The timestamp of the email was not kept correct on the backup (mtime), so after the migration, all emails are being shown as if they were received/sent on the same day, this problem was mitigated using this script : https://github.com/mikebrady/imap_maildir_date_fixer (if it can help someone else).

Ok.
Imapsync can overcome this issue with the option --idatefromheader, it does this on the fly
https://imapsync.lamiral.info/README

     --syncinternaldates : Sets the internal dates on host2 as the same as host1.
                           Turned on by default. The internal date is the date
                           when a message arrives on a host (Unix mtime usually).
     --idatefromheader   : Sets the internal dates on host2 as the same as the
                           ones in "Date:" headers.

2 -The email flags were not recovered, so all emails are being shown as unread.
The source server is still accessible despite it's poor service, is there a way using imapsync to sync email flags from the source server after the local migration?

Imapsync resyncs flags by default.
If you want to add the \Seen flag to all messages:
https://imapsync.lamiral.info/FAQ.d/FAQ.Flags.txt
...

On Unix:
  imapsync ... --search1 UNSEEN --regexflag 's,,\\Seen ,'

On Winwows:
  imapsync.exe ... --search1 UNSEEN  --regexflag "s,,\\Seen ,"
You must be logged in to vote
0 replies
Comment options

Hi, and thanks

The source email server uses icewarp as a mail server.
From the backup data, we found that the metadata are included in several .data files, and it's not usable directly by dovecot.

From your response, I understand that it is possible to get the correct state of the email after being migrated from a backup just by executing a sync from the source server?

I will try it and report back

Regards.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
Flags Flags issues Date
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.