Greetings

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.

Attempt one: Use perl mod Cyrus::IMAP::Admin. Using
this module I cannot avoid getting the 'enter your password'
prompt. If I do enter the password I can create, delete, etc
without any problems. Obviously this is not a sutable solution
for an automated script to have to manually enter the password
every time. If anyone knows how to use this module without
getting the password prompt my problem would be over.

Attempt two: Using module IMAP::Admin from 
IMAP-Admin-1.4.3 The test gives me the following
error:
IMAP::Admin [ initialize ]: try NO Login failed: authentication failure
Again getting me past this error should allow me
to complete the task.

Attempt three: Use tcl scripts. I have perviously had not
experence using these scripts so this question my be
very stupid. I suspect I may be tring to execute it incorrectly
or I am missing some required files but I continually get
errors regardless of which script I try. This example:

set username [lindex $argv 0]
set password [lindex $argv 1]
set mbx      [lindex $argv 2]
set partition     [lindex $argv 3]
cyradm connect connection localhost
connection authenticate -pwcommand {list $username $password}
set list [connection createmailbox $mbx $partition]
puts $list

will give me this error:
Undefined subroutine &Cyrus::IMAP::Shell::cyradm_usage called at \
/usr/lib/perl5/site_perl/5.6.0/i386-linux/Cyrus/IMAP/Shell.pm line 426.
./getmbx.tcl: connection: command not found
./getmbx.tcl: puts: command not found

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.

Regards

Reply via email to