Re: IMAP proxy advertising MAILBOX-REFERRALS and confusing Pine

2009-08-14 Thread Duncan Gibb
Andrew Morgan wrote:

DM> On the down-side, our quota scripts using Cyrus::IMAP::Admin have
DM> stopped working as they are not being sent MAILBOX-REFERRALS in the
DM> CAPABILITY string.

AM> I'm using IMAP::Admin here for quota-related activities.  However,
AM> my scripts first determine which backend the mailbox is on.  Then
AM> they connect directly to the backend.  That may be why I'm not
AM> seeing the problem you describe.  I'm using Cyrus 2.3.14 here, with
AM> referrals disabled.  This is what I see when running cyradm on a
AM> frontend:

> cyrus-fe1:/etc# cyradm --user cyrus localhost
> Password:
> localhost> lq user.morgan
> Password:
>   STORAGE 185512/256000 (72.465625%)
> localhost>

AM> It appears that it is following a referral to the backend, because
AM> it prompts me for the password again.

Vanilla 2.3.14 will not proxy quota commands (so yes, you are following
a referral and re-authenticating).

Wes Craig has written a patch to fix this

http://lists.andrew.cmu.edu/pipermail/cyrus-devel/2008-September/000939.html
http://lists.andrew.cmu.edu/pipermail/cyrus-devel/attachments/20080918/e5b2b120/attachment.obj

which AFAIK has not yet gone in upstream.  We use it in our 2.3.14
packages along with a bunch of other Murder-enhancing patches

 https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=3133 


Cheers


Duncan

-- 
Duncan Gibb - Technical Director
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk/ || t: +44 870 608 0063
Debian Cyrus Team - https://alioth.debian.org/projects/pkg-cyrus-imapd/

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: IMAP proxy advertising MAILBOX-REFERRALS and confusing Pine

2009-08-14 Thread Andrew Morgan
On Fri, 14 Aug 2009, David Mayo wrote:

>
> Andrew Morgan wrote:
>
>> On Wed, 12 Aug 2009, David Mayo wrote:
>> 
>>> Does anyone have any suggestions as to how to stop the front-end proxy
>>> server from advertising MAILBOX-REFERRALS and/or for Pine to ignore such
>>> capabilities.
>> 
>> This was originally a patch I obtained from the folks at Portland State 
>> University:
>> 
>> http://oregonstate.edu/~morgan/cyrus/patches/imapd-disable-referrals.patch
>> 
>> It does exactly what you want in cyrus 2.2.
>
> Thanks very much for this! We applied this patch this morning and Pine is now 
> behaving itself.
>
> On the down-side, our quota scripts using Cyrus::IMAP::Admin have stopped 
> working as they are not being sent MAILBOX-REFERRALS in the CAPABILITY 
> string. This means they are ignoring the referral sent to them by the server 
> when they issue a GETQUOTA. Reading RFC 2193 Section 3, paragraph 1 this is 
> understandable:
>
>   IMAP4 servers that support this extension MUST list the keyword
>   MAILBOX-REFERRALS in their CAPABILITY response.  No client action is
>   needed to invoke the MAILBOX-REFERRALS capability in a server.
>
> I feel like we've picked at the thread of a jumper and it's slowly 
> unravelling here!

I'm using IMAP::Admin here for quota-related activities.  However, my 
scripts first determine which backend the mailbox is on.  Then they 
connect directly to the backend.  That may be why I'm not seeing the 
problem you describe.  I'm using Cyrus 2.3.14 here, with referrals 
disabled.  This is what I see when running cyradm on a frontend:

cyrus-fe1:/etc# cyradm --user cyrus localhost
Password:
localhost> lq user.morgan
Password:
  STORAGE 185512/256000 (72.465625%)
localhost>


It appears that it is following a referral to the backend, because it 
prompts me for the password again.

Andy

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: IMAP proxy advertising MAILBOX-REFERRALS and confusing Pine

2009-08-14 Thread David Mayo

Andrew Morgan wrote:

> On Wed, 12 Aug 2009, David Mayo wrote:
> 
>> Does anyone have any suggestions as to how to stop the front-end proxy
>> server from advertising MAILBOX-REFERRALS and/or for Pine to ignore such
>> capabilities.
> 
> This was originally a patch I obtained from the folks at Portland State 
> University:
> 
> http://oregonstate.edu/~morgan/cyrus/patches/imapd-disable-referrals.patch
> 
> It does exactly what you want in cyrus 2.2.

Thanks very much for this! We applied this patch this morning and Pine 
is now behaving itself.

On the down-side, our quota scripts using Cyrus::IMAP::Admin have 
stopped working as they are not being sent MAILBOX-REFERRALS in the 
CAPABILITY string. This means they are ignoring the referral sent to 
them by the server when they issue a GETQUOTA. Reading RFC 2193 Section 
3, paragraph 1 this is understandable:

