Emiliano schrieb am Thu, Nov 22, 2001 at 10:22:25PM +0100: * Birger Toedtmann wrote: * * > * I didn't know about Cyrus::IMAP::Admin. I'll look into it, but how would * > * it gain access to the server without logging in? Or does it login (using * > * IMAP?) with the admin account? * > * > Yes, it does exactly the latter one. Don't you use "cyradm"? It is just * > a perl script utilising Cyrus::IMAP::Admin which comes with all cyrus distri- * > butions. * * Not on Debian, appearantly. It's a compiled executable here.
Uh? Are you really sure? Which version of cyrus do you use? Cyrus' installation are not platform dependant and I have only seen the skript versions so far.. Anyway, here is a (very tiny) example how to do some stuff on the server. It simply adds all users supplied by STDIN: #!/usr/bin/perl use Cyrus::IMAP::Admin; my $client = Cyrus::IMAP::Admin->new('localhost'); $client->authenticate("-mechanism", "login", "-user", "admin", "-password", "adminpw"); while (<>) { chop; $client->create("user.$_"); } Regards, - Birger