Lance Hoffmeyer wrote:

>Cyrus 1.5.19 and Admin.pm,v 1.36
>
>Lance
>

cvs release 1.36 of Admin.pm corresponds to both 1.6.0 and 1.6.1 kind of 
(I oopsed here, I made the release file 1.6.1 before I committed the 
changes so 1.6.1 is really 1.37, but the cvsid says 1.36) and no changes 
were made to the rename code section between the two.  If you look at 
the $VERSION variable near the top of the Admin.pm file you'd see which 
one it is.  I need to remember to add the version number to the perldoc 
section as well.

Now I really don't know what to tell you.  I just ran the script on 
cyrus 1.5.2 Admin 1.6.1 and it worked.

. list * *
* LIST () "." Listserv.Info-Cyrus
* LIST () "." Listserv.Info-Cyrus.2002-January


here is the script I used (which is yours, maybe cut and paste change a 
tab that was hosing you).


#! /usr/bin/perl
use strict;
#set parameter for logginn into Cyrus
use IMAP::Admin;
my $mailhost = 'xxxx';
my $username = 'xxxx';
my $password = 'xxxx';

#Get get and convert to Character month
#Then, combine into desired format

my $cmonth;
my $date;
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isday) = localtime(time);
$year +=1900;

if ($mon==1){$cmonth='January'};
if ($mon==2){$cmonth='February'};
if ($mon==3){$cmonth='March'};
if ($mon==4){$cmonth='April'};
if ($mon==5){$cmonth='May'};
if ($mon==6){$cmonth='June'};
if ($mon==7){$cmonth='July'};
if ($mon==8){$cmonth='August'};
if ($mon==9){$cmonth='September'};
if ($mon==10){$cmonth='October'};
if ($mon==11){$cmonth='November'};
if ($mon==12){$cmonth='December'};

my $date=$year.-$cmonth;

my  $imap = IMAP::Admin->new('Server'=>$mailhost,
                             'Login'=>$username,
                             'Password'=>$password);

#Get list of Imap Folders
my  @list = $imap->list("Listserv.*");
my $listt;
foreach $listt (@list){

#Select only current folders
if ($listt =~ m/Listserv\.[a-zA-Z\-]+$/){
print "$listt.$date \n";
my $err = $imap->set_acl($listt,"all","read","anyone","read" );
my $err = $imap->rename($listt, $listt.".".$date);
my $err = $imap->create($listt);
my $err = 
$imap->set_acl($listt,"all","append","anyone","append","cyrus","all" );

}
 }









$imap->close; # close open imap connection


Reply via email to