Zimbra::Expect - Remote control zmprov and zmmailbox
use Zimbra::Expect::ZmXXX; my $box = Zimbra::Expect::ZmXXXX->new(verbose=>1); my %folder; my $old = 'Saved'; my $new = 'Received'; for my $line (split /\n/, $box->cmd('getAllFolders')){ $line =~ m{^\s*\S+\s+mess\s+\d+\s+\d+\s+(/.+)} && do { $folder{$1} = 1; next; }; } if (not $folder{$to}){ $box->act('renameFolder '.$from.' '.$to); next; }
Interactively use a zimbra cli command. The following methods are provided:
Launch the zimbra command. In debug mode the response from the zm* command will also be displayed.
Will execute a command and return the output from the command
Works exactly like cmd but when the instance has been created with the noaction flag, then the command will NOT be executed.
noaction
Copyright (c) 2017 by OETIKER+PARTNER AG. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Tobias Oetiker <tobi@oetiker.ch>
2017-05-16 to Initial Version
To install Zimbra::Expect, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Zimbra::Expect
CPAN shell
perl -MCPAN -e shell install Zimbra::Expect
For more information on module installation, please visit the detailed CPAN module installation guide.