-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
3064 lines (2963 loc) · 96.1 KB
/
Copy pathindex.d.ts
File metadata and controls
3064 lines (2963 loc) · 96.1 KB
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
/**
* Type definitions for node-mdaemon-api 26.0.3-alpha.45
* Project: Unofficial Node.js binding for MDaemon APIs
* Definitions by: MTKA https://mtka.eu/
*
* @module node-mdaemon-api
*/
declare module "node-mdaemon-api" {
//#region module types
export interface VersionInfo {
build: number;
full?: string;
major: number;
minor: number;
release: number;
tag?: string;
}
export interface ModuleInfo {
fileName: string;
isPrerelease: boolean;
isFreeVersion: boolean;
name: string;
version: VersionInfo;
}
export interface MdApiResultBase {
ErrorCode?: number;
ErrorMessage?: string;
Succeeded: boolean;
}
export interface MdApiResult<TData> extends MdApiResultBase {
Data?: TData;
}
export type MdCalResultSimple = MdApiResultBase;
export type MdCalResult<T> = MdApiResult<T>;
export interface MdDocumentInfo {
description: string;
id: number;
fileName: string;
fileSize: number;
modifiedBy: string;
modifiedTime: string;
path: string;
}
export interface MdInfo {
is64bit: boolean;
isBetaVersion: boolean;
isCloudVersion: boolean;
isDebugVersion: boolean;
isLicenseActive: boolean;
isPresent: boolean;
isProVersion: boolean;
isTrialVersion: boolean;
userCount: number;
version: VersionInfo;
}
export interface UserListItem {
Email: string;
FullName: string;
}
export interface GroupListItem {
Description: string;
GroupName: string;
}
/**
* @see {@link https://help.mdaemon.com/mdaemon/en/semaphore_files.html} for further information.
*/
export interface MdSemaphores {
/** Display alert pop-up to WC users */
alert(message: string): boolean;
/** Clear the cached quota value for a user. Use '*' for all. */
clearQuotaCounts(address?: string): boolean;
/** Create WATCHDOG.SEM */
createWatchdog(): boolean;
/** Delete a user */
delUser(address: string): boolean;
/** Create UPDATEAV.SEM */
initiateAntivirusDefinitionUpdate(): boolean;
/** Create PROCBAD.SEM */
initiateBadQueueDelivery(): boolean;
/** Create PROCHOLDING.SEM */
initiateHoldingQueueProcessing(): boolean;
/** Create PROCDIG.SEM */
initiateListDigests(): boolean;
/** Create PROCNOW.SEM */
initiateRemoteMailCheckAndDelivery(): boolean;
/** Create PROCREM.SEM */
initiateRemoteQueueProcessing(): boolean;
/** Create PROCRETR.SEM */
initiateRetryQueueProcessing(): boolean;
/** Create UPDATESA.SEM */
initiateSpamFilterUpdate(): boolean;
/** Create LOCKSEMS.SEM */
lockProcessing(): boolean;
/** Create TRAY.SEM */
redrawTrayIcon(): boolean;
/** Create GROUPS.SEM */
reloadAccountGroupsConfig(): boolean;
/** Create ACTIVESYNCUSERS.SEM */
reloadActiveSyncUsersConfig(): boolean;
/** Create ALIAS.SEM */
reloadAliasConfig(): boolean;
/** Create RELOADCACHE.SEM */
reloadAllCachedConfig(): boolean;
/** Create ARCHIVE.SEM */
reloadArchivingWhiteListConfig(): boolean;
/** Create ATTACHMENTLINKING.SEM */
reloadAttachmentLinkingConfig(): boolean;
/** Create PRUNE.SEM */
reloadAutoPruningConfig(): boolean;
/** Create AUTORESPATTACHMENTS.SEM */
reloadAutoresponderApprovedAttachmentsConfig(): boolean;
/** Create AUTORESPEXCEPT.SEM */
reloadAutoresponderExceptionConfig(): boolean;
/** Create BADPASSWORD.SEM */
reloadBadPasswordConfig(): boolean;
/** Create BATV.SEM */
reloadBatvConfig(): boolean;
/** Create SUPPRESS.SEM */
reloadBlackListConfigAndClearCachedDomainConfig(): boolean;
/** Create CATLIST.SEM */
reloadCatalogsConfig(): boolean;
/** Create COLORS.SEM */
reloadColorizedLogsConfig(): boolean;
/** Create CFILTER.SEM */
reloadContentFilterConfig(): boolean;
/** Create CREDSMATCHWHITELIST.SEM */
reloadCredentialsMatchWhiteList(): boolean;
/** Create NODNSBL.SEM */
reloadDNSBLWhiteListConfig(): boolean;
/** Create DMARCCACHE.SEM */
reloadDmarcCache(): boolean;
/** Create DMARC.SEM */
reloadDmarcConfig(): boolean;
/** Create DMARCWHITELIST.SEM */
reloadDmarcWhiteList(): boolean;
/** Create DNS.SEM */
reloadDnsConfig(): boolean;
/** Create DOMAINSHARING.SEM */
reloadDomainSharingConfig(): boolean;
/** Create DOMAINS.SEM */
reloadDomainsConfig(): boolean;
/** Create GATEWAYS.SEM */
reloadGatewaysConfig(): boolean;
/** Create GREYLIST.SEM */
reloadGreylistingConfig(): boolean;
/** Create TRANSLAT.SEM */
reloadHeaderTranslationConfig(): boolean;
/** Create HOSTSCREEN.SEM */
reloadHostScreenConfig(): boolean;
/** Create IPSCREEN.SEM */
reloadIPScreenConfig(): boolean;
/** Create IPSHIELD.SEM */
reloadIPShieldConfig(): boolean;
/** Create INACTIVEEXCLUDE.SEM */
reloadInactiveAccountExceptionConfig(): boolean;
/** Create LANDOMAINS.SEM */
reloadLanDomainsConfig(): boolean;
/** Create LANIPS.SEM */
reloadLanIPsConfig(): boolean;
/** Create LDAPCACHE.SEM */
reloadLdapAndGatewayUserConfig(): boolean;
/** Create LOGSETTINGS.SEM */
reloadLoggingConfig(): boolean;
/** Create GRPLIST.SEM */
reloadMailingListsConfig(): boolean;
/** Create MXCACHE.SEM */
reloadMxCache(): boolean;
/** Create NOPRIORITY.SEM */
reloadNoPriorityConfig(): boolean;
/** Create PRIORITY.SEM */
reloadPriorityMailConfig(): boolean;
/** Create PUBLICSUFFIX.SEM */
reloadPublicSuffixConfig(): boolean;
/** Create REVERSEEXCEPT.SEM */
reloadReverseLookupsExceptionConfig(): boolean;
/** Create SCHEDULE.SEM */
reloadScheduleConfig(): boolean;
/** Create SMARTSPOOL.SEM */
reloadSmartSpoolingWhiteListConfig(): boolean;
/** Create SPAMBOT.SEM */
reloadSpamBotDetectionConfig(): boolean;
/** Create MDSPAMD.SEM */
reloadSpamFilterWhiteListAndSpamd(): boolean;
/** Create SPAMHONEYPOTS.SEM */
reloadSpamHoneypotsConfig(): boolean;
/** Create SPF.SEM */
reloadSpfDkimVbrConfig(): boolean;
/** Create NOSTARTTLS.SEM */
reloadStartTLSWhiteListConfig(): boolean;
/** Create REQUIRETLS.SEM */
reloadStartTlsRequiredConfig(): boolean;
/** Create TARPIT.SEM */
reloadTarpitAndDynamicScreeningConfig(): boolean;
/** Create TRUST.SEM */
reloadTrustedDomainsAndAddresses(): boolean;
/** Create USERLIST.SEM */
reloadUserList(): boolean;
/** Create RESTARTCF.SEM */
restartContentFilter(): boolean;
/** Create RESTART.SEM */
restartMDaemon(): boolean;
/** Create MINGER.SEM */
restartMingerServer(): boolean;
/** Create RESTARTWC.SEM */
restartWorldClientServer(): boolean;
/** Create ACLFIX.SEM */
runAclFileCleanup(): boolean;
/** Create EXITNOW.SEM */
shutDownMDaemon(): boolean;
/** Create BAYESLEARN.SEM */
startBayesianLearning(): boolean;
/** Erase LOCKSEMS.SEM */
unlockProcessing(): boolean;
/** Create DMARCUPDATE.SEM */
updateDmarcPublicSuffixConfig(): boolean;
/** Check if WATCHDOG.SEM exists. */
watchdogExists(): boolean;
}
//#endregion
//#region node-mdaemon-api own APIs
/**
* Predicate for domain names
*
* @param domainName name of the domain to check
*/
export function domainExistsSync(domainName: string): boolean;
/**
* Check asynchronously if a domain exists.
*
* @param domainName name of the domain to check
* @param callback callback function called either on success, or on
* failure. On failure, err contains the error and success is
* undefined. On success, err is undefined and success is true.
*/
export function domainExists(
domainName: string,
callback: (err: Error | null, exists?: boolean
) => void): void;
/**
* @summary Check if a gateway exists
*
* @param gatewayName name of the gateway to be checked,
* e.g. 'gw.example.com'.
*/
export function gatewayExistsSync(gatewayName: string): boolean;
/**
* @summary Get MDaemon information.
*
* @returns {MdInfo}
*/
export function getMdInfo(): MdInfo;
/**
* Get module information.
*
* @returns {ModuleInfo}
*/
export function getModuleInfo(): ModuleInfo;
/**
* @summary Synchronously authenticate against MDaemon user database.
*
* @param email e-mail address
* @param password password
* @param ip OPTIONAL IP address
* @see MD_LogonUser
*/
export function loginSync(
email: string,
password: string,
ip?: string
): boolean;
/**
* @summary Authenticate against MDaemon user database.
*
* @param email e-mail address
* @param password password
* @param callback callback function called either on success, or on
* failure. On failure, err contains the error and success is
* undefined. On success, err is undefined and success is true.
* @param ip OPTIONAL IP address
*/
export function login(
email: string,
password: string,
callback: (err: Error | null, success?: boolean) => void,
ip?: string
): void;
/**
* Read a configuration file in MDaemon\App and convert it to a
* plain ES object.
*
* @param fileName OPTIONAL default "MDaemon.ini"
*/
export function readSettingsSync(fileName?: string): object;
/**
* @summary It retrieves all possible information about a document,
* given the path where it is located and its local ID. Asynchronous
* API.
*
* @param Path the directory containing the document identified by ID
* @param ID local identifier of the document
* @param Callback
* @param Requester OPTIONAL
*/
export function readDocumentInfo(
Path: string,
ID: number,
Callback: (err: Error | null, documentInfo?: MdDocumentInfo) => void,
Requester?: string): void;
/**
* @summary It retrieves all possible information about a document,
* given the path where it is located and its local ID. Synchronous
* API.
*
* The callback is called with err !== null, on error. Otherwise
* documentInfo contains the data about document ID.
*
* @param Path the directory containing the document identified by ID
* @param ID local identifier of the document
* @param Requester OPTIONAL
*
* @returns {MdDocumentInfo}
*/
export function readDocumentInfoSync(
Path: string,
ID: number,
Requester?: string): MdDocumentInfo | undefined;
/**
* @summary Synchronously read domain gateway names.
*
* @returns {string[]}
*/
export function readDomainGatewaysSync(): string[];
/**
* @summary Read domain gateway names.
*
* @param callback
*/
export function readDomainGateways(callback: (err: Error | null, domainGateways?: string[]) => void): void;
/**
* @summary Synchronously get domain names managed by MDaemon.
* @returns {string[]}
*/
export function readDomainsSync(): string[];
/**
* @summary Get domain names managed by MDaemon.
* @param callback
*/
export function readDomains(callback: (err: Error | null, domains?: string[]) => void): void;
/**
* Read a mailing list definition, if it exists.
*
* @param listName full name of the list: example@example.com
* @param callback async callback
*/
export function readMailingList(listName: string, callback: (err: Error | null, listInfo?: MD_List) => void): void;
/**
* Read a mailing list definition, if it exists.
*
* @param listName full name of the list: example@example.com
*/
export function readMailingListSync(listName: string): MD_List | undefined;
/**
* Read a mailing list members, if the list exists.
*
* @param listName full name of the list: example@example.com
*/
export function readMailingListsSync(): string[];
/**
* Read a mailing list's members, if the very list exists.
*
* @param listName full name of the list: example@example.com
* @param includeQueries: OPTIONAL fill MD_ListMember.Flags
*/
export function readMailingListMembersSync(
listName: string,
includeQueries?: boolean
): MD_ListMember[];
/**
* Read a mailing list's members, if the very list exists.
*
* @param listName full name of the list: example@example.com
* @param callback async callback
* @param includeQueries: OPTIONAL fill MD_ListMember.Flags
*/
export function readMailingListMembers(
listName: string,
callback: (err: Error | null, members?: MD_ListMember[]) => void,
includeQueries?: boolean
): void;
/**
*
* @param callback
*/
export function readMailingLists(callback: (err: Error | null, mailingLists?: string[]) => void): void;
/**
*
*/
export function readUserGroupsSync(): GroupListItem[];
/**
*
* @param callback
*/
export function readUserGroups(callback: (err: Error | null, userGroups?: GroupListItem[]) => void): void;
/**
*
*/
export function readUserTemplatesSync(): string[];
/**
*
* @param callback
*/
export function readUserTemplates(callback: (err: Error | null, userTemplates?: string[]) => void): void;
/**
*
*/
export function readUsersSync(): UserListItem[];
/**
*
* @param callback
*/
export function readUsers(callback: (err: Error | null, users?: UserListItem[]) => void): void;
/**
* Retrieve a user's role list.
* Roles are 'user', 'admin', 'domainAdmin'.
*
* @param email
* @param callback
*/
export function readUserRoles(email: string, callback: (err: Error | null, roles?: string[]) => void): void;
/**
* Retrieve a user's role list.
* Roles are 'user', 'admin', 'domainAdmin'.
*
* @param email
*/
export function readUserRolesSync(email: string): string[];
/**
* @summary True if MDaemon is present. False otherwise.
* @readonly
*/
export const isReady: boolean;
/**
* Predicate that holds when handle is a bad handle.
*
* @param handle MDaemon handle or rule handle.
*/
export function isBadHandle(handle: Buffer): boolean;
/**
* @summary Full path where mdaemon.exe is stored.
* @readonly
* @example C:\MDAEMON\App
*/
export const mdAppPath: string;
/**
* @summary Module version
* @readonly
*/
export const version: string;
/**
* @summary Object that contains as many keys as *.exe and *.dll
* are present in mdAppPath. Each key has a VersionInfo value that
* contains version information of the corresponding *.exe or *.dll.
* @readonly
*/
export const versions: { [moduleName: string]: VersionInfo };
/**
* @summary true if MDaemon's version major.minor match module's.
* @readonly
*/
export const versionsMatch: boolean;
/**
* @summary Helpers to control MDaemon's SEM files.
* @readonly
*/
export const sem: MdSemaphores;
//#endregion
//#region MDaemon APIs
//#region MDaemon API Types
export interface MD_AD {
Attribute: string;
BaseDN: string;
BindFlags: number;
ContactSearchFilter: string;
PageSize: number;
Password: string;
SearchFilter: string;
SearchFlags: number;
SearchScope: number;
UserName: string;
}
export interface MdAddrBookParams {
CheckAddrBook: boolean;
UpdateAddrBook: boolean;
}
export interface MD_AppPassword {
ID: string;
Name: string;
Hash: string;
LastUsedIP: string;
CreatedTime: Date;
LastUsedTime: Date;
}
export interface MD_AutoResponder {
AddToList: string;
Days: number;
Enabled: boolean;
EndTime: string;
Exclude: string;
PassMessage: boolean;
Process: string;
RemoveFromList: string;
Script: string;
StartTime: string;
}
export interface MdDomainFlags {
ANTISPAM: boolean;
ANTIVIRUS: boolean;
BIND: boolean;
RECURSEIMAP: boolean;
}
export interface MD_Domain {
AdminList: string[];
DomainName: string;
DomainPOP_Throttle: number;
FQDN: string;
Flags: MdDomainFlags;
IMAP_Throttle: number;
IP6: string;
IP: string;
InboundSMTP_Throttle: number;
MaxDeletedIMAPMessageAge: number;
MaxInactive: number;
MaxLists: number;
MaxMessageAge: number;
MaxUsers: number;
MultiPOP_Throttle: number;
OutboundSMTP_Throttle: number;
POP_Throttle: number;
SuppressList: string[];
}
export interface MD_Forwarding {
AUTHLogon: string;
AUTHPassword: string;
Address: string;
Host: string;
Port: string;
Schedule: MD_AutoResponder;
SendAs: string;
}
export interface MdFlags {
raw: number;
}
export interface MdGatewayFlags extends MdFlags {
APPLYQUOTAS: boolean;
ATRN: boolean;
AUTH: boolean;
AUTHALWAYSVALID: boolean;
AUTOEXTRACT: boolean;
AUTOSPOOL: boolean;
ENABLEANTISPAM: boolean;
ENABLEANTIVIRUS: boolean;
ENABLED: boolean;
ETRN: boolean;
FILE: boolean;
FWDTOADDR: boolean;
FWDTOHOST: boolean;
HONORIPS: boolean;
IGNOREIPS: boolean;
KEEPLOCALCOPY: boolean;
LDAP: boolean;
LOCKATRN: boolean;
MINGER: boolean;
REFERRALS: boolean;
REQUIREAUTH: boolean;
SENDWARNING: boolean;
TREATASFOREIGN: boolean;
USEANYHOST: boolean;
USERETRYQ: boolean;
USESPECIFICHOST: boolean;
V3: boolean;
}
export interface MD_Gateway {
AUTHLogon: string;
AUTHPassword: string;
CacheDirty: boolean;
ETRNHost: string;
ETRNPort: string;
Email: string;
FWDAddress: string;
FWDHost: string;
FWDPort: string;
FWDSendAs: string;
Flags: MdGatewayFlags;
GatewayName: string;
IPList: string[];
LDAPBaseEntry: string;
LDAPHost: string;
LDAPPort: string;
LDAPRootDN: string;
LDAPRootPass: string;
LDAPSearchFilter: string;
LDAPSearchScope: number;
MBF: string;
MailDir: string;
MaxDiskSpace: string;
MaxMessageCount: string;
Password: string;
SendWarningFrom: string;
SendWarningTo: string;
SharedSecret: string;
}
export interface MD_Group {
ADGroupName: string;
DNDSchedule: MD_AutoResponder;
Description: string;
DisableComAgent: boolean;
DisableInstantMessaging: boolean;
GroupName: string;
Priority: number;
TemplateName: string;
}
export interface MdMultiPOPItemFlags extends MdFlags {
ENABLED: boolean;
REMOVEMAIL: boolean;
USEAPOP: boolean;
USEOAUTH: boolean;
}
export interface MD_MultiPOPItem {
HostName: string;
UserName: string;
Password: string;
Flags: MdMultiPOPItemFlags;
}
export interface MD_ODBC {
DSN: string;
DigestQuery: string;
EmailFieldMapping: string;
FirstNameFieldMapping: string;
LastNameFieldMapping: string;
NormalQuery: string;
Pass: string;
PostOnlyQuery: string;
ReadOnlyQuery: string;
Table: string;
User: string;
}
export const enum MdMessagePriority {
URGENT = 10,
HIGH = 25,
AUTH = 35,
NORMAL = 50,
LOW = 75,
BULK = 80,
RETRY = 90,
}
export interface MD_MessageInfo {
AttachmentFilePath?: string;
BodyFilePath?: string;
CharSet?: string;
ContentType?: string;
From: string;
MessageBody: string;
Priority?: MdMessagePriority;
RawFilePrefix?: string;
RemoveAttachment?: boolean;
Subject: string;
To: string;
}
export interface MD_UserInfo {
AccessType: string;
AllowChangeViaEmail: boolean;
AllowTFA: boolean;
ApplyDomainSignature: boolean;
ApplyQuotas: boolean;
AttachmentLinking: boolean;
AutoDecode: boolean;
AutoResponder: MD_AutoResponder;
CanModifyGAB: boolean;
CheckAddrBook: boolean;
Comments: string;
CreatePlaceholderEvents: boolean;
DeclineConflictingRequests: boolean;
DeclineRecurringRequests: boolean;
Domain: string;
DontExpirePassword: boolean;
Email: string;
EnableAIMessageFeatures: boolean;
EnableComAgent: boolean;
EnableInstantMessaging: boolean;
EnableMultiPOP: boolean;
EnableSubaddressing: boolean;
ExemptFromAuthMatch: boolean;
ExtractInbound: boolean;
ExtractOutbound: boolean;
Forwarding: MD_Forwarding;
FullName: string;
Groups: string;
HideFromEveryone: boolean;
IsDisabled: boolean;
IsDomainAdmin: boolean;
IsForwarding: boolean;
IsFrozen: boolean;
KeepForwardedMail: boolean;
MailDir: string;
MailFormat: string;
Mailbox: string;
MaxDeletedIMAPMessageAge: number;
MaxDiskSpace: number;
MaxInactive: number;
MaxMessageAge: number;
MaxMessageCount: number;
MaxSentPerDay: number;
MultiPOPMaxMessageAge: number;
MultiPOPMaxMessageSize: number;
MustChangePassword: boolean;
NTAccount: string;
Password: string;
PasswordEx: string;
ProcessCalendarRequests: boolean;
RecurseIMAP: boolean;
RequireTFA: boolean;
RestrictIMAPAccess: boolean;
RestrictPOPAccess: boolean;
RestrictSMTPAccess: boolean;
RestrictWAAccess: boolean;
RestrictWCAccess: boolean;
SecurePassword: string;
TemplateFlags: number;
TemplateName: string;
UpdateAddrBook: boolean;
UseDefaultPruning: boolean;
UserDefined: string;
WebConfig: number;
}
export type MdDatabase =
'ACCOUNTTEMPLATESDB' |
'ACLSHLOOKUPDB' |
'ACTIVEDSDB' |
'ADGROUPSDB' |
'ALIASDB' |
'ASSCHEDULEDB' |
'ATTACHMENTLINKINGDB' |
'AUTHDB' |
'AUTORESPATTACHMENTSDB' |
'AUTORESPEXCEPTDB' |
'AVEXPIREDB' | // deprecated
'AVMESSAGEDB' | // deprecated
'AVSCHEDULEDB' |
'BADPASSWORDDB' |
'BATVEXCEPTDB' |
'BESPOLICYDB' | // deprecated
'BISCONFIGDB' |
'BISSERVERSDB' | // deprecated
'BISSUBSCRIBEDB' |
'CALENDARDB' |
'CALREMINDDB' |
'CENSORDB' |
'CFADMDB' |
'CFBOUNCEDB' |
'CFCOMPRESSDB' |
'CFDELFILESDB' |
'CFDOMAINEXCDB' |
'CFEXCLUDESDB' |
'CFILTERDB' |
'CFRECDB' |
'CFRULESDB' |
'CFRULESTATSDB' |
'CFSAUPDATEDB' |
'CFSNDDB' |
'CFSYSRULESDB' |
'CFVIRADMDB' |
'CFVIRRECDB' |
'CFVIRSNDDB' |
'CFVIRUPDATEDB' |
'CFVIRWRNDB' |
'CREDSMATCHWHITELISTDB' |
'DELERRDB' | // deprecated
'DELUNLESSDB' |
'DELWARNDB' | // deprecated
'DKSIGNLISTDB' |
'DKVRFYEXCEPTDB' |
'DMARCCACHEDB' |
'DMARCWHITELISTDB' |
'DNSBLDB' |
'DOMAINDB' |
'DOMAINPOPDB' |
'DOMAINSHARINGDB' |
'DPOPXTRADB' |
'DSALLOWEDDOMAINSDB' |
'DVUNLESSDB' |
'DYNAMICSCREENDB' |
'FROMMODWHITELISTDB' |
'FWDDB' |
'FWDUNLESSDB' |
'GATEWAYDB' |
'GREYLISTDB' |
'GROUPSDB' |
'GUARDIANDB' |
'GUICOUNTSDB' |
'GWUSERLISTDB' |
'HELOLOOKUPWLDB' |
'HELPDB' |
'HIJACKWHITELISTDB' |
'HOSTAUTHDB' |
'HOSTSCREENDB' |
'IPCACHEDB' |
'IPSCREENDB' |
'IPSHIELDDB' |
'LANDOMAINSDB' |
'LANIPSDB' |
'LDAPCACHEDB' |
'LDAPDB' |
'LISTPRUNEDB' |
'LOCALDATADB' |
'LOCATIONSDB' | // deprecated
'LOGCOLORSDB' |
'MAILLOOKUPWLDB' |
'MDAEMONINIDB' |
'MDCAVDB' |
'MDOPDB' |
'MDPGPDB' |
'MIMETYPEDB' |
'MSGIDDB' |
'MTEDB' |
'MULTIPOPDB' |
'MXCACHEDB' |
'NEARQUOTADB' |
'NOARCHIVEDB' |
'NOATTACHMENTLINKINGDB' |
'NOCACHEDB' |
'NOCOMMANDDB' |
'NODNSBLDB' |
'NOGREYLISTDB' |
'NOLOGFROMIPDB' |
'NOPRIORITYDB' |
'NOSMARTSPOOLDB' |
'NOSPAMBOTDB' |
'NOSTARTTLSDB' |
'NOSUCHUSERDB' |
'NOTARPITDB' | // deprecated
'OAUTHDB' |
'OCSETTINGSDB' |
'OVERQUOTADB' |
'PFDATADB' |
'PLUGINSDB' |
'POLICYDB' |
'POPLOCKDB' |
'PRIORITYDB' |
'PUBLICSUFFIXDB' |
'PWEXPIREWARNINGDB' |
'QCOUNTSDB' |
'QUEUEDUPDATESDB' |
'QUOTACOUNTSDB' |// deprecated
'RCPTBLACKLISTDB' |
'RECALLDB' |
'RECEIPTDB' |
'RECENTDB' |
'RELAYDB' | // deprecated
'REMINDERSDB' |
'REQUIRESTARTTLSDB' |
'REQUIRETLSWLDB' |
'REVERSEEXCEPTDB' |
'RFC822TMPDB' |
'SCHEDULEDB' |
'SECUREPASSWORDSDB' |
'SENDERBLACKLISTDB' |
'SPAMBOTIPDB' |
'SPAMBOTSENDERDB' |
'SPAMHONEYPOTSDB' |
'SPFCACHEDB' |
'SPFDKAPPROVEDDB' |
'SPFEXCEPTDB' |
'TARPITCONNECTDB' |
'TASKREMINDDB' |
'TFAEXCEPTIONIPSDB' |
'TRANSEXCPTDB' |
'TRANSLATEDB' |
'TRUSTEDHOSTSDB' |
'TRUSTEDIPSDB' |
'UNSUBUSERDB' |
'USERLISTDB' |
'USERSDELETEDTODAYDB' |
'VARIABLEDB' | // deprecated
'VBRDB' |
'WEBACCESSDB' | // deprecated
'WORLDCLIENTDOMAINDB' |
'WORLDCLIENTINIDB';
export type MdVerifyUserInfoLevel =
'ACCOUNT' |
'MAILDIR' |
'FWD' |
'QUOTAS' |
'WEBCONFIG' |
'OPTIONS' |
'MULTIPOP' |
'AUTORESP' |
'ALL';
export interface MdPruningFlags {
MaxDeletedIMAPMessageAge?: number;
MaxInactive?: number;
MaxMessageAge?: number;
RecurseIMAP?: boolean;
UseDomainDefaults?: boolean;
}
export const enum MdSpoolMessageResult {
NOERROR = 0,
MISSINGRAWPATH = 1,
CANTGENRAWFILENAME = 2,
CANTLOCKRAWFILE = 3,
CANTCREATERAWFILE = 4,
CANTACCESSBODYFILE = 5,
}
export const enum MdVerifyMessageInfoResult {
NOERROR = 0,
MISSINGTO = 1,
MISSINGFROM = 2,
MISSINGBODY = 3,
MISSINGBODYFILE = 4,
MISSINGATTACHMENTFILE = 5,
}
export const enum MdVerifyDomainInfoResult {
NOERROR = 0,
NODOMAINNAME = 1,
INVALIDDOMAINNAME = 2,
}
export const enum MdVerifyUserInfoResult {
NOERROR = 0,
INVALIDMAILBOX = 1,
INVALIDDOMAIN = 2,
NONLOCALDOMAIN = 4,
POSTMASTER = 5,
MBXHASDOMAIN = 6,
INVALIDFULLNAME = 7,
INVALIDPASSWORD = 8,
INVALIDMAILDIR = 9,
}
/**
* MDaemon uses only a subset of folder classes.
*
* See https://docs.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxosfld/68a85898-84fe-43c4-b166-4711c13cdd61
*/
export type MdFolderClass =
"IPF.Appointment" | /* Calendar */
"IPF.Contact" | /* Contacts */
"IPF.Task" | /* Tasks */
"IPF.StickyNote" | /* Notes */
"IPF.Document" | /* Documents */
"IPF.Journal" |
"IPF.Hidden" |
"IPF.Note";
export interface MD_MeetingAttendee {
Email: string;
Response: number;
SendInvite: boolean;
SentInvite: boolean;
Type: number;
}
export interface MD_Reminder {
Id: number;
Owner: string;
Path: string;
SendEmail: boolean;
Time: Date;
Type: number;
Uuid: string;
}
export interface MD_OccurrenceChange {
NewBusyStatus: number;
NewCategories: string;
NewComment: string;
NewCommentHtml: string;
NewEnd: Date;
NewIsReminderSet: boolean;
NewLocation: string;
NewReminderMinutes: number;
NewStart: Date;
NewSubject: string;
OriginalDate: Date;
}
export interface MD_TimeZone {
Bias: number;
DaylightBias: number;