Re: add user script?

From: Jason Englander (no email)
Date: Fri Oct 04 2002 - 14:16:49 EDT


On Fri, 4 Oct 2002, Tarjei Huse wrote:

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

You could easily simplify/complicate it more, but here's one that
creates, one that deletes, and a little config file for both. They're in
Perl (used with 5.6.1 and 5.8.0), they use the IMAP::Admin module.

To create other default mailboxes, add lines like this to the create
script:

my $subfolder = "Trash";
$err = $imap->create("${mailbox}.${subfolder}");
die "Unable to create ${mailbox}.${subfolder}\n\t$imap->{'Error'}\n" if $err;

One of these days I'll combine all of my little cyrus scripts into one
that uses getopt and subroutines...

-- 
Jason Englander <>
394F 7E02 C105 7268 777A  3F5A 0AC0 C618 0675 80CA













Hosted Email Solutions

Invaluement Anti-Spam DNSBLs



Powered By FreeBSD   Powered By FreeBSD