Bill Boebel
2006-Apr-21 19:01 UTC
[Dovecot] Bug: maidirsize double counting moved messages
The maildirsize file is double counting messages when moving them from folder to folder when "maildir_copy_with_hardlinks = no": 1024000000000S 99337571 19370 14010590 2 <--- moved from subfolder to subfolder -7005295 -1 14010590 2 <--- moved from subfolder to INBOX -7005295 -1 14010590 2 <--- moved from INBOX to subfolder -7005295 -1 14010590 2 <--- moved from subfolder to subfolder -7005295 -1 When I change "maildir_copy_with_hardlinks" to "yes", this problem only occurs when moving in and out of the INBOX, but not when moving from subfolder to subfolder: 7005295 1 <--- moved from subfolder to subfolder -7005295 -1 14010590 2 <--- moved from subfolder to INBOX -7005295 -1 14010590 2 <--- moved from INBOX to subfolder -7005295 -1 7005295 1 <--- moved from subfolder to subfolder -7005295 -1
Bill Boebel
2006-Apr-26 14:37 UTC
[Dovecot] Bug: maidirsize double counting moved messages
On Fri, April 21, 2006 15:01, Bill Boebel <bill at webmail.us> said:> The maildirsize file is double counting messages when moving them from > folder to folder when "maildir_copy_with_hardlinks = no": > > When I change "maildir_copy_with_hardlinks" to "yes", this problem only > occurs when moving in and out of the INBOX, but not when moving from > subfolder to subfolder:Well... I don't think this is the correct fix below, but it did the trick in our environment when maildir_copy_with_hardlinks=yes. I think the real problem is that quota_default_alloc() is getting called twice. Once from somewhere in mail_storage_copy() -> maildir_copy() -> mailbox_save_init(), and a second time somewhere after that. src/lib-storage/index/maildir/maildir-copy.c @136 < if (mbox->storage->copy_with_hardlinks/* && < mail->box->storage == mbox->ibox.box.storage*/) { ---> if (mbox->storage->copy_with_hardlinks) {
Bill Boebel
2006-Apr-26 14:39 UTC
[Dovecot] Bug: maidirsize double counting moved messages
Sorry, I left in a comment from testing: < if (mbox->storage->copy_with_hardlinks && < mail->box->storage == mbox->ibox.box.storage) { ---> if (mbox->storage->copy_with_hardlinks) {On Wed, April 26, 2006 10:37, Bill Boebel <bill at webmail.us> said:> On Fri, April 21, 2006 15:01, Bill Boebel <bill at webmail.us> said: > > The maildirsize file is double counting messages when moving them from > > folder to folder when "maildir_copy_with_hardlinks = no": > > > > When I change "maildir_copy_with_hardlinks" to "yes", this problem only > > occurs when moving in and out of the INBOX, but not when moving from > > subfolder to subfolder: > > Well... I don't think this is the correct fix below, but it did the trick in our > environment when maildir_copy_with_hardlinks=yes. I think the real problem is that > quota_default_alloc() is getting called twice. Once from somewhere in > mail_storage_copy() -> maildir_copy() -> mailbox_save_init(), and a second time > somewhere after that. > > src/lib-storage/index/maildir/maildir-copy.c > @136 > > < if (mbox->storage->copy_with_hardlinks/* && > < mail->box->storage == mbox->ibox.box.storage*/) { > --- > > if (mbox->storage->copy_with_hardlinks) { > > >
Bill Boebel
2006-May-18 13:49 UTC
[Dovecot] Bug: maidirsize double counting moved messages
On Wed, April 26, 2006 10:37, Bill Boebel said:> On Fri, April 21, 2006 15:01, Bill Boebel <bill at webmail.us> said: > > The maildirsize file is double counting messages when moving them from > > folder to folder when "maildir_copy_with_hardlinks = no": > > > > When I change "maildir_copy_with_hardlinks" to "yes", this problem only > > occurs when moving in and out of the INBOX, but not when moving from > > subfolder to subfolder: > > Well... I don't think this is the correct fix below, but it did the trick > in our environment when maildir_copy_with_hardlinks=yes. I think the real > problem is that quota_default_alloc() is getting called twice. Once from > somewhere in mail_storage_copy() -> maildir_copy() -> mailbox_save_init(), > and a second time somewhere after that. > > src/lib-storage/index/maildir/maildir-copy.c > @136 > > < if (mbox->storage->copy_with_hardlinks && > < mail->box->storage == mbox->ibox.box.storage) { > --- > > if (mbox->storage->copy_with_hardlinks) { >This size doubling is happening for any IMAP APPEND operation as well. It has been a pretty annoying bug, because we have to keep manually deleting maildirsize files to fix mailboxes so that they don't bounce mail due to the quota miscalculation. Timo, is this something you could take a look at? Thanks, Bill