Quoting Guilhem Moulin (2019-11-14 17:04:37)
> On Thu, 14 Nov 2019 at 14:01:33 +0100, Jonas Smedegaard wrote:
> > interimap --config hb --delete --target=database,local INBOX
> > interimap --config hb
> >
> > ..which seemingly succeeded in throwing away local copy of INBOX
> 
> That confuses me even more, ‘--target=database,local’ is a no-op for 
> 0.4-1 because there is no target with that name.  That should be be 
> ‘--target=database --target=local’ instead (comma-separated targets 
> are allowed since ce35ea5 but that code hasn't been released yet) as 
> written earlier.  However, unlike what I claimed before, deleting 
> INBOX will only succeed for the database target, as RFC 3501 src 6.3.4 
> explicitly forbids this.  Sigh.  (A workaround to delete one's INBOX 
> is to rename it to something else and delete the new name.)

Heh.  What actually happened was that at first I ran

  interimap --config hb --delete --target=database INBOX

but then thought "wait, then I get doubled mails and I _know_ I didn't 
mess with them locally, so wiping local ones ahead is actually _safer_ 
than fumbling with deduplication afterwards" and then ran

  interimap --config hb --delete --target=database,local INBOX

so it sounds like the second run was simply doing nothing, and I just 
forgot that notmuch ignores duplicates (my MUA is "alot").


> > and re-fetching it from remote INBOX,
> 
> I guess only the new remote messages were copied?  Could you confirm
> that INBOX's local (resp. remote) UIDVALIDITY is 1571588814 (resp.
> 1154884797)?

Seems to me both local and remote INBOX UIDVALIDITY is now 1571588814:

jonas@auryn:~$ interimap --config hb --debug INBOX
>>> interimap 0.4
local: S: * PREAUTH [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE 
IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT 
MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS 
LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN 
CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY PREVIEW=FUZZY LITERAL+ 
NOTIFY SPECIAL-USE] Logged in as jonas
local: C: 000000 ENABLE QRESYNC
local: S: * ENABLED QRESYNC
local: S: 000000 OK Enabled (0.001 + 0.000 secs).
jo...@jawa.homebase.dk's password: 
remote: S: * PREAUTH [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE 
IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT 
MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS 
LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN 
CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY LITERAL+ NOTIFY 
SPECIAL-USE] Logged in as jonas
remote: C: 000000 ENABLE QRESYNC
remote: S: * ENABLED QRESYNC
remote: S: 000000 OK Enabled (0.001 + 0.000 secs).
local: C: 000001 LIST "" INBOX RETURN (SUBSCRIBED STATUS (UIDVALIDITY UIDNEXT 
HIGHESTMODSEQ))
local: S: * LIST (\Subscribed) "." INBOX
local: S: * STATUS INBOX (UIDNEXT 300122 UIDVALIDITY 1571588814 HIGHESTMODSEQ 
71854)
local: S: 000001 OK List completed (0.146 + 0.000 + 0.146 secs).
remote: C: 000001 LIST "" INBOX RETURN (SUBSCRIBED STATUS (UIDVALIDITY UIDNEXT 
HIGHESTMODSEQ))
remote: S: * LIST (\Subscribed) "." INBOX
remote: S: * STATUS INBOX (UIDNEXT 290676 UIDVALIDITY 1571588814 HIGHESTMODSEQ 
74869)
remote: S: 000001 OK List completed (0.198 + 0.000 + 0.197 secs).
local: Update last clean state for INBOX: (UIDVALIDITY 1571588814 UIDNEXT 
300122 HIGHESTMODSEQ 71854)
remote: Update last clean state for INBOX: (UIDNEXT 290676 HIGHESTMODSEQ 74869 
UIDVALIDITY 1571588814)
local: Clean state!
remote: Clean state!
local: IMAP traffic (bytes): recv 625 sent 108
remote: IMAP traffic (bytes): recv 611 sent 108
Cleaning up...


> However it's beyond me why the remote UIDVALIDITY appears to have 
> changed again back to its previous value.  Are Dovecot's remote index 
> files stored on another drive, that might not be mounted all the time?

