Subject: Re: imap-2000 and nsnotify

From: Andrew Daviel <[email-masked]>
Date: Wed, 10 Jan 2001 09:37:12 -0800 (PST)

On Fri, 27 Oct 2000, Bernd Wagener wrote:

> The nsnotifier ask for the password in a endless loop, the imap-notifier
Me, too.

nsnotifier seems to be thrown by the (spurious ??) CAPABILITY
string returned after LOGIN command.

Is this a bug or a feature ? Would it break anything if I commented out 
pcapability on imapd.c line 399 or whereever ?

viz.

nsnotifier on IMAP2000 : 
A1 CAPABILITY 
* CAPABILITY IMAP4 IMAP4REV1
 STARTTLS NAMESPACE IDLE MAILBOX-REFERRALS SCAN SORT
 THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND LOGIN-REFERRALS
 AUTH=LOGIN
A1 OK CAPABILITY completed
A2 LOGIN "user" "passwd"
* CAPABILITY IMAP4 IMAP4REV1 STARTTLS NAMESPACE IDLE MAILBOX-REFERRALS
 SCAN SORT
 THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND
A2 OK LOGIN COMPLETED
A3 LOGOUT

and on v12.264 :
A1 CAPABILITY
* CAPABILITY IMAP4 IMAP4REV1 NAMESPACE IDLE SCAN SORT MAILBOX-REFERRALS
 LOGIN-REFERRALS AUTH=LOGIN THREAD=ORDEREDSUBJECT
A1 OK CAPABILITY completed 
A2 LOGIN "user" "passwd" 
A2 OK LOGIN completed
A3 EXAMINE INBOX
etc.

Andrew Daviel
TRIUMF

---

From: Mark Crispin <[email-masked]>
Date: Wed, 10 Jan 2001 11:36:56 -0800 (PST)

> string returned after LOGIN command.

It's not spurious.  Read the latest IMAP base specification draft, which will
presently replace RFC 2060.  It is valid in RFC 2060, and any client which
does not handle it (at least to ignore it) is non-compliant.

I don't know why nsnotify is confused.  However, a few years ago they told me
that they analyzed the greeting string to determine which server, so they
could do secret proprietary things.

> pcapability on imapd.c line 399 or whereever ?

It is a feature.  This facility eliminates two RTTs per session for clients
which understand it; specifically, two CAPABILITY commands and responses.  It
is a particular win over radio (says a guy who uses IMAP every day via radio).
The effect of removing the facility would be to make new, compliant clients
slower.

Perhaps it would benefit nsnotify, but there is no need for nsnotify.  New
mail is automatically notified on IMAP sessions.  nsnotify is a holdover from
the POP3 world, since POP3 did not announce new mail without making a new
session.

In my opinion, the correct fix is DEL NSNOTIFY.EXE, on the grounds that it is
non-compliant and broken.  System managers should especially take this advice
to heart, since nsnotify is perhaps the biggest cause of high server load.