Script is at bottom, link to soap calls is in the middle-
On .7 request looks like:
<soap:Envelope xmlns:soap="
http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
<context xmlns="urn:zimbra">
<userAgent name="ZimbraWebClient - FF2.0 (Linux)" version="undefined"/>
<sessionId id="6950"/>
<authToken>Long String Here
</authToken>
<format type="
js"/>
</context>
</soap:Header>
<soap:Body>
<ReIndexRequest xmlns="urn:zimbraAdmin" action="status">
<mbox id="STRING HERE"/>
</ReIndexRequest>
</soap:Body>
</soap:Envelope>
Response looks like:
Body: {
ReIndexResponse: {
_jsns: "urn:zimbraAdmin",
status: "started"
}
},
Header: {
context: {
_jsns: "urn:zimbra",
change: {
token: 7699
},
sessionId: [
0: {
_content: "6950",
id: "6950",
type: "admin"
}
]
}
},
_jsns: "urn:zimbraSoap"
----
Cleanly that's:
<ReIndexRequest action="start|status|cancel">
<mbox id="{account-id}" [types={types} | ids={ids}]/>
</ReIndexRequest>
<ReIndexResponse status="started" | "running" | "cancelled">
[<progress numSucceeded="SUCCEEDED" numFailed="FAILED" numRemaining="REMAINING">]
</ReIndexResponse>
-- Progress data is currently ONLY returned by the "status" and "cancelled" calls
-types -ids are optional, however at most ONE may be specified:
{ids] = comma-separated list of IDs to re-index.
{types} = comma-separated list. Legal values are:
conversation|message|contact|appointment|task|note |wiki|document
Access: domain admin sufficient
See soap-admin.txt here: SourceForge.net Repository - [zimbra] Index of /trunk/ZimbraServer/docs
----
Anyways the script:
run usage is ./reindex.pl -u USER -m MAILBOXID -a ACTION [-p PASSWD] [-h HOST] [-t TYPES] [-ids IDS]
UserID is system wide
MailboxID is per server store
To get those:
zmprov ga user@domain.com| grep -i zimbraId
If your on the appropriate mailserver:
zmprov getMailboxInfo user@domain.com
or globally:
/opt/zimbra/bin/mysql -e "use zimbra; select id from mailbox where account_id = 'UserID HERE including the leading 0'"
I believe you leave those quotes as is ("''")
I haven't really dug through your post history to check yet - but if you can quickly fill me in - there a reason your not upgrading?
reindex.pl:
Code:
#!/usr/bin/perl -w
#
# ***** BEGIN LICENSE BLOCK *****
# Zimbra Collaboration Suite Server
# Copyright (C) 2005, 2006 Zimbra, Inc.
#
# The contents of this file are subject to the Yahoo! Public License
# Version 1.0 ("License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://www.zimbra.com/license.
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
# ***** END LICENSE BLOCK *****
#
use Time::HiRes qw ( time );
use strict;
use lib '.';
use LWP::UserAgent;
use Getopt::Long;
use XmlElement;
use XmlDoc;
use Soap;
use ZimbraSoapTest;
my $ACCTNS = "urn:zimbraAdmin";
my $MAILNS = "urn:zimbraAdmin";
# If you're using ActivePerl, you'll need to go and install the Crypt::SSLeay
# module for htps: to work...
#
# ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd
#
# app-specific options
my ($mbox, $action, $types, $ids);
#standard options
my ($user, $pw, $host, $help); #standard
GetOptions("u|user=s" => \$user,
"p|port=s" => \$pw,
"h|host=s" => \$host,
"m|mbox=s" => \$mbox,
"a|action=s" => \$action,
"t|types=s" => \$types,
"ids=s" => \$ids,
"help|?" => \$help);
if (!defined($user)) {
die "USAGE: $0 -u USER -m MAILBOXID -a ACTION [-p PASSWD] [-h HOST] [-t TYPES] [-ids IDS]";
}
my $z = ZimbraSoapTest->new($user, $host, $pw);
$z->doAdminAuth();
my %args = ( 'action' => $action );
my $d = new XmlDoc;
$d = new XmlDoc;
$d->start('ReIndexRequest', $MAILNS, \%args); {
my %mbxArgs = ( 'id' => $mbox );
if (defined $ids) {
$mbxArgs{'ids'} = $ids;
}
if (defined $types) {
$mbxArgs{'types'} = $types;
}
$d->add('mbox', $MAILNS, \%mbxArgs);
} $d->end();
print "\nOUTGOING XML:\n-------------\n";
my $out = $d->to_string("pretty");
$out =~ s/ns0\://g;
print $out."\n";
my $start = time;
my $firstStart = time;
my $response = $z->invokeAdmin($d->root());
print "\nRESPONSE:\n--------------\n";
$out = $response->to_string("pretty");
$out =~ s/ns0\://g;
print $out."\n";