IMAP4 servers that support this extension MUST list the keyword
MAILBOX-REFERRALS in their CAPABILITY response.  No client action is
needed to invoke the MAILBOX-REFERRALS capability in a server.

I feel like we've picked at the thread of a jumper and it's slowly 
unravelling here!

Regards,


Dave.

David Mayo
Networks/Systems Administrator
University of Bath Computing Services, UK

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: IMAP proxy advertising MAILBOX-REFERRALS and confusing Pine

2009-08-12 Thread Andrew Morgan
On Wed, 12 Aug 2009, David Mayo wrote:

> We undertook the first stage of our IMAP server upgrade yesterday and
> introduced a front-end proxy running Cyrus 2.2 in front of our sole
> back-end server running Cyrus 2.2.
>
> Since the upgrade, when a Pine user sends an email, the email is sent
> fine however when Pine appends the message to the sent-mail mailbox it
> asks the user to reauthenticate. Looking at the telemetry, the proxy
> server is advertising MAILBOX-REFERRALS[1] and Pine is trying to use
> them[2] but isn't able to silently reauthenticate the user.
>
> Looking at the man pages for imapd.conf there is a useful feature
> proxyd_disable_mailbox_referrals however this was introduced in Cyrus 2.3.
>
> Does anyone have any suggestions as to how to stop the front-end proxy
> server from advertising MAILBOX-REFERRALS and/or for Pine to ignore such
> capabilities.

This was originally a patch I obtained from the folks at Portland State 
University:

   http://oregonstate.edu/~morgan/cyrus/patches/imapd-disable-referrals.patch

It does exactly what you want in cyrus 2.2.

Andy

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: IMAP proxy advertising MAILBOX-REFERRALS and confusing Pine

2009-08-12 Thread Wesley Craig
I suspect that backporting that functionality would be pretty easy.   
Have you looked for the commit that added it to 2.3?

:wes

On 12 Aug 2009, at 05:42, David Mayo wrote:
> We undertook the first stage of our IMAP server upgrade yesterday and
> introduced a front-end proxy running Cyrus 2.2 in front of our sole
> back-end server running Cyrus 2.2.
>
> Since the upgrade, when a Pine user sends an email, the email is sent
> fine however when Pine appends the message to the sent-mail mailbox it
> asks the user to reauthenticate. Looking at the telemetry, the proxy
> server is advertising MAILBOX-REFERRALS[1] and Pine is trying to use
> them[2] but isn't able to silently reauthenticate the user.
>
> Looking at the man pages for imapd.conf there is a useful feature
> proxyd_disable_mailbox_referrals however this was introduced in  
> Cyrus 2.3.
>
> Does anyone have any suggestions as to how to stop the front-end proxy
> server from advertising MAILBOX-REFERRALS and/or for Pine to ignore  
> such
> capabilities.

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


IMAP proxy advertising MAILBOX-REFERRALS and confusing Pine

2009-08-12 Thread David Mayo

We undertook the first stage of our IMAP server upgrade yesterday and 
introduced a front-end proxy running Cyrus 2.2 in front of our sole 
back-end server running Cyrus 2.2.

Since the upgrade, when a Pine user sends an email, the email is sent 
fine however when Pine appends the message to the sent-mail mailbox it 
asks the user to reauthenticate. Looking at the telemetry, the proxy 
server is advertising MAILBOX-REFERRALS[1] and Pine is trying to use 
them[2] but isn't able to silently reauthenticate the user.

Looking at the man pages for imapd.conf there is a useful feature 
proxyd_disable_mailbox_referrals however this was introduced in Cyrus 2.3.

Does anyone have any suggestions as to how to stop the front-end proxy 
server from advertising MAILBOX-REFERRALS and/or for Pine to ignore such 
capabilities.

Many thanks,


Dave.

David Mayo
Networks/Systems Administrator
University of Bath Computing Services, UK

[1]
* OK imaphost.bath.ac.uk Cyrus IMAP4 Murder v2.2.13 server ready
1 capability
* CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ MAILBOX-REFERRALS 
NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND 
BINARY SORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE IDLE 
STARTTLS AUTH=GSSAPI SASL-IR
1 OK Completed

[2]
<1249984767<0009 RLIST "" INBOX.sent-mail
 >1249984767>* LIST (\HasNoChildren) "." "INBOX.sent-mail"
0009 OK Completed
<1249984767<000a APPEND INBOX.sent-mail {335}
 >1249984767>000a NO [REFERRAL 
imap://;aut...@imap-backend1.bath.ac.uk/INBOX.sent-m
ail] Remote mailbox.

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html