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 © 2011-2012 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 /**
108  * Domain details
109  */
110 struct Domain {
111  kerio::web::KId id; ///< [READ-ONLY] global identification of domain
112  string name; ///< [REQUIRED FOR CREATE] [WRITE-ONCE] name
113  string description; ///< description
114  boolean isPrimary; ///< is this domain primary?
115  long userMaxCount; ///< maximum users per domain, 'unlimited' constant can be used
116  boolean passwordExpirationEnabled; ///< is password expiration enabled for this domain?
117  long passwordExpirationDays; ///< password expiration interval
118  long passwordHistoryCount; ///< lenght of password history
119  boolean passwordComplexityEnabled; ///< is password complexity enabled for this domain?
120  long passwordMinimumLength; ///< minimum password length for complexity feature
121  kerio::web::SizeLimit outgoingMessageLimit; ///< outgoing message size limit
122  ActionAfterDays deletedItems; ///< clean Deleted Items folder (AC maximum: 24855)
123  ActionAfterDays junkEmail; ///< clean Junk Email folder (AC maximum: 24855)
124  ActionAfterDays sentItems; ///< clean Sent Items folder (AC maximum: 24855)
125  ActionAfterDays autoDelete; ///< clean all folders (AC minimun:30, maximum: 24855)
126  ActionAfterDays keepForRecovery; ///< keep deleted messages for recovery
127  kerio::web::StringList aliasList; ///< list of domain alternative names
128  Forwarding forwardingOptions; ///< forwarding settings
129  DirectoryService service; ///< directory service configuration
130  Footer domainFooter; ///< domain footer setting
131  string kerberosRealm; ///< Kerberos Realm name
132  string winNtName; ///< Windows NT domain name - available on windows only
133  string pamRealm; ///< PAM Realm name - available on linux only
134  kerio::web::OptionalString ipAddressBind; ///< specific IP address bind
135  WebmailLogo logo; ///< user defined logo
136  boolean checkSpoofedSender; ///<
137  DomainRenameInfo renameInfo; ///< [READ-ONLY] if domain was renamed, contain old and new domain name
138  boolean isDistributed; ///< [READ-ONLY] if domain is distributed
139  boolean isDkimEnabled; ///< true if DKIM is used for this domain
140  boolean isLdapManagementAllowed; ///< [READ-ONLY] true if directory service user/group can be created/deleted
141 };
142 
143 /**
144  * Identical settings for all domains
145  */
147  string hostname; ///< internet hostname - how this machine introduces itself in SMTP,POP3...
148  boolean publicFoldersPerDomain; ///< true=public folders are unique per each domain / false=global for all domains
149  kerio::web::KId serverId; ///< id of server primary used in cluster
150 };
151 
152 /**
153  * List of domains
154  */
155 typedef sequence<Domain> DomainList;
156 
157 /**
158  * Types of user amount limit
159  */
160 enum UserLimitType {
161  DomainLimit, ///< stricter limit for amount of users is on domain
162  LicenseLimit ///< stricter limit for amount of users is on license
163 };
164 
165 /**
166  * User limit information
167  */
168 struct MaximumUsers {
169  boolean isUnlimited; ///< is it a special case with no limit for users ?
170  long allowedUsers; ///< number of allowed users (take minimum of server and domain limit)
171  long limit; ///< max. user limit
172  UserLimitType limitType; ///< max. user limit type, if domain limit == license limit -> use license
173 };
174 
175 /**
176  * User count information
177  */
179  long currentUsers; ///< number of created users on domain
180  MaximumUsers allowedUsers; ///< number of allowed users, take stricter limit from max. number for domain, max. number by license
181 };
182 
183 /**
184  * Domain management
185  */
186 interface Domains {
187 
188  /**
189  * Check integrity of all public folders.
190  * If corrupted folder is found, try to fix it.
191  */
192  void checkPublicFoldersIntegrity();
193 
194  /**
195  * Create new domains.
196  *
197  * @param errors - error message list
198  * @param result - particular results for all items
199  * @param domains - new domain entities
200  */
201  void create(out kerio::web::ErrorList errors, out kerio::web::CreateResultList result, in DomainList domains);
202 
203  /**
204  * Generate password which meets current password policy of a given domain.
205  *
206  * @param password - generated password
207  * @param domainId - ID of the domain
208  */
209  void generatePassword(out string password, in kerio::web::KId domainId);
210 
211  /**
212  * Obtain a list of domains.
213  *
214  * @param list - domains
215  * @param totalItems - amount of domains for given search condition, useful when limit is defined in kerio::web::SearchQuery
216  * @param query - query conditions and limits
217  */
218  void get(out DomainList list, out long totalItems, in kerio::web::SearchQuery query);
219 
220  /**
221  * DKIM requires public key in DNS for domain.
222  * Returns DNS TXT record to be added into DNS.
223  */
224  void getDkimDnsRecord(out string detail, in string domain);
225 
226  /**
227  * Get settings common in all domains.
228  *
229  * @param setting - domain global setting
230  */
231  void getSettings(out DomainSetting setting);
232 
233  /**
234  * Get information about user count and limit for domain. Disabled users are not counted.
235  *
236  * @param countInfo - structure with users count and limit
237  * @param domainId - ID of the domain which will be renamed
238  */
239  void getUserCountInfo(out UserDomainCountInfo countInfo, in kerio::web::KId domainId);
240 
241  /**
242  * Remove domains.
243  *
244  * @param errors - error message list
245  * @param domainIds - list of global identifiers of domains to be deleted
246  */
247  void remove(out kerio::web::ErrorList errors, in kerio::web::KIdList domainIds);
248 
249  /**
250  * Start domain renaming process.
251  *
252  * @param error - error message
253  * @param domainId - ID of the domain which will be renamed
254  * @param newName - new domain name
255  */
256  void rename(out ClusterError error, in kerio::web::KId domainId, in string newName);
257 
258  /**
259  * Save a new footer's image.
260  *
261  * @param imgUrl - url to saved image
262  * @param fileId - id of uploaded file
263  */
264  void saveFooterImage(out string imgUrl, in string fileId);
265 
266  /**
267  * Save a new logo.
268  *
269  * @param logoUrl - path to the saved file
270  * @param fileId - ID of the uploaded file
271  * @param domainId - global domain identifier
272  */
273  void saveWebMailLogo(out string logoUrl, in string fileId, in kerio::web::KId domainId);
274 
275  /**
276  * Set existing domains to given pattern.
277  *
278  * @param errors - error message list
279  * @param domainIds - list of the domain's global identifier(s)
280  * @param pattern - pattern to use for new values
281  */
282  void set(out kerio::web::ErrorList errors, in kerio::web::KIdList domainIds, in Domain pattern);
283 
284  /**
285  * Set settings for all domains.
286  *
287  * @param setting - domain global settings
288  */
289  void setSettings(in DomainSetting setting);
290 
291  /**
292  * Test connection between Kerio Connect and domain controller.
293  *
294  * @param errors - error message
295  * @param hostnames - directory server (primary and secondary if any)
296  * @param config - directory service configuration. If password is empty then it is taken from domain by 'domainId'.
297  * @param domainId - global domain identifier
298  */
299  void testDomainController(out kerio::web::ErrorList errors, in kerio::web::StringList hostnames, in DirectoryServiceConfiguration config, in kerio::web::KId domainId);
300 
301  /**
302  * Tests DKIM DNS TXT status for domain list.
303  *
304  * @param errors - error message
305  * @param hostnames - hostnames checked for DKIM public key in DNS
306  */
307  void testDkimDnsStatus(out kerio::web::ErrorList errors, in kerio::web::StringList hostnames);
308 
309  /**
310  * Return all supported placeholders for domain footer
311  */
312  void getDomainFooterPlaceholders(out NamedConstantList placeholders);
313 };
314 
315 }; }; };//end of namespace