Odd problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have what's probably a very silly problem with a new Cyrus installation.

I am in the process of setting up a new server to take over the duties of an older machine doing same. I have perl scripts which allow me to create/delete and move mailboxes, and I am having problems getting these to work on the new system.

e.g. to delete mailboxes, we use a scripts called deletemailboxes.pl. It's called via :

echo "user.fred" | ./deletemailboxes.pl

The error I get is :
Can't call method "authenticate" on an undefined value at ./deletemailboxes.pl line 7.


The extract from the delete mailboxes script is thus:

#!/usr/local/bin/perl
require("/usr/cyrus/scripts/cred.pl");
use Cyrus::IMAP::Admin;


my $con = Cyrus::IMAP::Admin->new($server,$port);
$con->authenticate(-user => $imapuser, -password => $imappass, -mechanism =>
'login', -service => 'imap')
       || die "Cannot authenticate to server as $\n$!";

while(<>) {
       chomp;
       print("Deleting $_\n");
       if (!$con->setacl($_,$imapuser => "all")) {
               print("$_:".$con->error()."\n");
       } elsif (!$con->delete($_)) {
               print("$_:".$con->error()."\n");
       }
}

cred.pl contains :

#!/usr/local/bin/perl
$server="localhost";
$port="1143";
$imapuser="<cyrususer>";
$imappass="<password>";

I can happily run cyradm with the credentials used for cyrus user and password.

The old OS is Solaris 8, the new one is Solaris 10.
Cyrus version is 2.2.12

Anyone have any idea what's occurring.

Thanks and regards,

Geoff
----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux