Perl module interface
matsu
matsu at com56.com
Sat Sep 21 14:33:06 EDT 2002
Thank you for your advise.
Jim Levie <jim at entrophy-free.net> wrote @2002/09/22 3:11:18 title Re: Perl module interface :
> I suspect that you aren't sucessfully connecting to the Cyrus Admin
> function. A slightly modified version of your script follows. Replace
> 'cyrus' & 'cyruspw' with a Cyrus Admin username/password.
I tried by this way, but I got this error.
------------------------------------------------
$ ./make_mailbox.pl foo001
Usage: Cyrus::IMAP::new(class, host = "localhost", port = 0, flags = 0) at /usr/
lib/perl5/site_perl/5.6.0/i386-linux/Cyrus/IMAP/Admin.pm line 62.
$
------------------------------------------------
------------------------------------------------
> > ==================================================
> > #!/usr/bin/perl
> >
> > #----------------------------
> > # module
> > #----------------------------
> > use strict;
> > use Cyrus::IMAP::Admin;
> >
> > # error print
> > unless($ARGV[0]){ &usage(); }
> >
> > # $ARGV[0] is account name
> > my $user_name = $ARGV[0];
> >
> > #----------------------------
> > # program
> > #----------------------------
> > my ($client, $rc);
> > $client = Cyrus::IMAP::Admin->new('Server'=>'localhost', 'Login'=>'cyrus',
> 'Password'=>'cyruspw');
> >
> > ## create mailbox
> > my $full_mailbox_name = 'user.'.$user_name;
> > $client->create($full_mailbox_name);
> >
> >
> > __END__
> >
> > ==================================================
> >
---------------------------------
Yuki Matsukura <matsu at com56.com>
http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0xC2E9FE2A
---------------------------------
More information about the Info-cyrus
mailing list