add user script?

Phil Brutsche phil at optimumdata.com
Fri Oct 4 14:44:04 EDT 2002


Tarjei Huse wrote:
> Hi,
> 
> does anyone have a simple {add|delete}-user script that adds/deletes a user
> to/from cyrus-imapd? I need something to start with. Just a script that adds a
> user mailbox and maybe other default mailboxes.

I have a perl script seems does the job for me.  Note that I use this with 
Cyrus 2.1.x.  I have a separate Tcl script if you happen to use 1.5.x or 1.6.x.

It assumes that perl is /usr/bin/perl, and that "unixhierarchysep: no" is in 
imapd.conf.

Don't forget to change the variables $adminuser, $adminpw, and $server at 
the beginning of the script to reflect your configuration.

Use it like this:
   "cyrus-users.pl list" will list the users in the system
   "cyrus-users.pl add <username>" will add the specified user's INBOX, and
   create a few default mailboxes.

I haven't gotten to the point where I need to delete a user, but it 
shouldn't be too hard to add that.

It can be downloaded from http://www.optimumdata.com/~phil/cyrus-users.pl.

-- 

Phil Brutsche
phil at optimumdata.com





More information about the Info-cyrus mailing list