[EMAIL PROTECTED] wrote at 
Thu, 29 Apr 2004 15:25:50 +0200:

>On Thu, 2004-04-29 at 14:59, [EMAIL PROTECTED] wrote:
>> Hello,
>> 
>> I would appreciate some hints, info, etc regarding
>> mailboxes permissions (IMAP). 
>> Is it possible to create mailboxes which cannot be deleted
>> from the database with the DELETE command from a mail client
>> (Eudora, Bat,NS, OE, etc)? Like the INBOX mailbox.
>> 
>> I would like to set up 6 default mailboxes which should be
>> always present / visivble for the users  and if some user
>> tried to delete any of these 6 mailboxes error to be
returned.
>> 
>> The INBOX, as per rfc, cannot be deleted, but the checks for
>> this are hardcoded into the source and are valid only for
>> the INBOX mailbox. 
>> 
>> Should I  add my 6 boxes to the source and recompile or
>> there is another more intelligent approach?
>> 
>> Probably some of the flags in the "mailboxes" table in the
>> database?
>> 
>> Regarding: IMAP mail management /retrieval 
>>            dbmail 1.2.6 - 1.2.7
>
>Indeed, it's hardcoded. I don't think there's anything on
non-deletable
>mailboxes, except for INBOX, in the RFC, so we're not likely to
>implement it.
>
>Ilja
>
>
Thanks for the replies to you and to Leonel Nunez.
As a result of this I made some minor changes into the code
to include permission checks. (for use of IMAP in non secure
environments ;)))
It is really very simple but works for me.

I add a new column "can_be_deleted" to the mailboxes table
and than I add a new function into dbmysql.c db_isdeletable()
which is almost blind copy of db_isselectable.
if can_be_deleted == 0 than you can not delete this mailbox
if can_be_deleted == 1 than you can delete this mailbox.

By default all mailboxes are created with  can_be_deleted =
1 so if you want to set-up a "non-deletable" box you  have t
o do it manually.

this is for version 1.2.6 an mysql.  I do not have
postgresql here to test for it too.

I do not know whether you allow attachements so if you
filter out the attachement you can get the changed files from
http://develop.abichem.com/permissions.tar.gz

Regards.

Mario Ivano

P.S.
Sorry this is a second mail the first was with a wrong TO:
address.




------------------------ Werbung ------------------------
>>  NEU: Ab sofort: AT-Domains superguenstig um EUR 12,00
http://www.emerion.com


---------------------------------------------------------
*** sent through http://www.everymail.net     FREE e-mail 
             

Reply via email to