RLIST leads to Referral after SELECT

ellie timoney ellie at fastmail.com
Sun Sep 8 19:54:45 EDT 2019


On Mon, Sep 9, 2019, at 4:10 AM, Eduardo Chappa wrote: 
> The use of RLIST is mandated by RFC 2193, which states:
> 
>      A MAILBOX-REFERRALS capable client will issue the RLIST and RLSUB
>      commands in lieu of LIST and LSUB.
> 
> Does anyone see a reason why this server is returning a NO [REFERRAL ...] 
> to a SELECT command after a RLIST command, but not without it?

If "a MAILBOX-REFERRALS capable client will issue RLIST and RLSUB", then it's reasonable to suppose that:

* a client that issues RLIST or RLSUB supports mailbox referrals (and so the server sends a referral)
* a client that issues a regular LIST does not support mailbox referrals (and so the server proxies the remote mailbox instead)

In terms of where this happens in code, looks like it gets set up here (and similarly for Rlsub a bit further down):
https://github.com/cyrusimap/cyrus-imapd/blob/master/imap/imapd.c#L1873

and then cmd_list saves the "supports_referrals" flag out for other commands to examine, if LIST_SEL_REMOTE was requested and configuration permits it, here:
https://github.com/cyrusimap/cyrus-imapd/blob/master/imap/imapd.c#L8112-L8116


More information about the Info-cyrus mailing list