I'm having some trouble with this. I am attemping to backup all of our mail from one V10 server to another, just in case the upgrade to v11 goes pear-shaped.
I have created identical users on the new server as are currently on the old server. Then I run this script on the new server:
Code: Select all
#!/usr/bin/perl
use strict;
use warnings;
my @users=`omshowu -m all -i`; # User names
shift @users; # Get rid of 'admin'
shift @users; # Get rid of 'sxqueryadmin'
my @failed_users; # Keep track of who was not synced.
foreach my $punter(@users)
{
chomp $punter; # Remove any trailing newlines.
print "Doing $punter\n";
my $command="/usr/bin/imapsync --host1 172.16.1.101 --user1 mboxadmin:admin_username:$punter --password1 admin_password --host2 localhost --user2 mboxadmin:admin_username:$punter --password2 admin_password --exclude '\"Public Folders\"'";
my @output=`$command`;
my $return_code=$?>>8;
unless($return_code==0)
{
print "Return code $return_code\nOutput follows:\n@output\n";
push (@failed_users,$punter);
}
}
print "The following users could not be synchronised:\n";
print join("\n",@failed_users);
print "\n";
For the most part, it works, except for "public folders". I get the following error:
Code: Select all
To Folder "Public Folders" : Could not select 35 NO cannot SELECT that mailbox
So I presume I have the "exclude" syntax wrong. Can anyone tell me how this should be done?
