> However I am noticing that there is no documentation > on adding all these Cyrus users to the sasldb2. What > is the best way to handle this with more than a few > thousand users. I looked at the man page for > saslpasswd2 and it wasn't clear if it was capable of > taking input from a tab delimited user/password file. > We are using auxprop by the way. If anyone can share > their experience or suggestions with this I would > greatly appreciate it.
Organize your user/pass information as tab delimitered rows: user1 pass1 user2 pass2 Then: #!/usr/bin/zsh USER_FILE=/home/j/joe/users-list.txt APP="imap" DOM="Machine.your.domain.com" cat ${USER_FILE} | while read line; do username=`awk '{print $1}'` password=`awk '{print $2}'` echo "${password}" | saslpasswd2 -c -p -a ${APP} -u ${DOM} "${username}" done Nix.