Pascal BOYER wrote:
Hi,
I woudl like to know if there is a way to automatiquely create (not handmade) a big /etc/sasldb2 db if I have 500 or 1000 mailbox to create ?
Now, I juste know this handmade way:
"cyradm -u cyrus localhos" and "cm"
/etc/sasldb2 is for storing passwords, used by SASL mechanisms PLAIN:auxprop, DIGEST-MD5 and CRAM-MD5, possibly others (LOGIN, NTLM/fallback)
"cyradm" creates a mailbox on Cyrus IMAP server, regardless of authentication option for the user.
sasldb2 can be loaded via a script, say, you have a file with user/pass combo:
user1 pass1 user2 pass2 ...
then you could do this:
cat pass_file.txt | while read line; do username=`echo $line | awk '{print $1}'` password=`echo $line | awk '{print $2}'` echo $password | saslpasswd2 -p -c $username done
For IMAP folder mass creation, look for usefull Perl scripts.
Nix. --- 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