-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAdminInterface.php
2573 lines (2354 loc) · 87.4 KB
/
AdminInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
/**
* This file is part of the Zimbra API in PHP library.
*
* © Nguyen Van Nguyen <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Zimbra\Admin;
use Zimbra\Admin\Struct\AttachmentIdAttrib as Attachment;
use Zimbra\Admin\Struct\AlwaysOnClusterSelector as ClusterSelector;
use Zimbra\Admin\Struct\CalendarResourceSelector as CalendarResource;
use Zimbra\Admin\Struct\CacheSelector as Cache;
use Zimbra\Admin\Struct\CosSelector as Cos;
use Zimbra\Admin\Struct\DataSourceSpecifier as DataSource;
use Zimbra\Admin\Struct\DeviceId as DeviceId;
use Zimbra\Admin\Struct\DistributionListSelector as DistList;
use Zimbra\Admin\Struct\DomainSelector as Domain;
use Zimbra\Admin\Struct\EffectiveRightsTargetSelector as Target;
use Zimbra\Admin\Struct\ExchangeAuthSpec as Exchange;
use Zimbra\Admin\Struct\ExportAndDeleteMailboxSpec as ExportMailbox;
use Zimbra\Admin\Struct\GranteeSelector as Grantee;
use Zimbra\Admin\Struct\HostName;
use Zimbra\Admin\Struct\IdAndAction;
use Zimbra\Admin\Struct\IdStatus;
use Zimbra\Admin\Struct\LoggerInfo as Logger;
use Zimbra\Admin\Struct\LimitedQuery;
use Zimbra\Admin\Struct\MailboxByAccountIdSelector as MailboxId;
use Zimbra\Admin\Struct\Names;
use Zimbra\Admin\Struct\Policy;
use Zimbra\Admin\Struct\PolicyHolder;
use Zimbra\Admin\Struct\PrincipalSelector as Principal;
use Zimbra\Admin\Struct\ReindexMailboxInfo as ReindexMailbox;
use Zimbra\Admin\Struct\RightModifierInfo as RightModifier;
use Zimbra\Admin\Struct\ServerSelector as Server;
use Zimbra\Admin\Struct\ServerMailQueueQuery as ServerMail;
use Zimbra\Admin\Struct\ServerWithQueueAction as ServerQueue;
use Zimbra\Admin\Struct\SyncGalAccountSpec as SyncGalAccount;
use Zimbra\Admin\Struct\StatsSpec;
use Zimbra\Admin\Struct\TargetWithType;
use Zimbra\Admin\Struct\TimeAttr;
use Zimbra\Admin\Struct\TzFixup;
use Zimbra\Admin\Struct\UcServiceSelector as UcService;
use Zimbra\Admin\Struct\VolumeInfo as Volume;
use Zimbra\Admin\Struct\XmppComponentSelector as XmppComponent;
use Zimbra\Admin\Struct\XmppComponentSpec as Xmpp;
use Zimbra\Admin\Struct\ZimletAclStatusPri as ZimletAcl;
use Zimbra\Struct\AccountNameSelector;
use Zimbra\Struct\AccountSelector as Account;
use Zimbra\Struct\EntrySearchFilterInfo as SearchFilter;
use Zimbra\Struct\GranteeChooser;
use Zimbra\Struct\Id;
use Zimbra\Struct\KeyValuePair;
use Zimbra\Struct\NamedElement;
use Zimbra\Struct\WaitSetSpec;
use Zimbra\Struct\WaitSetId;
use Zimbra\Enum\AutoProvTaskAction as TaskAction;
use Zimbra\Enum\AttrMethod;
use Zimbra\Enum\CountObjectsType as ObjType;
use Zimbra\Enum\CompactIndexAction as IndexAction;
use Zimbra\Enum\CertType;
use Zimbra\Enum\CSRType;
use Zimbra\Enum\CSRKeySize;
use Zimbra\Enum\DedupAction;
use Zimbra\Enum\DeployZimletAction as DeployAction;
use Zimbra\Enum\GalConfigAction as ConfigAction;
use Zimbra\Enum\GalMode;
use Zimbra\Enum\GalSearchType;
use Zimbra\Enum\GetSessionsSortBy;
use Zimbra\Enum\IpType;
use Zimbra\Enum\LockoutOperation;
use Zimbra\Enum\QuotaSortBy;
use Zimbra\Enum\ReIndexAction;
use Zimbra\Enum\RightClass;
use Zimbra\Enum\SessionType;
use Zimbra\Enum\TargetType;
use Zimbra\Enum\VersionCheckAction;
use Zimbra\Enum\VolumeType;
use Zimbra\Enum\ZimletExcludeType as ExcludeType;
/**
* AdminInterface is a interface which allows to connect Zimbra API administration functions via SOAP
*
* @package Zimbra
* @category Admin
* @author Nguyen Van Nguyen - [email protected]
* @copyright Copyright © 2013 by Nguyen Van Nguyen.
*/
interface AdminInterface
{
/**
* Add an alias for the account.
* Access: domain admin sufficient.
* Note: this request is by default proxied to the account's home server.
*
* @param string $id Value of zimbra identify.
* @param string $alias Account alias.
* @return mix
*/
function addAccountAlias($id, $alias);
/**
* Changes logging settings on a per-account basis.
* Adds a custom logger for the given account and log category.
* The logger stays in effect only during the lifetime of the current server instance.
* If the request is sent to a server other than the one that the account resides on,
* it is proxied to the correct server.
* If the category is "all", adds a custom logger for every category or the given user.
*
* @param Logger $logger The Logger infor.
* @param Account $account The account.
* @return mix
*/
function addAccountLogger(Logger $logger, Account $account = null);
/**
* Add an alias for a distribution list.
* Access: domain admin sufficient.
*
* @param string $id Value of zimbra identify.
* @param string $alias Distribution list alias.
* @return mix
*/
function addDistributionListAlias($id, $alias);
/**
* Adding members to a distribution list.
* Access: domain admin sufficient.
*
* @param string $id Value of zimbra identify.
* @param array $dlms Distribution list members.
* @return mix
*/
function addDistributionListMember($id, array $dlms);
/**
* Add a GalSync data source.
* Access: domain admin sufficient.
*
* @param Account $account Account.
* @param string $name Name of the data source.
* @param string $domain Name of pre-existing domain.
* @param string $type GalMode type (both|ldap|zimbra).
* @param string $folder Contact folder name.
* @param array $attrs Attributes.
* @return mix
*/
function addGalSyncDataSource(
Account $account,
$name,
$domain,
GalMode $type,
$folder = null,
array $attrs = []
);
/**
* Create a waitset to listen for changes on one or more accounts.
* Called once to initialize a WaitSet and to set its "default interest types".
* WaitSet: scalable mechanism for listening for changes to one or more accounts.
* Interest types:
* f. folders
* m. messages
* c. contacts
* a. appointments
* t. tasks
* d. documents
* all. all types (equiv to "f,m,c,a,t,d")
*
* @param WaitSetSpec $add The WaitSet add spec.
* @param array $defTypes Default interest types.
* @param bool $allAccounts If all is set, then all mailboxes on the system will be listened to, including any mailboxes which are created on the system while the WaitSet is in existence.
* @return mix
*/
function adminCreateWaitSet(
WaitSetSpec $add = null,
array $defTypes = [],
$allAccounts = null
);
/**
* Use this to close out the waitset.
* Note that the server will automatically time out a wait set
* if there is no reference to it for (default of) 20 minutes.
* WaitSet: scalable mechanism for listening for changes to one or more accounts.
*
* @param string $waitSet Waitset identify.
* @return mix
*/
function adminDestroyWaitSet($waitSet);
/**
* AdminWaitSetRequest optionally modifies the wait set and checks for any notifications.
* If block=1 and there are no notifications, then this API will BLOCK until there is data.
* Interest types:
* f. folders
* m. messages
* c. contacts
* a. appointments
* t. tasks
* d. documents
* all. all types (equiv to "f,m,c,a,t,d")
*
* @param string $waitSet Waitset identify.
* @param string $seq Last known sequence number.
* @param WaitSetSpec $addWaitSets The WaitSet add spec array.
* @param WaitSetSpec $updateWaitSets The WaitSet update spec array.
* @param WaitSetId $removeWaitSets The WaitSet remove spec array.
* @param bool $block Flag whether or not to block until some account has new data.
* @param array $defTypes Default interest types.
* @param int $timeout Timeout length.
* @return mix
*/
function adminWaitSet(
$waitSet,
$seq,
WaitSetSpec $add = null,
WaitSetSpec $update = null,
WaitSetId $remove = null,
$block = null,
array $defTypes = [],
$timeout = null
);
/**
* Authenticate for an adminstration account.
*
* @param string $name Name. Only one of {auth-name} or <account> can be specified
* @param string $password Password - must be present if not using AuthToken
* @param string $authToken An authToken can be passed instead of account/password/name to validate an existing auth token.
* @param Account $account The account
* @param string $virtualHost Virtual host
* @param bool $persistAuthTokenCookie Controls whether the auth token cookie in the response should be persisted when the browser exits.
* @return authentication token
*/
function auth(
$name = null,
$password = null,
$authToken = null,
Account $account = null,
$virtualHost = null,
$persistAuthTokenCookie = null
);
/**
* Authenticate for an adminstration account.
*
* @param string $name Name. Only one of {auth-name} or <account> can be specified
* @param string $password The user password.
* @param string $vhost Virtual-host is used to determine the domain of the account name.
* @return authentication token
*/
function authByName($name, $password, $vhost = null);
/**
* Authenticate for an adminstration account.
*
* @param Account $account The user account.
* @param string $password The user password.
* @param string $vhost Virtual-host is used to determine the domain of the account name.
* @return authentication token
*/
function authByAccount(Account $account, $password, $vhost = null);
/**
* Authenticate for an adminstration account.
*
* @param string $token The authentication token.
* @return authentication token.
*/
function authByToken($token);
/**
* Perform an autocomplete for a name against the Global Address List
* Notes: admin verison of mail equiv. Used for testing via zmprov.
* Type of addresses to auto-complete on:
* 1. "account" for regular user accounts, aliases and distribution lists
* 2. "resource" for calendar resources
* 3. "group" for groups
* 4. "all" for combination of types
*
* @param string $domain The domain name.
* @param string $name The name to test for autocompletion.
* @param SearchType $type Type of addresses to auto-complete on.
* @param string $galAcctId GAL Account ID.
* @param int $limit An integer specifying the maximum number of results to return
* @return mix
*/
function autoCompleteGal(
$domain,
$name,
GalSearchType $type = null,
$galAcctId = null,
$limit = null
);
/**
* Auto-provision an account
*
* @param Domain $domain The domain name.
* @param Principal $principal The name used to identify the principal.
* @param string $password Password.
* @return mix
*/
function autoProvAccount(Domain $domain, Principal $principal, $password = null);
/**
* Auto-provision task control.
* Under normal situations, the EAGER auto provisioning task(thread)
* should be started/stopped automatically by the server when appropriate.
* The task should be running when zimbraAutoProvPollingInterval is not 0
* and zimbraAutoProvScheduledDomains is not empty.
* The task should be stopped otherwise.
* This API is to manually force start/stop or query status of the EAGER auto provisioning task.
* It is only for diagnosis purpose and should not be used under normal situations.
*
* @param TaskAction $action Action to perform - one of start|status|stop
* @return mix
*/
function autoProvTaskControl(TaskAction $action);
/**
* Check Auth Config.
*
* @param string $name Name.
* @param string $password Password.
* @param array $attrs Attributes.
* @return mix
*/
function checkAuthConfig($name, $password, array $attrs = []);
/**
* Checks for items that have no blob, blobs that have no item,
* and items that have an incorrect blob size stored in their metadata.
* If no volumes are specified, all volumes are checked.
* If no mailboxes are specified, all mailboxes are checked.
* Blob sizes are checked by default.
* Set checkSize to 0 (false) to * avoid the CPU overhead
* of uncompressing compressed blobs in order to calculate size.
*
* @param array $volumes Volumes.
* @param array $mboxes Mailboxes.
* @param bool $checkSize Check size.
* @param bool $reportUsedBlobs If set a complete list of all blobs used by the mailbox(es) is returned.
* @return mix
*/
function checkBlobConsistency(
array $volumes = [],
array $mboxes = [],
$checkSize = null,
$reportUsedBlobs = null
);
/**
* Check existence of one or more directories and optionally create them.
*
* @param array $directories Directories.
* @return mix
*/
function checkDirectory(array $directories = []);
/**
* Check Domain MX record.
*
* @param Domain $domain The name used to identify the domain.
* @return mix
*/
function checkDomainMXRecord(Domain $domain);
/**
* Check Exchange Authorisation.
*
* @param Exchange $auth Exchange auth details.
* @return mix
*/
function checkExchangeAuth(Exchange $auth);
/**
* Check Global Addressbook Configuration .
* Notes:
* 1. zimbraGalMode must be set to ldap, even if you eventually want to set it to "both".
* 2. <action> is optional. GAL-action can be autocomplete|search|sync. Default is search.
* 3. <query> is ignored if <action> is "sync".
* 4. AuthMech can be none|simple|kerberos5.
* - Default is simple if both BindDn/BindPassword are provided.
* - Default is none if either BindDn or BindPassword are NOT provided.
* 5. BindDn/BindPassword are required if AuthMech is "simple".
* 6. Kerberos5Principal/Kerberos5Keytab are required only if AuthMech is "kerberos5".
* 7. zimbraGalSyncLdapXXX attributes are for GAL sync. They are ignored if <action> is not sync.
* For GAL sync, if a zimbraGalSyncLdapXXX attribute is not set,
* server will fallback to the corresponding zimbraGalLdapXXX attribute.
*
* @param LimitedQuery $query Description for element text content.
* @param ConfigAction $action Action (autocomplete|search|sync).
* @param array $attrs Attributes.
* @return mix
*/
function checkGalConfig(
LimitedQuery $query = null,
ConfigAction $action = null,
array $attrs = []
);
/**
* Check Health.
*
* @return mix
*/
function checkHealth();
/**
* Check whether a hostname can be resolved.
*
* @param string $hostname Hostname.
* @return mix
*/
function checkHostnameResolve($hostname = '');
/**
* Check password strength.
* Access: domain admin sufficient.
* Note: this request is by default proxied to the account's home server
*
* @param string $id Zimbra identify.
* @param string $password Passowrd to check.
* @return mix
*/
function checkPasswordStrength($id, $password);
/**
* Check if a principal has the specified right on target.
* A successful return means the principal specified by the <grantee>
* is allowed for the specified right on the * target object.
* Note: this request is by default proxied to the account's home server
*
* @param Target $target The target
* @param Grantee $grantee The grantee
* @param string $right Name of right.
* @param array $attrs Attributes.
* @return mix
*/
function checkRight(
Target $target,
Grantee $grantee,
$right,
array $attrs = []
);
/**
* Clear cookie.
*
* @param array $cookies Specifies cookies to clean.
* @return mix
*/
function clearCookie(array $cookies = []);
/**
* Compact index.
* Access: domain admin sufficient.
* Note: this request is by default proxied to the account's home server.
*
* @param MailboxId $mbox Mailbox.
* @param IndexAction $action Action to perform (start|status).
* @return mix
*/
function compactIndex(MailboxId $mbox, IndexAction $action = null);
/**
* Computes the aggregate quota usage for all domains in the system.
* The request handler issues GetAggregateQuotaUsageOnServerRequest
* to all mailbox servers and computes the aggregate quota used by each domain.
* The request handler updates the zimbraAggregateQuotaLastUsage domain attribute
* and sends out warning messages for each domain having quota usage greater than a defined percentage threshold.
*
* @return mix
*/
function computeAggregateQuotaUsage();
/**
* Configure Zimlet.
*
* @param string $content Attachment identify.
* @return mix
*/
function configureZimlet(Attachment $content);
/**
* Copy Class of service (COS).
*
* @param string $name Destination name for COS.
* @param string $cos Source COS.
* @return mix
*/
function copyCos($name = null, Cos $cos = null);
/**
* Count number of accounts by cos in a domain.
* Note: It doesn't include any account with zimbraIsSystemResource=TRUE,
* nor does it include any calendar resources.
*
* @param string $domain The name used to identify the domain.
* @return mix
*/
function countAccount(Domain $domain = null);
/**
* Count number of objects.
* Returns number of objects of requested type.
* Note: For account/alias/dl, if a domain is specified,
* only entries on the specified domain are counted.
* If no domain is specified, entries on all domains are counted.
* For accountOnUCService/cosOnUCService/domainOnUCService,
* UCService is required, and domain cannot be specified.
*
* @param ObjType $type Object type. Valid values: (userAccount|account|alias|dl|domain|cos|server|calresource|accountOnUCService|cosOnUCService|domainOnUCService|internalUserAccount|internalArchivingAccount).
* @param Domain $domain The name used to identify the domain.
* @param UcService $ucservice Key for choosing ucservice.
* @return mix
*/
function countObjects(ObjType $type, Domain $domain = null, UcService $ucservice = null);
/**
* Create account.
* Notes:
* 1. accounts without passwords can't be logged into.
* 2. name must include domain (uid@name), and domain specified in name must exist.
* 3. default value for zimbraAccountStatus is "active".
* Access: domain admin sufficient.
*
* @param string $name New account's name. Must include domain (uid@name), and domain specified in name must exist.
* @param string $password New account's password.
* @param array $attrs Attributes.
* @return mix
*/
function createAccount($name, $password, array $attrs = []);
/**
* Create a AlwaysOnCluster
*
* @param string $name New server name.
* @param array $attrs Attributes.
* @return mix
*/
function createAlwaysOnCluster($name, array $attrs = []);
/**
* Create a calendar resource.
* Notes:
* 1. A calendar resource is a special type of Account. The Create, Delete, Modify, Rename, Get, GetAll, and Search operations are very similar to those of Account.
* 2. Must specify the displayName and zimbraCalResType attributes
* Access: domain admin sufficient.
*
* @param string $name Name or calendar resource. Must include domain (uid@domain), and domain specified after @ must exist.
* @param string $password Password for calendar resource.
* @param array $attrs Attributes.
* @return mix
*/
function createCalendarResource($name = null, $password = null, array $attrs = []);
/**
* Create a Class of Service (COS).
* Notes:
* 1. Extra attrs: description, zimbraNotes.
*
* @param string $name COS name.
* @param array $attrs Attributes.
* @return mix
*/
function createCos($name, array $attrs = []);
/**
* Creates a data source that imports mail items into the specified folder.
* Notes:
* 1. Currently the only type supported is pop3.
* 2. every attribute value is returned except password.
* 3. this request is by default proxied to the account's home server.
*
* @param string $id ID for an existing Account.
* @param DataSource $dataSource Details of data source.
* @return mix
*/
function createDataSource($id, DataSource $dataSource);
/**
* Create a distribution list.
* Notes:
* 1. dynamic - create a dynamic distribution list.
* 2. Extra attrs: description, zimbraNotes.
*
* @param string $name Name for distribution list.
* @param bool $dynamic If 1 (true) then create a dynamic distribution list.
* @param array $attrs Attributes.
* @return mix
*/
function createDistributionList($name, $dynamic = null, array $attrs = []);
/**
* Create a domain.
* Note:
* 1. Extra attrs: description, zimbraNotes.
*
* @param string $name Name of new domain.
* @param array $attrs Attributes.
* @return mix
*/
function createDomain($name, array $attrs = []);
/**
* Create a domain.
* Notes:
* 1. if the referenced account is not found it will be created.
* 2. the identifier used in name attr is used for SyncGal and SearchGal.
* 3. name attribute is for the name of the data source.
* 4. if folder attr is not present it'll default to Contacts folder.
* 5. passed in attrs in <a/> are used to initialize the gal data source.
* 6. server is a required parameter and specifies the mailhost on which this account resides.
*
* @param Account $account The name used to identify the account.
* @param string $name Name of the data source.
* @param string $domain Domain name.
* @param GalMode $type GalMode type. Valid values: (both|ldap|zimbra).
* @param string $server The mailhost on which this account resides.
* @param string $password Password.
* @param string $folder Contact folder name.
* @param array $attrs Attributes.
* @return mix
*/
function createGalSyncAccount(
Account $account,
$name,
$domain,
GalMode $type,
$server,
$password = null,
$folder = null,
array $attrs = []
);
/**
* Create an LDAP entry.
*
* @param string $dn A valid LDAP DN String (RFC 2253) that describes the new DN to create.
* @param array $attrs Attributes.
* @return mix
*/
function createLDAPEntry($dn, array $attrs = []);
/**
* Create a Server.
* Extra attrs: description, zimbraNotes.
*
* @param string $name New server name.
* @param array $attrs Attributes.
* @return mix
*/
function createServer($name, array $attrs = []);
/**
* Create a system retention policy.
* The system retention policy SOAP APIs allow the administrator
* to edit named system retention policies that users can apply to folders and tags.
*
* @param string $cos The name used to identify the COS.
* @param PolicyHolder $keep Keep policy details.
* @param PolicyHolder $purge Purge policy details.
* @return mix
*/
function createSystemRetentionPolicy(Cos $cos = null, PolicyHolder $keep = null, PolicyHolder $purge = null);
/**
* Create a UC service.
*
* @param string $name New ucservice name.
* @param array $attrs Attributes.
* @return mix
*/
function createUCService($name, array $attrs = []);
/**
* Create a volume.
*
* @param Volume $volume Volume information.
* @return mix
*/
function createVolume(Volume $volume);
/**
* Create an XMPP component.
*
* @param Xmpp $xmpp XMPP Component details.
* @return mix
*/
function createXMPPComponent(Xmpp $xmpp);
/**
* Create a Zimlet.
*
* @param string $name Zimlet name.
* @param array $attrs Attributes.
* @return mix
*/
function createZimlet($name, array $attrs = []);
/**
* Dedupe the blobs having the same digest.
*
* @param DedupAction $action Action to perform - one of start|status|stop.
* @param array $volumes Volumes.
* @return mix
*/
function dedupeBlobs(DedupAction $action, array $volumes = []);
/**
* Used to request a new auth token that is valid for the specified account.
* The id of the auth token will be the id of the target account,
* and the requesting admin's id will be stored in the auth token for auditing purposes.
*
* @param Account $account The name used to identify the account.
* @param long $duration Lifetime in seconds of the newly-created authtoken. defaults to 1 hour. Can't be longer then zimbraAuthTokenLifetime.
* @return mix
*/
function delegateAuth(Account $account, $duration = null);
/**
* Deletes the account with the given id.
* Notes:
* 1. If the request is sent to the server on which the mailbox resides,
* the mailbox is deleted as well.
* 1. this request is by default proxied to the account's home server.
*
* @param string $id Zimbra identify.
* @return mix
*/
function deleteAccount($id);
/**
* Delete a alwaysOnCluster .
*
* @param string $id Zimbra ID.
* @return mix
*/
function deleteAlwaysOnCluster($id);
/**
* Deletes the calendar resource with the given id.
* Note: this request is by default proxied to the account's home server .
* Access: domain admin sufficient.
*
* @param string $id Zimbra identify.
* @return mix
*/
function deleteCalendarResource($id);
/**
* Delete a Class of Service (COS).
*
* @param string $id Zimbra identify.
* @return mix
*/
function deleteCos($id);
/**
* Deletes the given data source.
* Note: this request is by default proxied to the account's home server.
*
* @param string $id ID for an existing Account.
* @param Id $dataSource Data source ID.
* @param array $attrs Attributes.
* @return mix
*/
function deleteDataSource($id, Id $dataSource, array $attrs = []);
/**
* Delete a distribution list.
* Access: domain admin sufficient.
*
* @param string $id Zimbra ID for distribution list.
* @return mix
*/
function deleteDistributionList($id);
/**
* Delete a domain.
*
* @param string $id Zimbra ID for domain.
* @return mix
*/
function deleteDomain($id);
/**
* Delete a Global Address List (GAL) Synchronisation account.
* Remove its zimbraGalAccountID from the domain, then deletes the account.
*
* @param Account $account The name used to identify the account.
* @return mix
*/
function deleteGalSyncAccount(Account $account);
/**
* Delete an LDAP entry.
*
* @param string $dn A valid LDAP DN String (RFC 2253) that describes the DN to delete.
* @return mix
*/
function deleteLDAPEntry($dn);
/**
* Delete a mailbox.
* The request includes the account ID (uuid) of the target mailbox on success,
* the response includes the mailbox ID (numeric) of the deleted mailbox
* the <mbox> element is left out of the response if no mailbox existed for that account.
* Note: this request is by default proxied to the account's home server
* Access: domain admin sufficient
*
* @param MailboxId $id Account ID.
* @return mix
*/
function deleteMailbox(MailboxId $id);
/**
* Delete a server.
* Note: this request is by default proxied to the referenced server.
*
* @param string $id Zimbra ID.
* @return mix
*/
function deleteServer($id);
/**
* Delete a system retention policy.
*
* @param Policy $policy Retention policy.
* @param Cos $cos The name used to identify the COS.
* @return mix
*/
function deleteSystemRetentionPolicy(Policy $policy, Cos $cos = null);
/**
* Delete a UC service.
*
* @param string $id Zimbra ID.
* @return mix
*/
function deleteUCService($id);
/**
* Delete a UC service.
*
* @param string $id Volume ID.
* @return mix
*/
function deleteVolume($id);
/**
* Delete an XMPP Component.
*
* @param XmppComponent $xmpp The name used to identify the XMPP component.
* @return mix
*/
function deleteXMPPComponent(XmppComponent $xmpp);
/**
* Delete a Zimlet.
*
* @param NamedElement $zimlet Zimlet name.
* @return mix
*/
function deleteZimlet(NamedElement $zimlet);
/**
* Deploy a Zimlet.
*
* @param DeployAction $action Action - valid values : deployAll|deployLocal|status.
* @param Attachment $aid Attachment ID.
* @param bool $flush Flag whether to flush the cache.
* @param bool $synchronous Synchronous flag.
* @return mix
*/
function deployZimlet(
DeployAction $action,
Attachment $content = null,
$flush = null,
$synchronous = null
);
/**
* Dump sessions.
*
* @param bool $list List Sessions flag.
* @param bool $groupBy Group by account flag.
* @return mix
*/
function dumpSessions($list = null, $groupBy = null);
/**
* Exports the database data for the given items with SELECT INTO OUTFILE
* and deletes the items from the mailbox.
* Exported filenames follow the pattern {prefix}{table_name}.txt.
* The files are written to sqlExportDir.
* When sqlExportDir is not specified, data is not exported.
* Export is only supported for MySQL.
*
* @param Mailbox $mbox Mailbox.
* @param string $exportDir Path for export dir.
* @param string $exportFilenamePrefix Export filename prefix.
* @return mix
*/
function exportAndDeleteItems(ExportMailbox $mbox, $exportDir = null, $exportFilenamePrefix = null);
/**
* Fix Calendar End Times.
*
* @param bool $sync Sync flag.
* @param array $accounts Account names.
* @return mix
*/
function fixCalendarEndTime($sync = null, array $accounts = []);
/**
* Fix Calendar priority.
*
* @param bool $sync Sync flag.
* @param array $account Account names.
* @return mix
*/
function fixCalendarPriority($sync = null, array $accounts = []);
/**
* Fix timezone definitions in appointments and tasks to reflect changes
* in daylight savings time rules in various timezones.
*
* @param array $account Account names.
* @param TzFixup $fixupRules Fixup rules.
* @param bool $sync Sync flag.
* @param int $after Fix appts/tasks that have instances after this time, default = January 1, 2008 00:00:00 in GMT+13:00 timezone.
* @return mix
*/
function fixCalendarTZ(
array $account = [],
TzFixup $tzfixup = null,
$sync = null,
$after = null
);
/**
* FixFlush memory cache for specified LDAP or directory scan type/entries.
* Directory scan caches(source of data is on local disk of the server): skin|locale
* LDAP caches(source of data is LDAP): account|cos|domain|server|zimlet.
*
* For LDAP caches, one or more optional <entry> can be specified.
* If <entry>(s) are specified, only the specified entries will be flushed.
* If no <entry> is given, all enties of the type will be flushed from cache.
* Type can contain a combination of skin, locale and zimlet.
* E.g. type='skin,locale,zimlet' or type='zimletskin'.
*
* @param Cache $cache Cache.
* @return mix
*/
function flushCache(Cache $cache = null);
/**
* Request a certificate signing request (CSR).
*
* @param string $server Server ID
* @param bool $isNew If value is "1" then force to create a new CSR, the previous one will be overwrited
* @param CSRType $type Type of CSR
* @param string $digest Digest. Default value "sha1"
* @param CSRKeySize $keysize Key size
* @param string $c Subject attr C
* @param string $sT Subject attr ST
* @param string $l Subject attr L
* @param string $o Subject attr O
* @param string $oU Subject attr OU
* @param string $cN Subject attr CN
* @param array $subjectAltName Used to add the Subject Alt Name extension in the certificate, so multiple hosts can be supported
* @return mix
*/
function genCSR(
$server,
$isNew,
CSRType $type,
$digest = null,
CSRKeySize $keysize,
$c = null,
$sT = null,
$l = null,
$o = null,
$oU = null,
$cN = null,
array $subjectAltName = []
);
/**
* Get attributes related to an account.
* {request-attrs} - comma-seperated list of attrs to return