Re: Mail::Transport::IMAP4 bug
Raul Dias <[email protected]> Wed, 25 May 2005 15:09:36 -0300
| Newsgroups | gmane.comp.lang.perl.modules.mail-box |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 2005-05-25 at 10:59 +0200, Mark Overmeer wrote: > * Raul Dias ([email protected]) [050525 06:41]: > > The solution is to place the first authentication() call after > > the imapClient has being saved. > > Well, that would require everyone to create the IMAPClient object > explicitly, which I do not want. > No, thats the one thing I am not doing. Creating the IMAPClient object explicitly. Moving this the way I did is what allowed me to have Mail::Box create the IMAPClient automatically. > The solution is simply to delay the reduction in list of authentication > methods to the moment the connection is established/being build. > yep. > I have changed the implementation of sub authenticate() to do a > better job. This will come to you in a separate mail. Can you > try it? > sure. I report to you as soon as I tried it. > > BTW, I spoted a bug in Mail::IMAPClient when doing a CRAM-MD5 > > authentication against a Cyrus-Imapd server without authentication > > mechanism (other than PLAIN). In this case Mail::IMAPClient will hang > > forever. > > I have quite bad experiences in my attempts getting bugs in IMAPClient > fixed. Hope you get better results. Or maybe someone can take over > its maintenance... I have quite a long list of improvements... > The code hasn't been updated in 18 months. > can you post this fixes? Also I think that a patchs dir in the Mail-Box package with all patchs is a good way to distribute the imprvements to Mail::Box users. > > I have mailed the Mail::IMAPClient author, but I suggest that when > > authenticate is 'AUTO' it should try plain 'PLAIN' before 'CRAM-MD5'. > > No, that is not a good solution: connection attempts should go from > most-secure to insecure. Right. A note about the IMAPClient bugs (like CRAM-MD5 hanging would be a good adition to the docs). > > The last thing I noticed is when authenticating with wrong credentials, > > Mail::Transport::IMAP4 will loop forever in login, because 'retries' by > > default is -1 which means forever. > > That is because Mail::Box is a library, not an end-user application. > If you write a mail-client for users, you wish an interaction with the > user on every attempt. However, as an automated mail application, you > do not want the application to fail when the server is temporary > unavailable or misconfigured. > The (expected) performance (for some of the folder types) of MailBox > (being mainly written in Perl) is probably not really sufficient for > interactive applications. [Although I have heard other statements, I have > no experience with that] Therefore, the defaults are usually tuned towards > optimal behaviour for automatic clients. In this case: try until you die. This would be another good adition to the docs :) Raul Dias