How can I access imap ACL?
Do I have to write a callback and use driver function, or can I access it using mail_parameters??
The only way to get at IMAP ACL or QUOTA is to include imap4r1.h (after including c-client.h) and then use the following undocumented functions:
long imap_setacl (MAILSTREAM *stream,char *mailbox,char *id,char *rights); long imap_deleteacl (MAILSTREAM *stream,char *mailbox,char *id); long imap_getacl (MAILSTREAM *stream,char *mailbox); long imap_listrights (MAILSTREAM *stream,char *mailbox,char *id); long imap_myrights (MAILSTREAM *stream,char *mailbox); long imap_setquota (MAILSTREAM *stream,char *qroot,STRINGLIST *limits); long imap_getquota (MAILSTREAM *stream,char *qroot); long imap_getquotaroot (MAILSTREAM *stream,char *mailbox);
Some of these functions have callbacks, e.g. there's the getacl_t function set via the SET_ACL mail_parameter() call that will send you an ACLLIST.
You have to look at the imap4r1.c code for each of these functions and see how they work.
Note!! These calls are temporary. Although the mail_parameter() interfaces will probably remain unchanged, these imap_??? calls may be withdrawn in the future and replaced with mail_??? calls. So, if you use these functions, be aware of this. imap_??? functions are usually internal for c-client and not to be called by applications.
These imap_??? functions are an exception, since there is no official interface yet. But keep in mind that this is a temporary exception.
-- Mark --
http://staff.washington.edu/mrc Science does not emerge from voting, party politics, or public debate. Si vis pacem, para bellum.
