Sandra,
You might try the package IMAP::Admin, available from CPAN. It's a
generic package tailored for Cyrus (though not from CMU). It's not
interactive like cyradm, but rather a standard package like any other.
I use it in utilities that create and delete accounts and set ACLs and
quotas.
-- Rob
--On Wednesday, August 22, 2001 04:17:36 PM -0400 Sandra Regina
<[EMAIL PROTECTED]> wrote:
> I have been searching the archive messages for a script to create
> mailbox, but I have found it only in TCL.
> Does anyone has the following script in Perl ?
>
> Thanks a lot
>
> Sandra
>
> su first
> cyradm -file adduser.tcl
>
> if {$argc != 1} {
> puts "usage: No user list specifiled."
> exit 1
> }
>
> set infile [lindex $argv 0 ]
> set quota 512
>
> eval cyradm connect cyr_conn host
> eval cyr_conn authenticate -pwcommand {{
> set hostname "myhost"
> set adminid "cyrus"
> set adminpw "the password"
> list $adminid $adminpw
> }
> }
>
> if [catch {open $infile} IN] {
> puts stderr "Can not open file $infile: $IN"
> exit 1
> }
>
> while {[gets $IN mailbox] >= 0} {
> exec /usr/sbin/adduser -batch $mailbox email $mailbox $mailbox
> cyr_conn createmailbox user.$mailbox
> cyr_conn setquota user.$mailbox storage $quota
> cyr_conn createmailbox user.$mailbox.sentmail
> }
> close $IN
>
>
>
_ _ _ _ _ _ _ _ _ _
/\_\_\_\_\ /\_\ /\_\_\_\_\_\
/\/_/_/_/_/ /\/_/ \/_/_/_/_/_/ QUIDQUID LATINE DICTUM SIT,
/\/_/__\/_/ __ /\/_/ /\/_/ PROFUNDUM VIDITUR
/\/_/_/_/_/ /\_\ /\/_/ /\/_/
/\/_/ \/_/ /\/_/_/\/_/ /\/_/ (Whatever is said in Latin
\/_/ \/_/ \/_/_/_/_/ \/_/ appears profound)
Rob Tanner
UNIX and Networks Manager
Linfield College, McMinnville OR
(503) 434-2558 <[EMAIL PROTECTED]>