Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <jas@extundo.com>
Cc: gnus-devel <ding@gnus.org>
Subject: Re: Bad interaction between nnimap + agent + expiry (bug?)
Date: Wed, 14 Dec 2005 15:29:14 +0100	[thread overview]
Message-ID: <iluy82ng3b9.fsf@latte.josefsson.org> (raw)
In-Reply-To: <m2d5k0tx1d.fsf@euterpe.local> (Gregory Novak's message of "Tue, 13 Dec 2005 15:08:46 -0800")

Gregory Novak <novak@ucolick.org> writes:

> I am using Gnus to read e-mail via the nnimap backend.  When I mark an
> email as expirable in my INBOX and then quit the group, it gets filed
> into a folder with the name recd-mail-2005-12 (for example; code
> attached below).

There were no code attached.  How do you expire it into
recd-mail-2005-12?

> This works as I expect it when I'm talking to the IMAP server
> directly (gnus-agent is "plugged").  That is, the expired messages
> end up in the group recd-mail-2005-12 marked 'O'.
>
> However, I would like to be able to read e-mail when not connected to
> the internet, and I've found that reading mail via the agent is more
> pleasant in that there are fewer annoying pauses while Gnus talks to
> the imap server.  Therefore I would like to use the agent.
>
> The problem is that when I:
> 1) 'J j' to "unplug" the agent
> 2) Enter a group, hit 'E' to expire some messages, then quit the group
> 3) 'J j' to "plug" the agent
> 4) 'J Y' to synchronize agent flags with the server
> 5) Enter the group in question and then quit it (so that expiry runs
> its course)
>
> I would like for the expired messages to end up in recd-mail-2005-12
> with the mark 'O'.  What actually happens is that they end up in
> recd-mail-2005-12 marked 'E'.
>
> I would call this a bug but I'm willing to entertain the notion that
> there's some sublime logic to what Gnus is doing.

It seem buggy, yes.

Perhaps (setq imap-log t) will help.  Then you should be able to see
if Gnus is asking the server to remove the "gnus-expire" flag on the
article in question, and whether it later somehow end up adding that
flag again to the article when it has moved to recd-mail-2005-12.

> 3) Is the expiry information stored within Gnus or on the imap server?

It depends.  If the server support client flags, Gnus will store the
expiry flag as a "gnus-expire" flag on the article.  If the server
doesn't support this, you shouldn't see expire marks at all, I think,
or something other weird could happen.  Client-specific flags is also
a poorly implemented area in IMAP, so it is not impossible that you
are experiencing a server bug.

> 4) What is the 'cannonical' way to find out what flags are attached to
> a given message?  (This was a major sticking point when trying to step
> through the various functions... I would like to be able to see
> exactly where the 'expired' flag was set, but couldn't seem to get
> reasonable answers.  That is, gnus-article-mark returned some value
> even if the message number I gave didn't exist, and
> gnus-summary-article-mark only returned non-nil for the message in
> question after the whole expiry process was done and I had quit and
> re-entered the group recd-mail-2005-12).

There are several answers here.

The IMAP server keep the real flags on the message.  A 'UID FETCH 4711
(FLAGS)' query should get you the flags.

Gnus keep a copy of the flags, updated at irregular intervals, in
~/.newsrc.eld (which contain setq's).

Inside a summary buffer, there are several variables that store future
flags, which are not set directly on the server, but will be set if
you quit the group.

Hope this helps...  my time to work on this is limited, so I hope
others will help or you'll be able to debug it yourself.



  reply	other threads:[~2005-12-14 14:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-13 23:08 Gregory Novak
2005-12-14 14:29 ` Simon Josefsson [this message]
2005-12-14 16:04   ` Steven E. Harris
2005-12-14 19:08     ` Simon Josefsson
2005-12-14 19:44       ` Steven E. Harris
2005-12-14 22:11         ` Simon Josefsson

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=iluy82ng3b9.fsf@latte.josefsson.org \
    --to=jas@extundo.com \
    --cc=ding@gnus.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).