Hi,
Bingo! Just found the error... Just to keep a documentation on the mailing list: cyradm fails when trying to open "/dev/tty" (my /dev/tty had permission 622). Changing it to 666 solves the problem. The code that fails is below: if (!defined($opts{-password})) { my $tty = (IO::File->new('/dev/tty', O_RDWR) || *STDERR || *STDIN || *STDOUT); $tty->autoflush(1); $tty->print("IMAP Password: "); my $ostty; chomp($ostty = `stty -g`); system "stty -echo -icanon min 1 time 0 2>/dev/null || stty -echo cbreak"; chomp($opts{-password} = $tty->getline); $tty->print("\013\010"); system "stty $ostty"; } BTW, thanks for the script you sent me.. it helped understanding how the perl IMAP module works! --- "Abu @ Trabas Dot Com" <[EMAIL PROTECTED]> wrote: > I have no idea. but maybe you want > try my small script, (modify please) have you seen > maillog/messages log. > i use cyrus 2.0.16 too, but have no problem like > you. > download IMAP::Admin first from search.cpan.org > > ~abu~ > > Marcelo Romaniuc([EMAIL PROTECTED])@Mon, Nov 05, > 2001 at 11:43:53PM -0800: > > I got the same error when adding "-u cyrus -auth > > login"... > > > > BTW, "imtest" authenticates without problems: > > > > su-2.05$ imtest -u cyrus -m login localhost > > C: C01 CAPABILITY > > S: * OK smith Cyrus IMAP4 v2.0.16 server ready > > S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ > > NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT > > MULTIAPPEND SORT THREAD=ORDEREDSUBJECT > > THREAD=REFERENCES IDLE > > S: C01 OK Completed > > Password: > > C: L01 LOGIN cyrus {8} > > + go ahead > > C: <omitted> > > L01 OK User logged in > > Authenticated. > > Security strength factor: 0 > > > > I'm using sasldb for authentication. > > > > Any ideas ? > > > -- > __ > (oo) Open Solution Provider visit > http://www.trabas.com > / \/ \ GnuPg public information pub > 1024/EBD26280 > `V__V' A9A9 8F57 9E9D 14E3 05B4 3EDB C241 A313 > EBD2 6280 > Fortune: You will be attacked next Wednesday at 3:15 > p.m. by six samurai > sword wielding purple fish glued to Harley-Davidson > motorcycles. > > #!/usr/bin/perl -w > use strict; > use IMAP::Admin; > > if(@ARGV < 1) { > print "usage : user [partition]\n"; > exit; > } > > my $user = shift; > my $partition = shift || undef; > > my $imap = IMAP::Admin->new('Server' => 'localhost', > 'Login' => 'cyrus', > 'Password' => 'c1ru5m4m', > ); > > my $err; > > $err= $imap->create("user.$user", $partition) if > defined $partition; > $err= $imap->create("user.$user") unless defined > $partition; > > > if ($err != 0) { > print "$imap->{'Error'}\n"; > } else { > print "user $user created\n"; > } > > ATTACHMENT part 2 application/pgp-signature __________________________________________________ Do You Yahoo!? Find a job, post your resume. http://careers.yahoo.com