All Classes Files Functions Variables Enumerations Enumerator Groups Pages
Smtp.idl
Go to the documentation of this file.
1 /**
2  * @file Smtp.idl
3  * @brief Set SMTP Server.
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 <Users.idl> //ItemCountLimit
12 #import <FiltersCommon.idl>
13 
14 
15 module kerio {
16 module jsonapi {
17 module admin {
18 
19 enum SmtpAuthentication {
20  Auth, ///< AUTH SMTP command
21  Pop3Based ///< POP3 authentication before SMTP
22 };
23 
24 /**
25  * SMTP Relay options
26  */
27 struct Relay {
28  boolean isRestricted; ///< is relay restricted? false == open relay enabled
29  string ipAddressGroupName; ///< output only: name of IP group from which open relay is enabled
30  kerio::web::KId ipAddressGroupId; ///< ID of IP group from which open relay is enabled
31  boolean authenticateOutgoing; ///< client must authenticate before sending a message
32  ItemCountLimit forwardPop3authentication; ///< client can be authenticated by POP3 before SMTP relay for certain number of minutes
33  boolean hideLocalIpInRcv; ///< hide local IP address in receive headers
34 };
35 
37  boolean isRequired; ///< is authentication required?
38  string userName; ///< a user name for relay server authentication
39  string password; ///< a password for relay server authentication, it's allowed to send ID of a rule to copy a password
40  SmtpAuthentication authType; ///< type of authentication
41 };
42 
43 struct IpLimit {
44  ItemCountLimit maximumFromIp; ///< maximum number of messages per hour from 1 IP address
45  ItemCountLimit maximumConnections; ///< maximum number of concurrent SMTP connections from 1 IP address
46  ItemCountLimit maximumUnknowns; ///< maximum number of unknown recipients
47  string ipAddressGroupName; ///< output only: name of IP group on which limits are NOT applied
48  kerio::web::KId ipAddressGroupId; ///< ID of IP group on which limits are NOT applied
49 };
50 
52  Relay relayControl; ///< relay control options
53  IpLimit ipBasedLimit; ///< limits based on IP address
54  boolean blockUnknownDns; ///< block is sender's mail domain was not found in DNS
55  boolean verifyClientRDnsEntry; ///< block if client's IP address has no reverse DNS entry (PTR)
56  boolean requireLocalDomainSenderAuth; ///< require SMTP authentication if the sender's address is from a local domain
57  ItemCountLimit maximumRecipients; ///< maximum number of recipients in 1 message
58  ItemCountLimit maximumSmtpFailures; ///< maximum number of failed commands in 1 SMTP session
59  kerio::web::SizeLimit messageSize; ///< limit for incomming SMTP message size
60  long readerHops; ///< maximum number of accepted received headers (hops)
61  boolean useSSL; ///< use SSL if supported by remote SMTP server
62  long maximumThreads; ///< maximum number of delivery threads
63  TimeLimit retryInterval; ///< delivery retry interval
64  TimeLimit bounceInterval; ///< bounce the message to the sender if not delivered in defined time
65  TimeLimit warningInterval; ///< warn sender if a message is not delivered within define time
66  string reportLanguage; ///< 2 char abbreviation; we don't support reports added by user
67 };
68 
69 
70 enum RelayRuleCondType {
71  RelayCondNone, ///< there is none condition; it's always true
72  RelayCondRecipient, ///< recipient from envelope
73  RelayCondSender ///< sender from envelope
74 };
75 
76 enum RelayRuleComparatorType {
77  RelayCompEqual,
78  RelayCompNotEqual
79 };
80 
82  RelayRuleCondType test;
83  RelayRuleComparatorType comparator;
84  string pattern; ///< patern shoud be type match E.g. *@example.com
85 };
86 
88  kerio::web::KId id; ///< [READ-ONLY] global identification
89  boolean isEnabled;
90  string description; ///< contains rule description
91  string hostName; ///< relay server hostname
92  long port; ///< relay server port
93  RelayAuthentication authentication; ///< relay server authentication parameters
94  RelayRuleCondition condition;
95 };
96 typedef sequence<RelayDeliveryRule> RelayDeliveryRuleList;
97 
98 struct FilterRule {
99  boolean isIncomplete; ///< if rule is not completed (it does not contain any definition of conditions and actions)
100 
101  kerio::jsonapi::filters::EvaluationModeType evaluationMode; ///< determines evaluation mod of initial conditions
102  kerio::jsonapi::filters::FilterConditionList conditions; ///< list of rule's initial conditions
103  kerio::jsonapi::filters::FilterActionList actions; ///< list of rule's actions (performed if initial conditions are meet)
104 };
105 
106 struct DeliveryRule {
107  kerio::web::KId id; ///< [READ-ONLY] global identification
108  boolean isEnabled; ///< says whether rule is enabled
109  string description; ///< contains rules description
110  FilterRule rule;
111 };
112 typedef sequence<DeliveryRule> DeliveryRuleList;
113 
114 interface Smtp {
115 
116  /**
117  * Obtain SMTP server settings.
118  *
119  * @param server - SMTP settings
120  */
121  void get(out SmtpServerSettings server);
122 
123  /**
124  * Change SMTP server settings.
125  *
126  * @param server - SMTP settings
127  */
128  void set(in SmtpServerSettings server);
129 
130  void getRelayDeliveryRuleList(out RelayDeliveryRuleList list);
131  void setRelayDeliveryRuleList(in RelayDeliveryRuleList list);
132 
133  void getIncomingRuleList(out DeliveryRuleList list);
134  void setIncomingRuleList(in DeliveryRuleList list);
135 
136  void getOutgoingRuleList(out DeliveryRuleList list);
137  void setOutgoingRuleList(in DeliveryRuleList list);
138 };
139 
140 }; }; };//end of namespace