On Tue, 4 Nov 2003, Timo Sirainen wrote:
> On Tue, Nov 04, 2003 at 12:46:47PM -0500, Paul Jarc wrote:
> > I'm writing an entirely read-only IMAP server; it's mainly intended
> > for serving mailing list archives.  Just like a web archive, it lets
> > anyone in (PREAUTH greeting),
> Many clients don't understand it and will try to login anyway. I'm not sure
> if some even completely break because of it.. You could also support
> ANONYMOUS SASL and LOGIN anonymous with empty password (actually at least
> one client couldn't send empty password).

I agree with Timo's observation.  Programs based upon the UW IMAP
Toolkit's c-client library will get it right, but most other
implementations do not.  Use PREAUTH only in network environments where it
is expected, and not on port 143.  For port 143, use ANONYMOUS.

> RFC allowed just ignoring flag changes for read-only mailboxes. I wouldn't
> reply with NO or some clients keep complaining about it constantly.

I believe that if a PERMANENTFLAG isn't set for a flag, then a flag change
should change the flag within the session (think of the \Seen flag)  but
otherwise not do anything.

> This is
> how my server works and it seems to work fine with clients:
> 1 store 1 +flags \seen
> * NO Mailbox is read-only, ignoring flag changes
> * 1 FETCH (FLAGS (\Recent))
> 1 OK Store completed.
> 2 store 1 +flags \seen
> * 1 FETCH (FLAGS (\Recent))
> 2 OK Store completed.

Leaving aside the untagged NO (which is fluff IMHO), I think that it
should set \Seen in the session.

> Now that I think of it, I think +flags.silent should also reply with
> untagged FETCH if it doesn't change the flag.

If you don't set session-only flags, then yes this is correct.  But I'd
argue this is another reason for session-only flags.

> > Also, should \Recent be included in the untagged FLAGS response?  The
> > description of the FLAGS response seems to require it (\Recent is a
> > system-defined flag), but none of the examples include it.
> Hmm. None of the implementations send it, but I don't actually see it
> mentioned in RFC...

It is mentioned in RFC 3501.  Check the formal syntax.  There's a reason
for that funny flag-fetch rule and the strange comment in the flag rule
about it not including \Recent.  \Recent only appears in untagged FETCH
responses, never in STORE commands or untagged FLAGS responses.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.

Reply via email to