nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] IMAP/nmh, again

2017-10-26 15:19:04
$ telnets imap-server:imaps
...
. select inbox
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft $Junk $NotJunk Junk NonJunk 
$MDNSent $Forwarded JunkRecorded NotJunk $label2 Redirected $MailFlagBit0 
$MailFlagBit1 $MailFlagBit2)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft $Junk $NotJunk 
Junk NonJunk $MDNSent $Forwarded JunkRecorded NotJunk $label2 Redirected 
$MailFlagBit0 $MailFlagBit1 $MailFlagBit2 \*)] Flags permitted.
* 2375 EXISTS
* 0 RECENT
* OK [UNSEEN 44] First unseen.
* OK [UIDVALIDITY 1207859730] UIDs valid
* OK [UIDNEXT 1350623] Predicted next UID
* OK [HIGHESTMODSEQ 3104735] Highest
. OK [READ-WRITE] Select completed (2.203 + 0.000 + 2.202 secs).

telnets does telnet+ssl.  This is to my local dovecot server,
a 9 year old amd64 machine.  Often it takes much less than a
second but these long latencies are not rare either.

On Thu, 26 Oct 2017 14:22:37 -0400 Ken Hornstein <kenh@pobox.com> wrote:
Ken Hornstein writes:

         That suggests to me that really, a new connection for every
mailbox actually might be fine.

See above.

Now, we'd have to TOTALLY rethink the internal API to make this work;
the key there is you need to figure out which messages you were interested
in before you started talking to the IMAP server, to minimize the number
of network calls.  But I think that's achievable.  And of course there's
the mapping between MH message numbers and IMAP messages, but I think that's
not that hard; obviously you'd use UIDs, and I think making it work is
relatively straightforward

The trickier aspect, and the real issue for me, is proper
synchronization when email is accessed from multiple machines,
and which may not be connected all the time. On reconnection
a client has to upload its changes and resync its local cache
with the imap server so that changes made elsewhere are
properly reflected.

I have been poring through through RFCs for various imap
extensions in order to understand their behavior -- and... it
is not simple.  I'd rather experiment with all this without
touching mh sources.

So my current strategy is to wrap unchanged MH commands or
rewrite the simpler ones which are more the "plumbing" kind,
for example, mhpath and mhparam.

_______________________________________________
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>