Perl module interface

matsu matsu at com56.com
Sat Sep 21 12:14:26 EDT 2002


Hello this is Yuki.

I start to use cyrus-imapd+sasl authorization, and I want to make
new mailbox from perl script.

I tried to write seeing by this.
$ perldoc /usr/lib/perl5/site_perl/5.6.0/i386-linux/Cyrus/IMAP/Admin.pm

I'll put a copy of my perl script.
When execute this scrpt by this,
$ ./make_mailbox.pl test01
This script will exit with no error.

please help me and if there are good reference document, please inform me.


Thanks.


==================================================
#!/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('localhost');

## 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