how can I batch add user using cyradm
Fred Blaise
chapeaurouge at gmail.com
Tue Oct 11 07:54:17 EDT 2005
On 10/11/05, he.tao at trilogy.com <he.tao at trilogy.com> wrote:
>
> my cyradm is perl version,it seems that tcl script doesn't work?
>
> the following code won't run...
> #!/usr/local/bin/cyradm -file
>
> # Batch Cyrus user creation script. Usage: addusers filename
>
> set inputfile [lindex $argv 0] # Name of file containing users
> set quotalimit 15360 # Quota limit in Kbytes
>
> eval cyradm connect cyr_conn venus 143
> puts stdout "Connected to IMAP server. Authenticating..."
>
> if [catch {eval cyr_conn authenticate -pwcommand {{
> set hostname "localhost"
> set adminid "cyrusadm"
> set adminpw "xxxxxxxx"
> list $adminid $adminpw
> }} } result ] {
> puts stderr "$result (cleartext)"
> return -code error $result
> } else {
> puts "Authentication successful."
> }
I wrote an perl/expect script that I use remotely. See attached.
>
> ----
> Cyrus Home Page: http://asg.web.cmu.edu/cyrus
> Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
> List Archives/Info:
> http://asg.web.cmu.edu/cyrus/mailing-list.html
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: auto_mailbox_create.pl
Type: application/octet-stream
Size: 888 bytes
Desc: not available
Url : https://lists.andrew.cmu.edu/mailman/private/info-cyrus/attachments/20051011/6d2d8a7e/auto_mailbox_create.obj
More information about the Info-cyrus
mailing list