[imp] IMAP ACLs

Chris Hastie lists at oak-wood.co.uk
Sun Jan 26 23:44:56 PST 2003


Is there anything in Imp, or another Horde module, to enable users to
make changes to their IMAP ACLs?

If not, and no-one out there has something almost ready, I might have a
go at it myself. My initial impression looking at it is that setting an
ACL should be fairly straightforward using imap_setacl(). But there is
no PHP function to list existing ACLs, and as far as I can see no way to
send a string to an IMAP stream opened with imap_open() and read the
response. In writing that I'm kind of hoping someone will jump in and
say "Oh yes there is, just do ..." :)

It seems to me then I'm left with three options:

1  Write something that allows the user to set an ACL, but leaves them
   'blind', so they have to be careful to remember what they set it to.
   Given that this is an ACL we're talking about this is far from
   desirable.

2  Write a connection to the IMAP server from scratch and send a
   fputs($imap, "x GETACL INBOX") to it, then parse the output. Not so
   tricky if it's a vanilla IMAP connection with plain login. A bit
   trickier but there's probably enough libraries around for me to
   manage with CRAM-MD5 etc, but way beyond me when you introduce TSL.
   Basically, there are so many variables that I really don't want to go
   down this route.

3  Store a copy of the ACL in the horde preferences. This, as far as I
   can see, is the approach that Ingo uses to sieve scripts. It has
   problems though. What if the information in the horde preferences
   gets out of sync with the real ACL? In some ways this is almost worst
   than 1) above, since no information is arguably better than wrong
   information.

Any thoughts on which way to go, or suggestions as to other
alternatives, would be gratefully received, lest I spend a lot of time
doing something really stupid :)
-- 
Chris Hastie


More information about the imp mailing list