All Classes Files Functions Variables Enumerations Enumerator Groups Pages
Domains.idl
Go to the documentation of this file.
1 /**
2  * @file Domains.idl
3  * @brief %Domains settings
4  *
5  * @author Dusan Juhas
6  *
7  * @copyright Copyright © 2017 Kerio Technologies s.r.o.
8  */
9 
10 #import <kerio/web/idl/SharedStructures.idl>
11 #import <AdminStructures.idl>
12 #import <DistributedDomain.idl>
13 
14 module kerio {
15 module jsonapi {
16 module admin {
17 
18 /**
19  * Delivery Type
20  */
21 enum DeliveryType {
22  Online, ///< deliver online, immediatelly
23  OfflineScheduler, ///< delivery is started by scheduler
24  OfflineEtrn ///< delivery is started by ETRN command from remote host
25 };
26 
27 /**
28  * Forwarding action
29  * Note: all fields must be assigned if used in set methods
30  */
31 struct Forwarding {
32  boolean isEnabled; ///< is forwarding enabled?
33  string host; ///< hostname or IP address to forward
34  long port; ///< host port
35  DeliveryType how; ///< how to deliver
36  boolean preventLoop; ///< do not deliver to domain alias (applicable when Domain.aliasList is not empty)
37 };
38 
39 enum DirectoryServiceType {
40  WindowsActiveDirectory, ///< Windows Active Directory
41  AppleDirectoryKerberos, ///< Apple Open Directory with Kerberos authentication
42  AppleDirectoryPassword, ///< Apple Open Directory with Password Server authentication
43  KerioDirectory, ///< Kerio Directory (reserved for future use)
44  CustomLDAP ///< Custom Generic LDAP
45 };
46 
47 /**
48  *
49  * Note: all fields must be assigned if used in set methods (except password)
50  */
52  string username;
53  string password;
54  boolean isSecure; ///< is used LDAPS?
55 };
56 
57 /**
58  * Directory service configuration
59  */
61  DirectoryServiceType serviceType; ///< type of the service
62  DirectoryAuthentication authentication; ///< authentication information
63  string directoryName; ///< Active Directory only: Directory name
64  string ldapSuffix; ///< Apple Directory, Kerio Directory: LDAP Search Suffix
65 };
66 
67 /**
68  * Directory service information
69  */
71  boolean isEnabled; ///< directory service is in use / isEnabled must be always assigned if used in set methods
72  DirectoryServiceType serviceType; ///< type of the service
73  string customMapFile; ///< Custom Generic LDAP only: custom map filename
74  DirectoryAuthentication authentication; ///< authentication information
75  string hostname; ///< directory service hostname
76  string backupHostname; ///< directory service backup hostname
77  string directoryName; ///< Active Directory only: Directory name
78  string ldapSuffix; ///< Apple Directory, Kerio Directory: LDAP Search Suffix
79 };
80 
81 /**
82  *
83  * Note: all fields must be assigned if used in set methods
84  */
85 struct Footer {
86  boolean isUsed; ///< is footer used
87  string text; ///< text that will be appended to every message sent from this domain
88  boolean isHtml; ///< if is value false the text is precessed as plaintext
89  boolean isUsedInDomain; ///< footer is used also for e-mails within domain
90 };
91 
92 /**
93  *
94  * Note: all fields must be assigned if used in set methods
95  */
96 struct WebmailLogo {
97  boolean isUsed; ///< has domain user defined logo?
98  string url; ///< user defined logo URL
99 };
100 
102  boolean isRenamed;
103  string oldName;
104  string newName;
105 };
106 
107 struct DomainQuota {
108  kerio::web::SizeLimit diskSizeLimit; ///< max. disk usage
109  kerio::web::ByteValueWithUnits consumedSize; ///< [READ-ONLY] current disk usage
110  QuotaNotification notification; ///< option for notification
111  long warningLimit; ///< limit in per cent
112  string email; ///< if quota is exceeded the notification will be sent to this address
113  boolean blocks; ///< if reaching the quota will block creation of a new items
114 };
115 
116 /**
117  * Domain details
118  */
119 struct Domain {
120  kerio::web::KId id; ///< [READ-ONLY] global identification of domain
121  string name; ///< [REQUIRED FOR CREATE] [WRITE-ONCE] name
122  string description; ///< description
123  boolean isPrimary; ///< is this domain primary?
124  long userMaxCount; ///< maximum users per domain, 'unlimited' constant can be used
125  boolean passwordExpirationEnabled; ///< is password expiration enabled for this domain?
126  long passwordExpirationDays; ///< password expiration interval
127  long passwordHistoryCount; ///< lenght of password history
128  boolean passwordComplexityEnabled; ///< is password complexity enabled for this domain?
129  long passwordMinimumLength; ///< minimum password length for complexity feature
130  kerio::web::SizeLimit outgoingMessageLimit; ///< outgoing message size limit
131  ActionAfterDays deletedItems; ///< clean Deleted Items folder (AC maximum: 24855)
132  ActionAfterDays junkEmail; ///< clean Junk Email folder (AC maximum: 24855)
133  ActionAfterDays sentItems; ///< clean Sent Items folder (AC maximum: 24855)
134  ActionAfterDays autoDelete; ///< clean all folders (AC minimun:30, maximum: 24855)
135  ActionAfterDays keepForRecovery; ///< keep deleted messages for recovery
136  kerio::web::StringList aliasList; ///< list of domain alternative names
137  Forwarding forwardingOptions; ///< forwarding settings
138  DirectoryService service; ///< directory service configuration
139  Footer domainFooter; ///< domain footer setting
140  string kerberosRealm; ///< Kerberos Realm name
141  string winNtName; ///< Windows NT domain name - available on windows only
142  string pamRealm; ///< PAM Realm name - available on linux only
143  kerio::web::OptionalString ipAddressBind; ///< specific IP address bind
144  WebmailLogo logo; ///< user defined logo
145  CustomImage customClientLogo; ///< Use custom logo in Kerio Connect Client (if not enabled global option from AdvancedOptionsSetting.webMail is used)
146  boolean checkSpoofedSender; ///<
147  DomainRenameInfo renameInfo; ///< [READ-ONLY] if domain was renamed, contain old and new domain name
148  DomainQuota domainQuota; ///< domain's quota settings
149  boolean isDistributed; ///< [READ-ONLY] if domain is distributed
150  boolean isDkimEnabled; ///< true if DKIM is used for this domain
151  boolean isLdapManagementAllowed; ///< [READ-ONLY] true if directory service user/group can be created/deleted
152  boolean isInstantMessagingEnabled; ///< true if Instant Messaging is enabled for this domain
153  boolean useRemoteArchiveAddress; ///< if true emails are archived to remoteArchiveAddress
154  string remoteArchiveAddress; ///< remote archiving address
155  boolean archiveLocalMessages; ///< if true emails from emails are archived to remoteArchiveAddress
156  boolean archiveIncomingMessages; ///< if true emails are archived to remoteArchiveAddress
157  boolean archiveOutgoingMessages; ///< if true emails are archived to remoteArchiveAddress
158  boolean archiveBeforeFilter; ///< if true emails are archived before content filter check
159 };
160 
161 /**
162  * Identical settings for all domains
163  */
165  string hostname; ///< internet hostname - how this machine introduces itself in SMTP,POP3...
166  boolean publicFoldersPerDomain; ///< true=public folders are unique per each domain / false=global for all domains
167  kerio::web::KId serverId; ///< id of server primary used in cluster
168 };
169 
170 /**
171  * List of domains
172  */
173 typedef sequence<Domain> DomainList;
174 
175 /**
176  * Types of user amount limit
177  */
178 enum UserLimitType {
179  DomainLimit, ///< stricter limit for amount of users is on domain
180  LicenseLimit ///< stricter limit for amount of users is on license
181 };
182 
183 /**
184  * User limit information
185  */
186 struct MaximumUsers {
187  boolean isUnlimited; ///< is it a special case with no limit for users ?
188  long allowedUsers; ///< number of allowed users (take minimum of server and domain limit)
189  long limit; ///< max. user limit
190  UserLimitType limitType; ///< max. user limit type, if domain limit == license limit -> use license
191 };
192 
193 /**
194  * User count information
195  */
197  long currentUsers; ///< number of created users on domain
198  MaximumUsers allowedUsers; ///< number of allowed users, take stricter limit from max. number for domain, max. number by license
199 };
200 
201 /**
202  * Domain management
203  */
204 interface Domains {
205 
206  /**
207  * Check integrity of all public folders.
208  * If corrupted folder is found, try to fix it.
209  */
210  void checkPublicFoldersIntegrity();
211 
212  /**
213  * Create new domains.
214  *
215  * @param errors - error message list
216  * @param result - particular results for all items
217  * @param domains - new domain entities
218  */
219  void create(out kerio::web::ErrorList errors, out kerio::web::CreateResultList result, in DomainList domains);
220 
221  /**
222  * Generate password which meets current password policy of a given domain.
223  *
224  * @param password - generated password
225  * @param domainId - ID of the domain
226  */
227  void generatePassword(out string password, in kerio::web::KId domainId);
228 
229  /**
230  * Obtain a list of domains.
231  *
232  * @param list - domains
233  * @param totalItems - amount of domains for given search condition, useful when limit is defined in kerio::web::SearchQuery
234  * @param query - query conditions and limits
235  */
236  void get(out DomainList list, out long totalItems, in kerio::web::SearchQuery query);
237 
238  /**
239  * DKIM requires public key in DNS for domain.
240  * Returns DNS TXT record to be added into DNS.
241  */
242  void getDkimDnsRecord(out string detail, in string domain);
243 
244  /**
245  * Get settings common in all domains.
246  *
247  * @param setting - domain global setting
248  */
249  void getSettings(out DomainSetting setting);
250 
251  /**
252  * Get information about user count and limit for domain. Disabled users are not counted.
253  *
254  * @param countInfo - structure with users count and limit
255  * @param domainId - ID of the domain which will be renamed
256  */
257  void getUserCountInfo(out UserDomainCountInfo countInfo, in kerio::web::KId domainId);
258 
259  /**
260  * Remove domains.
261  *
262  * @param errors - error message list
263  * @param domainIds - list of global identifiers of domains to be deleted
264  */
265  void remove(out kerio::web::ErrorList errors, in kerio::web::KIdList domainIds);
266 
267  /**
268  * Start domain renaming process.
269  *
270  * @param error - error message
271  * @param domainId - ID of the domain which will be renamed
272  * @param newName - new domain name
273  */
274  void rename(out ClusterError error, in kerio::web::KId domainId, in string newName);
275 
276  /**
277  * Save a new footer's image.
278  *
279  * @param imgUrl - url to saved image
280  * @param fileId - id of uploaded file
281  */
282  void saveFooterImage(out string imgUrl, in string fileId);
283 
284  /**
285  * Save a new logo.
286  *
287  * @param logoUrl - path to the saved file
288  * @param fileId - ID of the uploaded file
289  * @param domainId - global domain identifier
290  */
291  void saveWebMailLogo(out string logoUrl, in string fileId, in kerio::web::KId domainId);
292 
293  /**
294  * Set existing domains to given pattern.
295  *
296  * @param errors - error message list
297  * @param domainIds - list of the domain's global identifier(s)
298  * @param pattern - pattern to use for new values
299  */
300  void set(out kerio::web::ErrorList errors, in kerio::web::KIdList domainIds, in Domain pattern);
301 
302  /**
303  * Set settings for all domains.
304  *
305  * @param setting - domain global settings
306  */
307  void setSettings(in DomainSetting setting);
308 
309  /**
310  * Test connection between Kerio Connect and domain controller.
311  *
312  * @param errors - error message
313  * @param hostnames - directory server (primary and secondary if any)
314  * @param config - directory service configuration. If password is empty then it is taken from domain by 'domainId'.
315  * @param domainId - global domain identifier
316  */
317  void testDomainController(out kerio::web::ErrorList errors, in kerio::web::StringList hostnames, in DirectoryServiceConfiguration config, in kerio::web::KId domainId);
318 
319  /**
320  * Tests DKIM DNS TXT status for domain list.
321  *
322  * @param errors - error message
323  * @param hostnames - hostnames checked for DKIM public key in DNS
324  */
325  void testDkimDnsStatus(out kerio::web::ErrorList errors, in kerio::web::StringList hostnames);
326 
327  /**
328  * Return all supported placeholders for domain footer
329  */
330  void getDomainFooterPlaceholders(out NamedConstantList placeholders);
331 };
332 
333 }; }; };//end of namespace