9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Risto Salminen <risto.salminen@gmx.com>
To: 9front@9front.org
Subject: Re: [9front] upas/fs: copy messages between IMAP folders
Date: Mon, 31 May 2021 14:31:10 +0300	[thread overview]
Message-ID: <B7794C7B1B9393B28235ED1F91BC8576@gmx.com> (raw)
In-Reply-To: <0322c68128a95c7e@orthanc.ca>

Hello,

lyndon wrote:
> The IMAP "move" model has always been 'copy + store +flags \deleted'.
> This performs the copy operation internally to the IMAP server, so
> no data need go over the wire.

This is exactly what the patch does.  That
however happens in two parts, explained
below.

lyndon wrote:
> I haven't looked at your patch in
> detail, but if you have devolved this to the case where a "copy"
> between folders on the same server always involves a round trip
> through the MUA, this is a horrible pessimization and the patch
> should NOT be incorporated as is.

And therefore, this is not what the patch does.
With the patch, upas/fs issues a "copy" command
to the IMAP server, to copy the message from
a folder to another folder inside the IMAP
server, for the exact reasons that you
presented.  In my presented design, issuing
the "store +flags \deleted" portion is left to
the responsibility of the MUA, for example
nedmail.

However, I will send a version of the patch,
that is in my opinion more elegant, soon
separately.  That version combines the copy and
delete commands into one move command in the
upas/fs level, which seems better than having
the client deal with deletion separately, as it
simplifies the MUA's duties.

lyndon wrote:
> Doing IMAP "right" isn't always easy, and this is a case where you
> have to do the extra work in order to do the correct optimization.
> You need to reliably figure out if the source and destination paths
> in the "move" correspond to the same server+user.  If they do, use
> the IMAP COPY command, otherwise fall back to the MUA loop.

This reveals a shortcoming of my patch.  It indeed
only enables one to move mails inside an IMAP server,
and not between IMAP servers.  It also does not allow
one to put new messages to an IMAP server.  That is
for simplicity and performance reasons.  However, at
least I only need to move mails inside an IMAP server,
which is why the patch only does that.

Thanks,
rsal

  reply	other threads:[~2021-05-31 11:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28 15:10 risto.salminen
2021-05-28 15:29 ` Stanley Lieber
2021-05-28 16:26   ` risto.salminen
2021-05-29  3:50     ` Stanley Lieber
2021-05-29  9:44       ` risto.salminen
2021-05-29 21:41         ` Lyndon Nerenberg (VE7TFX/VE6BBM)
2021-05-31 11:31           ` Risto Salminen [this message]
2021-05-31 22:34             ` Lyndon Nerenberg (VE7TFX/VE6BBM)
2021-05-28 22:11 ` kjn
2021-05-31 11:41 ` Risto Salminen
2021-06-09 21:41   ` igor
2021-06-10 11:02     ` Risto Salminen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B7794C7B1B9393B28235ED1F91BC8576@gmx.com \
    --to=risto.salminen@gmx.com \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).