[Net-IMAP-Server] way for mailbox to tell it has been selected?

Alex Vandiver alexmv at bestpractical.com
Sat Dec 12 01:40:16 EST 2009


On Fri, 2009-12-11 at 08:46 -0800, Richard Russo wrote:
> I was testing this this morning, and I'm seeing some weird behavior...
> when I do a select, I'm getting back OK [READ-ONLY] Completed.  I'll
> plan to track it down this weekend.

I happened to have a spare tuit this evening, and found it -- it was a
precedence bug.  Should be fixed in 833c1e7.

>   Also, I may send a patch to support the mailbox denying a select, I
> have an account on a server which does this for a specific mailbox
> (that it does not list with \Noselect); this is totally gross however,
> so I want to make sure that telling the client NO on the select would
> be the best way to handle it.

Hm.  That's kinda a, euh, specific need, and one that we don't exactly
want to encourage -- that's what ->is_selectable is _supposed_ to be
for, and it rightly sets \Noselect.  Possible more palatable workarounds
in my mind would be either allowing mailboxes to filter their attributes
in LIST, or storing the current Net::IMAP::Server::Command on the
connection, and then your is_selectable could check
Net::IMAP::Server->connection->current_command and lie appropriately.
 - Alex



More information about the Net-IMAP-Server mailing list