Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doveadm force resync (repair) without index file #150

Closed
jrse opened this issue May 24, 2018 · 1 comment
Closed

doveadm force resync (repair) without index file #150

jrse opened this issue May 24, 2018 · 1 comment
Assignees
Labels

Comments

@jrse
Copy link
Contributor

jrse commented May 24, 2018

force-resync currently uses B attribute to determine if a mail belongs to a certain mailbox if the index file no longer exist.

In case we repair a mailbox "INBOX" and have mails with the same UID (sample data) in different mailboxes.
The force-resync process will fail if we delete the index file in INBOX folder and start the resync. This is due to the fact that we are currently using the original UID (restored from mails xattribute) for the new index entry.

sample date:
MAILBOX: M(mailbox_guid)=ccbe6c2f6683065b127800009c60b9f7
B(mailbox_orig_name)=INBOX
mail_total=1, mails_displayed=1
mailbox_size=754 bytes

     MAIL:   U(uid)=35
             oid = 4b32d63385a9065b043500009c60b9f7
             R(receive_time)=2018-05-24 14:31:57
             save_time=2018-05-24 14:33:34
             Z(phy_size)=754 V(v_size) = 781 stat_size=754
             M(mailbox_guid)=ccbe6c2f6683065b127800009c60b9f7
             B(mailbox_orig_name)=Drafts
             G(mail_guid)=eac8b00690b0065bfa4200009c60b9f7
             I(rbox_version): 0.1 

MAILBOX: M(mailbox_guid)=ccbe6c2f6683065b127800009c60abc9
B(mailbox_orig_name)=INBOX
mail_total=1, mails_displayed=1
mailbox_size=754 bytes

     MAIL:   U(uid)=35
             oid = 4b32d63385a9065b043500009c60b9f7
             R(receive_time)=2018-05-24 14:31:57
             save_time=2018-05-24 14:33:34
             Z(phy_size)=754 V(v_size) = 781 stat_size=754
             M(mailbox_guid)=ccbe6c2f6683065b127800009c60b9f7
             B(mailbox_orig_name)=Drafts
             G(mail_guid)=eac8b00690b0065bfa4200009c60b9f7
             I(rbox_version): 0.1 

=> generate new uid instead of using the old entry.

@jrse jrse added the bug label May 24, 2018
@jrse jrse self-assigned this May 28, 2018
jrse added a commit that referenced this issue May 28, 2018
in case the index has been deleted, and user tries to repair the mailbox
the original mailbox name stored in attribute 'B' is used to group
objects into a mailbox. This could lead to redundant uids (e.g. through
copying / moving mails without update of the 'B' attribute). In this
case the uids is generated starting from 1 and all mails with the given
mailbox name ('B') are added to the mailbox.
@jrse
Copy link
Contributor Author

jrse commented May 29, 2018

done.

@jrse jrse closed this as completed May 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant