I tried to write my personal script to make batch command in
creating/listing/deleting user & mailboxes.
I tried to do it in similar manner than Shell.pm perl module, but the
function "_authenticate" called in IMAP.pm module does segmentation fault
after taken the authentication by the demon imapd.
My script is this:

#-------------------------------
#!/usr/bin/perl
use strict;
use Cyrus::IMAP::Admin;

my $user = "root";
my $mech = "cram-md5";

my $cyryo = Cyrus::IMAP::Admin->new("MyServer", 143) or die "cyryo: cannot
connect to server\n";

$cyryo->addcallback({-trigger => 'EOF',   -callback => \&_cb_eof,  -rock =>
\$cyryo});

$cyryo->authenticate(-user => $user, -mechanism => $mech) or die "cyryo:
cannot authenticate with $mech as $user\n";

exit;

#-------------------------------

My program never exit cause the segmentation fault during the execution of
method $cyryo->authenticate.
For the precision it terminates in the subcall (module :Cyrus::IMAP)

$rc = $self->_authenticate($opts{-mechanism}, $opts{-service},
                               $opts{-user}, $opts{-minssf},
$opts{-maxssf});
in which all the parameters are OK.
It's important to say that imapd process authenticate correctly the
connection open with this script.

  Best regards
    Stefano
--------------------------------------- 
   __O   Stefano Coatti - MAP 
 _-\<,_   Inferentia S.p.A. 
(_)/ (_) Tel. 02.59928.258

Reply via email to