Re: Reminder: package proposal Net_Cyrus
| From: | Damian Alejandro Fernandez Sosa | Date: | Wed, 30 Apr 2003 05:16:30 +0000 |
| Subject: | Re: Reminder: package proposal Net_Cyrus | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-15738@lists.php.net to get a copy of this message | ||
> > I like to have an admin tool as Net_Cyrus but I propose to use Net_IMAP
> > as a backend to implement it.
>
> As Richard already replied that would add a huge overhead to Net_Cyrus
> that's not necessary as it is intended to only be an administration class
> for Cyrus, not a full featured IMAP protocol replacement.
I don't agree with richard and you.
cyradm uses an imap backend to do Cyrus administration... so why don't
you use the IMAP class to implement Net_Cyrus?
I know IMAPProtocol is a big file (90kb) but there is a lot of methods
(all except 2 ) that Net_Cyrus has that are already implemented in the
IMAP class
both classes share:
getQuota() (getStorageQuota() in IMAP)
setQuota() (setStorageQuota() in IMAP)
getACL()
setACL()
deleteACL()
createMailbox()
renameMailbox()
deleteMailbox()
getFolderList() (getMailboxes() in IMAP)
getUserList() (getMailboxes() called whith mailbox="user.*" in IMAP)
copyMail() (copyMessages() in IMAP but also can copy messages
based in a IMAP search)
so both clases _only_ are diferent in those methods
renameUser()
copyQuota()
( renameUser and copyQuota are created using getQuota, setQuota,
createMailbox, deleteMailbox and copyMail )
So basicaly we are duplicating functionality (IMAP class implements all
your methods except renameUser and copyQuota)
I don't think this is the correct way to do the class.
>
> Patches to add or extend functionality are welcome once the class is in
> PEAR.
I can make a patch to your class by extending IMAP.php to let you see my
point of view if you like/agree.
>
> > Net_IMAP also implements DIGEST-MD5,CRAM-MD5, LOGIN and PLAIN auth
> > methods (and automaticaly chooses the best method) so we can use those
> > methods to add encryption to remote Net_Cyrus connections.
>
> It does this by using Auth_SASL that is used in Net_Cyrus too. So there's no
> gain here.
You need to add a lot of logic to use other method than login or plain
(you just implement login sasl auth method) because other AUTH methods
require a dialog to allow autentication (CRAM-MD5 is a 2-step auth
methos and DIGEST-MD5 is 3-step) and you don't fallback to the login
command if sasl is not configured with login auth (please rename
/usr/lib/sasl/liblogin.so to liblogin.so.old to remove the login method
to sasl and you'll see that Net_Cyrus stops working but IMAP don't)