how to use cyradm in a not-so-interactive way?

Javier Cano Linares javiercano at universia.net
Mon Oct 13 03:23:44 EDT 2003


Hi there!

I am trying to automate some tasks in order to create new mail
accounts... I am using Postfix, Cyrus-IMAP and MySQL.
Maybe there is a quite obvious answer to this question but I have no
idea about Perl...
I would like to find a way to create users in a not-so-interactive way
like introducing directly these commands (for example). To do this I
have to connect to cyradm (e.g.,cyradm --user cyrus --server localhost)
from the terminal and then introduce:

localhost> cm user.test0004
localhost> sam user.test0004 cyrus lrswipcda
localhost> sq user.test0004 20000
localhost> quit

In the man page of cyradm it says it can be used in this other way:
 perl -MCyrus::IMAP::Shell -e 'run("myscript")'
but, honestly, I can not understand how to do this. What should be the
content of "myscript"? how to connect to cyradm in this case? how to
provide the password?

Any help would be very grateful!

Greetings!
Javier Cano





More information about the Info-cyrus mailing list