Discussion:
should we be able to edit imap messages?
Eric Abrahamsen
2014-05-03 06:38:20 UTC
Permalink
I'm using dovecot to create a local offline imap setup. I've heard that
imap messages are supposed to be "immutable", but I'm not really sure
what that means in this case.

I'm fooling around with editing messages to add custom headers, only for
local use. I can edit my messages and add the headers, and save the
message again, but I'm not sure what happens when I sync dovecot with
the remote servers. Will this create a new message with a new
Message-ID? If so, I won't bother doing it. But I'm not quite sure how
"immutable" is supposed to play out in this case...

Thanks,
Eric
Steinar Bang
2014-05-03 09:55:16 UTC
Permalink
Post by Eric Abrahamsen
I'm using dovecot to create a local offline imap setup. I've heard
that imap messages are supposed to be "immutable", but I'm not really
sure what that means in this case.
I'm not sure either, but AFAIK IMAP doesn't allow articles to be
updated, so the only way to edit an article is to save a new article and
delete the old one.
Eric Abrahamsen
2014-05-04 02:24:03 UTC
Permalink
Post by Steinar Bang
Post by Eric Abrahamsen
I'm using dovecot to create a local offline imap setup. I've heard
that imap messages are supposed to be "immutable", but I'm not really
sure what that means in this case.
I'm not sure either, but AFAIK IMAP doesn't allow articles to be
updated, so the only way to edit an article is to save a new article and
delete the old one.
Thanks! That was the impression I was getting. I'll just leave this
alone then.
Steinar Bang
2014-05-04 07:35:47 UTC
Permalink
Post by Eric Abrahamsen
Thanks! That was the impression I was getting. I'll just leave this
alone then.
Yes, but I think article editing actually works in nnimap. At least it
has worked at some point in time, because I have done it to re-thread
articles.

However the way it works, is by creating a new article when saving, and
then deleting the old article.
Eric Abrahamsen
2014-05-04 08:32:10 UTC
Permalink
Post by Steinar Bang
Post by Eric Abrahamsen
Thanks! That was the impression I was getting. I'll just leave this
alone then.
Yes, but I think article editing actually works in nnimap. At least it
has worked at some point in time, because I have done it to re-thread
articles.
However the way it works, is by creating a new article when saving, and
then deleting the old article.
Yeah, but then when you sync the server thinks it has a new message, and
if you're using other clients elsewhere, they all get the "new" message,
and... it just ends up feeling wrong, I think
Dan Christensen
2014-05-05 23:29:33 UTC
Permalink
Post by Eric Abrahamsen
Yeah, but then when you sync the server thinks it has a new message, and
if you're using other clients elsewhere, they all get the "new" message,
and... it just ends up feeling wrong, I think
The new message has all of the appropriate flags, so this has never
been a problem for me.

But the summary buffer usually doesn't update correctly for me, so I
need to exit and reenter the group.

Dan
Ted Zlatanov
2014-09-24 21:26:43 UTC
Permalink
Post by Steinar Bang
Post by Eric Abrahamsen
Thanks! That was the impression I was getting. I'll just leave this
alone then.
Yes, but I think article editing actually works in nnimap. At least it
has worked at some point in time, because I have done it to re-thread
articles.
However the way it works, is by creating a new article when saving, and
then deleting the old article.
EA> Yeah, but then when you sync the server thinks it has a new message, and
EA> if you're using other clients elsewhere, they all get the "new" message,
EA> and... it just ends up feeling wrong, I think

Well, you can't edit IMAP messages by design, it would break the whole
protocol :) But I think appending the modified version is really quite
reasonable, it's a rare thing.

Ted

Loading...