On October 20, 2016 at 8:03 PM Ladislav Laska <laska@kam.mff.cuni.cz> wrote:
Hi!
Somehow Dovecot thinks that the mbox file changed under it..
Yes. And it's probably right, but I wonder what could have changed it. I looked around inotify and it seems there is no way to let a file being watched and get program names/pids of processes accessing it.
These mbox corruptions are usually pretty difficult to reproduce (= impossible to fix without ability to reproduce). You could try if you can (reliably) reproduce it in some way, e.g.:
I can reproduce them multiple times a day :-). But not on command, and probably not on another machine, I know...
- Create a test folder: doveadm mailbox create -u krakonos testbox
- Use some combination of:
- Save mail(s) to test folder: cat some-mails | doveadm save -u krakonos testbox
- Try to read mails from test folder: doveadm fetch -u krakonos text mailbox testbox > /dev/null
Well, that's something. doveadm-save doesn't have a manpage, and there is nothing about it on wiki. Is it something new? Also, it doesn't seem to work.
The fetch should print similar errors to stderr in some way. I attempted to reproduce this way with your msg-error.mbox, but it worked ok.
Thinking about it, it might be that I'm fetching the message just as dovecot delivers another one.
Is it possible that fcntl locking is just not working? I'm running a bit older kernel, if that could play a role in it. I'll try to enable dotlock even on read and see if the problem persists.
-- S pozdravem Ladislav "Krakonoš" Láska http://www.krakonos.org/
You could try running lsof in hopes of catching it. Might be rather difficult though.
Aki