I used the word sparse, but sucks works as well. Anyway, who da man? You da
man! Thanks for the info.

Regards, Dustin

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 20, 2001 6:25 PM
> To: Dustin Puryear
> Cc: [EMAIL PROTECTED]
> Subject: Re: Cyrus::IMAP and authentication
>
>
> Dustin Puryear wrote:
> >
> > The documentation on Cyrus::IMAP, at least for perldoc, is a
> bit sparse. How
> > do I explicitly define the user and password to use for
> authentication via:
> >
> > $client->authenticate()
> >
>
>  The doc for Cyrus::IMAP sucks! I had to spend 2 days reading the
> module to
> figure it out. It's good to have the source :)
>
> #!/usr/bin/perl -w
> use strict;
> use Cyrus::IMAP::Admin;
> my $mailhost = 'localhost';
> my $username = 'mailadmin';
> my $password = '';
>
> my $cnx = Cyrus::IMAP::Admin->new($mailhost);
> $cnx->authenticate(-user => $username, -password => $password,
> -mechanism =>
> 'login')
>       || die "Cannot authenticate to server as $mailhost_username\n$!";
>
> # Now we have a connection stored in $cnx
>
> # Let's retrieve the mailboxes for a particular user
> my @mailboxes = $cnx->list("user.$username");
>
>
>       Haim
>
> http://dudle.linuxroot.org
>

Reply via email to