On 8/9/01 2:34 AM, "Warren Flemmer" <[EMAIL PROTECTED]> wrote:
> Cyrus is working well with postfix using pam (mysql)
> for authentication. I now need to setup automated
> scripts to create mailboxes, set quotas etc. I have tried
> three different approaches each of which ending without
> successes so I now pass it to the group. I should point
> out that cyradm works without problems.
[SNIPPED]
> I would prefer to use one of the first two method with
> perl but will settle for tcl if I have no other choice. If there
> are any other approaches that may work I will give
> them a try. Someway of automating at least the
> mailbox creation is essential.
You can use a tool called expect to automate things like this.
Try this:
[darron@xavier darron]$ autoexpect cyradm localhost
autoexpect started, file is script.exp
Please enter your password:
localhost.localdomain> lm
INBOX INBOX.admin INBOX.logs INBOX.tech
INBOX.Sent INBOX.educ8r INBOX.mwj INBOX.test2
INBOX.Trash INBOX.linux INBOX.sutjav
localhost.localdomain> quit
autoexpect done, file is script.exp
Take a look at script.exp - it's a complete copy of everything you've done
and can be modified to do whatever you want it to do.
I've got an expect script that automatically creates the mailbox, sets
permissions on it properly and sets a quota - it works great for us.
--
Darron
[EMAIL PROTECTED]