Nope.  Spinning iron.


> > ..because surprisingly to me, attempting to throw away local copy of 
> > _Drafts_ failed:
> >
> > jonas@auryn:~$ interimap --config hb --delete --target=database,local Drafts
> 
> Should work with `--target=database --target=local --delete Drafts`; you
> should see notifications of successful deletion in the DB and on the
> local server.

Ah.

I see now what mislead me: The bash-style syntax in documentation:

  --target={local,remote,database}

It is the only option where you use such unusual compact syntax.

May I suggest that to

  --target=TARGET
    Where TARGET is one of local,remote, or database.
    Option can be repeated to cover multiple targets.

...or maybe that's irrelevant with your soon-to-be-released change?


> > jonas@auryn:~$ ssh mail.homebase.dk doveadm mailbox status "messages 
> > uidnext uidvalidity highestmodseq firstsaved" Drafts
> > Drafts messages=0
> 
> You need to double quote/escape the spaces in the string query,
> otherwise it runs `doveadm mailbox status messages uidnext uidvalidity
> highestmodseq firstsaved Drafts` (‘uidnext’ and beyond interpreted as
> mailbox names).

Ah, right - silly me.  Here it is:

jonas@auryn:~$ ssh mail.homebase.dk 'doveadm mailbox status "messages uidnext 
uidvalidity highestmodseq firstsaved" Drafts'
jo...@mail.homebase.dk's password: 
doveadm(jonas): Error: net_connect_unix() failed: Connection refused
Drafts messages=0 uidnext=962 uidvalidity=1571588832 highestmodseq=4 
firstsaved=18446744073709551615


> Could you please also check that the UIDVALIDITY value is found on the
> second field (prefixed with a ‘V’) of the first line [0] of
> /path/to/Maildir/.Drafts/dovecot-uidlist both locally and remotely?

I guess you mean this:

jonas@auryn:~$ grep -Po "\s+V\K\S+" ~/Maildir/hb/.Drafts/dovecot-uidlist
1571588832
jonas@auryn:~$ ssh mail.homebase.dk 'grep -Po "\s+V\K\S+" 
~/Maildir/.Drafts/dovecot-uidlist'
jo...@mail.homebase.dk's password: 
1571588832


> Would be nice to see the output of `stat -c"%y  %z"` on these files,
> also.

jonas@auryn:~$ stat -c"%y  %z" ~/Maildir/hb/.Drafts/dovecot-uidlist
2019-10-20 18:56:40.128528124 +0200  2019-10-20 18:56:40.152528125 +0200
jonas@auryn:~$ ssh mail.homebase.dk 'stat -c"%y  %z" 
~/Maildir/.Drafts/dovecot-uidlist'
jo...@mail.homebase.dk's password: 
2019-10-21 13:47:24.454650388 +0200  2019-10-21 13:47:24.486649045 +0200



> > Possibly related sidenote: I noticed suspecious interimap summary 
> > notes about bandwidth consumption that seemed flipped around (new 
> > messages transfered from remote to local, but interimap saying that 
> > remote received far more than sending, and local received far less 
> > than sending).  Possible local/remote mixup in interimap code 
> > somewhere? Sidenote only here - if I notice again I will report 
> > separately!
> 
> I hope the test suite would have caught delivery to the wrong server 
> (there are unit tests as well as randomized tests) :-P

No no, I didn't mean there was any data ending in the wrong place, only 
that perhaps some status messages emitted had flipped the notion of what 
is "local" and "remote".


> The stats stuff is just cosmetic so there are no tests though; I 
> understand your confusion, but these numbers come from interimap's 
> perspective: recv (resp. sent) stands for received by (resp. to) 
> interimap from the server, so when remote a message as copied locally 
> the “remote” IMAP client *receives* a large FETCH reply and the 
> “local” one *sends* a large literal in an APPEND command.  That was my 
> thinking at least :-)

Hmm. Confusing indeed.  And emitted by default even when configured to 
silence chatter for both local and remote.  I will consider filing a 
wishlist request for a user-friendly-output=yes config option...


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: signature

Reply via email to