On Sun, 17 Nov 2019 at 19:35:51 +0100, Jonas Smedegaard wrote:
> Seems you edited above quote: I had a dot between INBOX and olpc - is 
> that the "typo" you are talking about then the command I ran included 
> that dot (as did the email I sent).

Oh sorry for that, my finger must have ripped as I was replying, and
doveadm-force-resync(1) appears not to complain when the mailbox doesn't
exist :-P
 
>> If it still doesn't work with the right name, here is what I would do if
>> I were you:
>> 
>>   1. ~$ cp /path/to/maildir/.INBOX.olpc /path/to/maildir/.INBOX.olpc.back
>>   2. ~$ rm -vf /path/to/maildir/.INBOX.olpc/dovecot.*
>>   3. Run `doveadm -f flow fetch "uid modseq guid flags text" mailbox 
>> INBOX.olpc | grep -iE "(^| )uid=97( |$)"`
>>      again.
>>   4a. If 3. doesn't match anymore, then `interimap --repair INBOX.olpc`
>>       should be able to reconcile the mailboxes (it'll complain about
>>       missed updates because of the reset HIGHESTMODSEQ, but that's
>>       harmless), and subsequent `interimap --repair INBOX.olpc`
>>       shouldn't spew anny warning.
>>   4b. If 3. still matches, then also remove 
>> /path/to/maildir/.INBOX.olpc/dovecot-uid*
>>       However that will invalidate the UID mapping, so interimap
>>       won't be able to reconcile, you'll need to remove the mailbox
>>       from the database and the local server.
> 
> Not sure what you mean by "doesn't match anymore" - if I understand 
> correctly it didn't match before either.

I mean grep(1) has exit status 1.  At the bottom of 
https://bugs.debian.org/944812#57 you wrote

| jonas@auryn:~$ ssh jonas-deb...@xayide.jones.dk 'doveadm -f flow fetch "uid 
modseq guid flags text" mailbox INBOX.olpc' | grep -iE "(^| )uid=97( |$)"
| doveadm(jonas-debian): Error: net_connect_unix() failed: Connection refused
| doveadm(jonas-debian): Error: fetch(guid) failed for box=INBOX.olpc uid=97: 
Message was expunged
| doveadm(jonas-debian): Error: fetch(text) failed for box=INBOX.olpc uid=97: 
Message was expunged
| uid=97 modseq=1 guid= flags=11662 text=2

Which seems to be the source of the problem (the mail is gone and
doesn't show up when queried specifically, but *does* show up when its
UID is included in a larger range).
 
> I tried now to remove all dovecot.index* files for that Maildir, and (as 
> earlier) the command greps nothing.

Sounds good to me, and hopefully UID 97 no longer show up in
mailbox-wise UID FETCH commands:

    b UID FETCH 1:* (MODSEQ FLAGS INTERNALDATE BODY.PEEK[])

If that's indeed the case then the problem seems gone to me.
 
>> Beside that I'm not sure which Dovecot magic could help.  Perhaps double
>> check that all files in that directory look alright?
>> 
>>   find /path/to/maildir/.INBOX.olpc/{cur,new,tmp} -mindepth 1 \
>>           \! -type f -o \! -name "*.M*,S=*"
> 
> That find command finds almost every all mails in that Maildir:

Ah fair enough, I'm not so familiar with the Maildir format, seems like
file names are more diverse than I thought.  At least this one shouldn't
list anything:

    find /path/to/maildir/.INBOX.olpc/{cur,new,tmp} -mindepth 1 \! -type f

(I have no idea how Dovecot deals with mails that aren't regular files,
broken symlinks, etc.)

-- 
Guilhem.

Attachment: signature.asc
Description: PGP signature

Reply via email to