Creating Mailboxes via Script

Joe Dennick joe at dennick.net
Wed Mar 5 07:00:09 EST 2003


We've got Cyrus-Imap 2.1.12 running very well for our company Red Hat
8.0.  We are authenticating against a MySQL database that we use as a
master Security Container for all of our application authentication and
entitlements.  We've already populated the database with all of the user
information required including usernames, passwords, shadow passwords,
email addresses, etc.  Now we need to create Cyrus-Imap mailboxes for
each user (close to 3,000 mailboxes).  I've seen several articles that
talk about scripting CYRADM to read a text file containing usernames,
but I can't get any of the scripting examples to work.  It appears as
though Cyrus-Imap, or specifically CYRADM has changed since the examples
were created.  Is there a way to script or batch create users?  All I
really need to do is create the mailbox and set the ACL so cyrus (admin
account) has admin control over the mailbox.  I can manually create the
mailboxes with the following commands:

     cyradm --user cyrus localhost
     IMAP Password:  *******
     localhost.localdomain> createmailbox user.12345
     localhost.localdomain> setacl user.12345 cyrus all
     localhost.localdomain> quit

Thank you in advance for your assistance.

Joe Dennick
joe at dennick.net





More information about the Info-cyrus mailing list