how can I batch add user using cyradm

lkolchin at univ.haifa.ac.il lkolchin at univ.haifa.ac.il
Tue Oct 11 05:26:34 EDT 2005


Hi,
 
Try to use cyr_adduser.pl and cyr_batchadd.sh from here: http://www.mail-archive.com/web-cyradm@web-cyradm.org/msg00496.html
 
I've used these scripts for batch add users to web-cyradm system.
 
Regards,
Leon Kolchinsky

________________________________

From: info-cyrus-bounces at lists.andrew.cmu.edu [mailto:info-cyrus-bounces at lists.andrew.cmu.edu] On Behalf Of he.tao at trilogy.com
Sent: Tuesday, October 11, 2005 9:48 AM
To: info-cyrus at lists.andrew.cmu.edu
Subject: how can I batch add user using cyradm



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." 
} 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.andrew.cmu.edu/mailman/private/info-cyrus/attachments/20051011/d3ebfb2e/attachment.html


More information about the Info-cyrus mailing list