1: <?php
2: /**
3: * This code is licensed under AGPLv3 license or Afterlogic Software License
4: * if commercial version of the product was purchased.
5: * For full statements of the licenses see LICENSE-AFTERLOGIC and LICENSE-AGPL3 files.
6: */
7:
8: namespace Aurora\Modules\Mail;
9:
10: use Aurora\System\SettingsProperty;
11:
12: /**
13: * @property bool $Disabled
14: * @property bool $AllowAddAccounts
15: * @property bool $AllowAutosaveInDrafts
16: * @property bool $AllowChangeMailQuotaOnMailServer
17: * @property bool $AllowDefaultAccountForUser
18: * @property bool $AllowIdentities
19: * @property bool $OnlyUserEmailsInIdentities
20: * @property bool $AllowFilters
21: * @property bool $AllowForward
22: * @property bool $AllowAutoresponder
23: * @property bool $EnableAllowBlockLists
24: * @property int $DefaultSpamScore
25: * @property bool $ConvertSpamScoreToSpamLevel
26: * @property string $SieveSpamRuleCondition
27: * @property bool $AllowInsertImage
28: * @property bool $AlwaysShowImagesInMessage
29: * @property int $AutoSaveIntervalSeconds
30: * @property bool $AllowTemplateFolders
31: * @property bool $AllowInsertTemplateOnCompose
32: * @property int $MaxTemplatesCountOnCompose
33: * @property bool $AllowAlwaysRefreshFolders
34: * @property bool $DisplayInlineCss
35: * @property bool $CleanupOutputBeforeDownload
36: * @property bool $IgnoreImapSubscription
37: * @property int $ImageUploadSizeLimit
38: * @property bool $SaveRepliesToCurrFolder
39: * @property string $SieveGeneralPassword
40: * @property string $SieveFileName
41: * @property string $SieveFiltersFolderCharset
42: * @property string $OverriddenSieveHost
43: * @property int $SievePort
44: * @property bool $UseBodyStructuresForHasAttachmentsSearch
45: * @property bool $UseDateFromHeaders
46: * @property string $XMailerValue
47: * @property string $ForwardedFlagName
48: * @property bool $PreferStarttls
49: * @property string $ExternalHostNameOfLocalImap
50: * @property string $ExternalHostNameOfLocalSmtp
51: * @property bool $AutocreateMailAccountOnNewUserFirstLogin
52: * @property bool $SieveUseStarttls
53: * @property bool $DisableStarttlsForLocalhost
54: * @property string $XOriginatingIPHeaderName
55: * @property bool $DoImapLoginOnAccountCreate
56: * @property array $MessagesSortBy
57: * @property bool $CreateHtmlLinksFromTextLinksInDOM
58: * @property bool $SieveCheckScript
59: * @property int $MessagesInfoChunkSize
60: * @property int $ExpiredLinkLifetimeMinutes
61: * @property bool $AllowUnifiedInbox
62: * @property bool $UseIdentityEmailAsSmtpMailFrom
63: * @property bool $AllowScheduledAutoresponder
64: * @property bool $ImapSendOriginatingIP
65: */
66:
67: class Settings extends \Aurora\System\Module\Settings
68: {
69: protected function initDefaults()
70: {
71: $this->aContainer = [
72: "Disabled" => new SettingsProperty(
73: false,
74: "bool",
75: null,
76: "Setting to true disables the module",
77: ),
78: "AllowAddAccounts" => new SettingsProperty(
79: true,
80: "bool",
81: null,
82: "If true, Add New Account button is displayed in Email Accounts area of Settings",
83: ),
84: "AllowAutosaveInDrafts" => new SettingsProperty(
85: true,
86: "bool",
87: null,
88: "If true, message being composed is periodically saved to Drafts folder",
89: ),
90: "AllowChangeMailQuotaOnMailServer" => new SettingsProperty(
91: false,
92: "bool",
93: null,
94: "If true, allows setting email account quota in admin area",
95: ),
96: "AllowDefaultAccountForUser" => new SettingsProperty(
97: false,
98: "bool",
99: null,
100: "If true, a user has a default account and its email adress equals user's PublicId",
101: ),
102: "AllowIdentities" => new SettingsProperty(
103: true,
104: "bool",
105: null,
106: "Enables using identities on composing mails and managing them in Settings area",
107: ),
108: "OnlyUserEmailsInIdentities" => new SettingsProperty(
109: false,
110: "bool",
111: null,
112: "If true, email address cannot be changed when adding or editing an identity",
113: ),
114: "AllowFilters" => new SettingsProperty(
115: true,
116: "bool",
117: null,
118: "Enables Filters tab in account settings",
119: ),
120: "AllowForward" => new SettingsProperty(
121: true,
122: "bool",
123: null,
124: "Enables Forward tab in account settings",
125: ),
126: "AllowAutoresponder" => new SettingsProperty(
127: true,
128: "bool",
129: null,
130: "Enables Autoresponder tab in account settings",
131: ),
132: "AllowScheduledAutoresponder" => new SettingsProperty(
133: false,
134: "bool",
135: null,
136: "Enables scheduled Autoresponder",
137: ),
138: "EnableAllowBlockLists" => new SettingsProperty(
139: false,
140: "bool",
141: null,
142: "Enables the feature of allow/block lists (requires advanced maiserver configuration to work)",
143: ),
144: "DefaultSpamScore" => new SettingsProperty(
145: 5,
146: "int",
147: null,
148: "Default value for per-user spam score",
149: ),
150: "ConvertSpamScoreToSpamLevel" => new SettingsProperty(
151: false,
152: "bool",
153: null,
154: "Enables converting spamscore to spamlevel for per-user spam settings",
155: ),
156: "SieveSpamRuleCondition" => new SettingsProperty(
157: "allof ( not header :matches \"X-Spam-Score\" \"-*\", header :value \"ge\" :comparator \"i;ascii-numeric\" \"X-Spam-Score\" \"{{Value}}\" )",
158: "string",
159: null,
160: "Defines rule for moving mails to spam, used within per-user spam settings",
161: ),
162: "AllowInsertImage" => new SettingsProperty(
163: true,
164: "bool",
165: null,
166: "Enables toolbar button for inserting an image when editing message text",
167: ),
168: "AlwaysShowImagesInMessage" => new SettingsProperty(
169: false,
170: "bool",
171: null,
172: "If true, external images are always displayed when viewing email messages",
173: ),
174: "AutoSaveIntervalSeconds" => new SettingsProperty(
175: 60,
176: "int",
177: null,
178: "Defines interval for saving messages to Drafts periodically, in seconds",
179: ),
180: "AllowTemplateFolders" => new SettingsProperty(
181: false,
182: "bool",
183: null,
184: "Allows for setting a folder as template one under Manage Folders screen",
185: ),
186: "AllowInsertTemplateOnCompose" => new SettingsProperty(
187: false,
188: "bool",
189: null,
190: "If true, a tool for inserting a template is added on message compose screen",
191: ),
192: "MaxTemplatesCountOnCompose" => new SettingsProperty(
193: 100,
194: "int",
195: null,
196: "A limit of number of email templates available for selecting on message compose screen",
197: ),
198: "AllowAlwaysRefreshFolders" => new SettingsProperty(
199: false,
200: "bool",
201: null,
202: "If true, each folder in Manage Folders screen gets an option whether it should ",
203: ),
204: "DisplayInlineCss" => new SettingsProperty(
205: false,
206: "bool",
207: null,
208: "If true, CSS of a message will be converted to inline one when displaying message",
209: ),
210: "CleanupOutputBeforeDownload" => new SettingsProperty(
211: false,
212: "bool",
213: null,
214: "Discard any data in the output buffer if possible, prior to downloading attachment",
215: ),
216: "IgnoreImapSubscription" => new SettingsProperty(
217: false,
218: "bool",
219: null,
220: "If true, all the email folders can be accessed, regardless of their IMAP subscription status; also, a tool for hiding/showing folder is removed from Manage Folders screen",
221: ),
222: "ImageUploadSizeLimit" => new SettingsProperty(
223: 0,
224: "int",
225: null,
226: "Sets a limit of image file size for upload, or 0 for unlimited",
227: ),
228: "SaveRepliesToCurrFolder" => new SettingsProperty(
229: false,
230: "bool",
231: null,
232: "Defines a default behavior for saving replies to the original folder of the message, can be changed in user settings",
233: ),
234: "SieveGeneralPassword" => new SettingsProperty(
235: "",
236: "string",
237: null,
238: "Defines ManageSieve access password if it's required by the agent",
239: ),
240: "SieveFileName" => new SettingsProperty(
241: "sieve",
242: "string",
243: null,
244: "Defines default filename of Sieve rules file",
245: ),
246: "SieveFiltersFolderCharset" => new SettingsProperty(
247: "utf-8",
248: "string",
249: null,
250: "Defines charset used in Sieve rules files",
251: ),
252: "OverriddenSieveHost" => new SettingsProperty(
253: "",
254: "string",
255: null,
256: "If set, this value will be used as ManageSieve host - by default, IMAP host value is used for this",
257: ),
258: "SievePort" => new SettingsProperty(
259: 4190,
260: "int",
261: null,
262: "Defines port number for accessing ManageSieve agent",
263: ),
264: "UseBodyStructuresForHasAttachmentsSearch" => new SettingsProperty(
265: false,
266: "bool",
267: null,
268: "If true, attempts to use IMAP bodystructure to perform search for messages that have attachments",
269: ),
270: "UseDateFromHeaders" => new SettingsProperty(
271: false,
272: "bool",
273: null,
274: "If true, date and time information for displaying a message is obtained from message headers, not from IMAP envelopes",
275: ),
276: "XMailerValue" => new SettingsProperty(
277: "Afterlogic webmail client",
278: "string",
279: null,
280: "If set, defines a value for X-Mailer header added to messages sent out",
281: ),
282: "ForwardedFlagName" => new SettingsProperty(
283: "\$Forwarded",
284: "string",
285: null,
286: "Defines a flag used to show message as Forwarded one",
287: ),
288: "PreferStarttls" => new SettingsProperty(
289: true,
290: "bool",
291: null,
292: "If true, STARTTLS will automatically be used if mail server advertises its support",
293: ),
294: "ExternalHostNameOfLocalImap" => new SettingsProperty(
295: "",
296: "string",
297: null,
298: "Default external hostname for IMAP server, used by autodiscover",
299: ),
300: "ExternalHostNameOfLocalSmtp" => new SettingsProperty(
301: "",
302: "string",
303: null,
304: "Default external hostname for SMTP server, used by autodiscover",
305: ),
306: "AutocreateMailAccountOnNewUserFirstLogin" => new SettingsProperty(
307: false,
308: "bool",
309: null,
310: "If true, a new account will be created in the database on first successful login",
311: ),
312: "SieveUseStarttls" => new SettingsProperty(
313: false,
314: "bool",
315: null,
316: "If true, STARTTLS will automatically be used to communicate to Sieve server",
317: ),
318: "DisableStarttlsForLocalhost" => new SettingsProperty(
319: true,
320: "bool",
321: null,
322: "If true, STARTTLS will not be used for a local mailserver",
323: ),
324: "XOriginatingIPHeaderName" => new SettingsProperty(
325: "X-Original-IP",
326: "string",
327: null,
328: "If set, defines a name of header included into outgoing mail, header's value is IP address of the sender",
329: ),
330: "DoImapLoginOnAccountCreate" => new SettingsProperty(
331: true,
332: "bool",
333: null,
334: "If true, logging onto IMAP will be performed when adding a new account in adminpanel",
335: ),
336: "MessagesSortBy" => new SettingsProperty(
337: [
338: "Allow" => false,
339: "List" => [
340: [
341: "SortBy" => "arrival",
342: "LangConst" => "LABEL_SORT_BY_DATE"
343: ],
344: [
345: "SortBy" => "from",
346: "LangConst" => "LABEL_SORT_BY_FROM"
347: ],
348: [
349: "SortBy" => "to",
350: "LangConst" => "LABEL_SORT_BY_TO"
351: ],
352: [
353: "SortBy" => "size",
354: "LangConst" => "LABEL_SORT_BY_SIZE"
355: ],
356: ],
357: "DefaultSortBy" => "arrival",
358: "DefaultSortOrder" => "desc"
359: ],
360: "array",
361: null,
362: "Defines a set of rules for sorting mail",
363: ),
364: "CreateHtmlLinksFromTextLinksInDOM" => new SettingsProperty(
365: false,
366: "bool",
367: null,
368: "If set to true, address@domain texts are replaced with links in HTML; in plaintext, they're always shown as links",
369: ),
370: "SieveCheckScript" => new SettingsProperty(
371: false,
372: "bool",
373: null,
374: "If set, CHECKSCRIPT will be run prior to applying Sieve file changes",
375: ),
376: "MessagesInfoChunkSize" => new SettingsProperty(
377: 1000,
378: "int",
379: null,
380: "No longer used",
381: ),
382: "ExpiredLinkLifetimeMinutes" => new SettingsProperty(
383: 30,
384: "int",
385: null,
386: "Lifetime of link expiration. Reserved for use by alternative frontend clients",
387: ),
388: "AllowUnifiedInbox" => new SettingsProperty(
389: true,
390: "bool",
391: null,
392: "Enables Unified Inbox feature",
393: ),
394: "UseIdentityEmailAsSmtpMailFrom" => new SettingsProperty(
395: true,
396: "bool",
397: null,
398: "If true, email address of the identity will be used in MAIL FROM command to SMTP server, instead of main email address of the account",
399: ),
400: "ImapSendOriginatingIP" => new SettingsProperty(
401: false,
402: "bool",
403: null,
404: "If true, Aurora will send originating IP address in IMAP ID command",
405: ),
406: ];
407: }
408: }
409: