"John Stoffel" john@stoffel.org wrote:
"James" == James Cook via dovecot dovecot@dovecot.org writes:
Moving mail files between Maildir mailboxes often confuses doveadm sync: I end up with copies in both the original and new maildir. Exact details and script to reproduce follow.
Are you accessing your Maildir from both a mail client, as well as using IMAP/POP through doveadm? I would say that this is your problem. You should (probably) be only using one method or another.
I can work around this by running doveadm move, but it does not fit well with my workflow, which is based on paths to mail files (using mblaze as my mail client).
Yeah, so mblaze is a bunch of utilities for interacting with Maildir files. So since you're screwing around with them behind dovecot's back, of course you're going to see problems. So don't do that!
Two questions:
- Is there anything I can do to help dovecot notice the moves, other than using doveadm move instead of just mv? I have tried liberal use of force-resync but the problem is still there.
- Is this a bug?
No, you're just using it wrong.
Thanks for your reply, John.
My repro steps don't involve any IMAP, but do combine doveadm sync with manual mail operations. In practice I am using IMAP too.
I note that Dovecot's maildir documentation talks about other MUAs accessing the maildir; see [0]. My understanding (based on that and trying to understand the source in lib-storage/index/maildir) is that Dovecot's maildir backend goes to some effort to accommodate other MUAs.
But maybe I've been too optimistic about how far that support is intended to extend.
I had been hoping all that I'm missing is some way to get dovecot to notice the mail was expunged from a, the same way it would have been logged if I'd used doveadm move. I've been poking around the source trying to understand how moving and expunging work but haven't quite understood it.
[0] https://doc.dovecot.org/2.3/admin_manual/mailbox_formats/maildir/
-- James