[Date Prev][Date Next] [Chronological] [Thread] [Top]

expiry =? expunge



After some thoughtful comments from Amos I'm thinking about redoing
some of the expire/delete logic in nnimap.

First, let me describe how it works right now:

* `E' (or auto-expire) set the `gnus-expire' mark on a article
  (this require that the server support client specific marks)
* `B del' set the \Delete mark on a article
  (it does NOT actually remove it)

When you quit a group \Deleted articles are thrown away (tunable with
nnimap-expunge-on-close).

There is no real problem here if you only use nnimap/gnus. OTOH most
other IMAP clients do not work this way. They doesn't throw away
\Deleted articles on default, and also has a way of showing those
\Deleted articles, nnimap/gnus has not. A \Deleted articles can never
be shown again in nnimap/gnus even if it hasn't actually been removed
on the server yet. Again, no problem if you only use nnimap/gnus, a
deleted articles shouldn't of course be shown ever again.

This is the scheme I'm thinking of (well, actually Amos did the
thinking):

* `E' set the \Deleted mark on a article
* `B del' physically remove the article
  (This means unsetting all \Deleted marks, setting it on the one
  article, sending the EXPUNGE command, and then resetting all old
  \Deleted marks)

Now when you quit a group articles with \Deleted marks no longer get
thrown away (of course), this is how other IMAP clients work. The
\Deleted articles (older than X days) are deleted when you run the
expiry process.

What it boils down to is to map the Gnus expiry process into the IMAP
expiry process. I hadn't realized this was possible, hence the client
specific `gnus-expire' flag on the server. Think of expire marks as a
delayed delete mark (which is exactly the semantics of \Deleted in
IMAP).

I think this is a good and necessery step since it makes nnimap a
better IMAP citizen. What do you think?  I'll release 0.98 and start
on this, I think.