0
|
1 <?php
|
|
2
|
|
3 if (!class_exists('rcmail_install', false) || !is_object($RCI)) {
|
|
4 die("Not allowed! Please open installer/index.php instead.");
|
|
5 }
|
|
6
|
|
7 // register these boolean fields
|
|
8 $RCI->bool_config_props = array(
|
|
9 'ip_check' => 1,
|
|
10 'enable_spellcheck' => 1,
|
|
11 'auto_create_user' => 1,
|
|
12 'smtp_log' => 1,
|
|
13 'prefer_html' => 1,
|
|
14 'debug_level' => 1,
|
|
15 );
|
|
16
|
|
17 // allow the current user to get to the next step
|
|
18 $_SESSION['allowinstaller'] = true;
|
|
19
|
|
20 if (!empty($_POST['submit'])) {
|
|
21 $_SESSION['config'] = $RCI->create_config();
|
|
22
|
|
23 if ($RCI->save_configfile($_SESSION['config'])) {
|
|
24 echo '<p class="notice">The config file was saved successfully into <tt>'.RCMAIL_CONFIG_DIR.'</tt> directory of your Roundcube installation.';
|
|
25
|
|
26 if ($RCI->legacy_config) {
|
|
27 echo '<br/><br/>Afterwards, please <b>remove</b> the old configuration files <tt>main.inc.php</tt> and <tt>db.inc.php</tt> from the config directory.';
|
|
28 }
|
|
29
|
|
30 echo '</p>';
|
|
31 }
|
|
32 else {
|
|
33 if (($dir = sys_get_temp_dir()) && @is_writable($dir)) {
|
|
34 echo '<iframe name="getconfig" style="display:none"></iframe>';
|
|
35 echo '<form id="getconfig_form" action="index.php" method="get" target="getconfig" style="display:none">';
|
|
36 echo '<input name="_getconfig" value="2" /></form>';
|
|
37
|
|
38 $button_txt = html::quote('Save in ' . $dir);
|
|
39 $save_button = ' <input type="button" onclick="document.getElementById(\'getconfig_form\').submit()" value="' . $button_txt . '" />';
|
|
40 }
|
|
41
|
|
42 echo '<p class="notice">Copy or download the following configuration and save it';
|
|
43 echo ' as <tt><b>config.inc.php</b></tt> within the <tt>'.RCUBE_CONFIG_DIR.'</tt> directory of your Roundcube installation.<br/>';
|
|
44 echo ' Make sure that there are no characters outside the <tt><?php ?></tt> brackets when saving the file.';
|
|
45 echo ' <input type="button" onclick="location.href=\'index.php?_getconfig=1\'" value="Download" />';
|
|
46 echo $save_button;
|
|
47
|
|
48 if ($RCI->legacy_config) {
|
|
49 echo '<br/><br/>Afterwards, please <b>remove</b> the old configuration files <tt>main.inc.php</tt> and <tt>db.inc.php</tt> from the config directory.';
|
|
50 }
|
|
51
|
|
52 echo '</p>';
|
|
53
|
|
54 $textbox = new html_textarea(array('rows' => 16, 'cols' => 60, 'class' => "configfile"));
|
|
55 echo $textbox->show(($_SESSION['config']));
|
|
56 }
|
|
57
|
|
58 echo '<p class="hint">Of course there are more options to configure.
|
|
59 Have a look at the defaults.inc.php file or visit <a href="https://github.com/roundcube/roundcubemail/wiki/Configuration" target="_blank">Howto_Config</a> to find out.</p>';
|
|
60
|
|
61 echo '<p><input type="button" onclick="location.href=\'./index.php?_step=3\'" value="CONTINUE" /></p>';
|
|
62
|
|
63 // echo '<style type="text/css"> .configblock { display:none } </style>';
|
|
64 echo "\n<hr style='margin-bottom:1.6em' />\n";
|
|
65 }
|
|
66
|
|
67 ?>
|
|
68 <form action="index.php" method="post">
|
|
69 <input type="hidden" name="_step" value="2" />
|
|
70
|
|
71 <fieldset>
|
|
72 <legend>General configuration</legend>
|
|
73 <dl class="configblock">
|
|
74
|
|
75 <dt class="propname">product_name</dt>
|
|
76 <dd>
|
|
77 <?php
|
|
78
|
|
79 $input_prodname = new html_inputfield(array('name' => '_product_name', 'size' => 30, 'id' => "cfgprodname"));
|
|
80 echo $input_prodname->show($RCI->getprop('product_name'));
|
|
81
|
|
82 ?>
|
|
83 <div>The name of your service (used to compose page titles)</div>
|
|
84 </dd>
|
|
85
|
|
86 <dt class="propname">support_url</dt>
|
|
87 <dd>
|
|
88 <?php
|
|
89
|
|
90 $input_support = new html_inputfield(array('name' => '_support_url', 'size' => 50, 'id' => "cfgsupporturl"));
|
|
91 echo $input_support->show($RCI->getprop('support_url'));
|
|
92
|
|
93 ?>
|
|
94 <div>Provide an URL where a user can get support for this Roundcube installation.<br/>PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!</div>
|
|
95 <p class="hint">Enter an absolute URL (including http://) to a support page/form or a mailto: link.</p>
|
|
96 </dd>
|
|
97
|
|
98 <dt class="propname">skin_logo</dt>
|
|
99 <dd>
|
|
100 <?php
|
|
101
|
|
102 $input_skin = new html_inputfield(array('name' => '_skin_logo', 'size' => 50, 'id' => "cfgskinlogo"));
|
|
103 echo $input_skin->show($RCI->getprop('skin_logo'));
|
|
104
|
|
105 ?>
|
|
106 <div>Custom image to display instead of the Roundcube logo.</div>
|
|
107 <p class="hint">Enter a URL relative to the document root of this Roundcube installation.</p>
|
|
108 </dd>
|
|
109
|
|
110 <dt class="propname">temp_dir</dt>
|
|
111 <dd>
|
|
112 <?php
|
|
113
|
|
114 $input_tempdir = new html_inputfield(array('name' => '_temp_dir', 'size' => 30, 'id' => "cfgtempdir"));
|
|
115 echo $input_tempdir->show($RCI->getprop('temp_dir'));
|
|
116
|
|
117 ?>
|
|
118 <div>Use this folder to store temp files (must be writeable for webserver)</div>
|
|
119 </dd>
|
|
120
|
|
121 <dt class="propname">des_key</dt>
|
|
122 <dd>
|
|
123 <?php
|
|
124
|
|
125 $input_deskey = new html_inputfield(array('name' => '_des_key', 'size' => 30, 'id' => "cfgdeskey"));
|
|
126 echo $input_deskey->show($RCI->getprop('des_key'));
|
|
127
|
|
128 ?>
|
|
129 <div>This key is used to encrypt the users imap password before storing in the session record</div>
|
|
130 <p class="hint">It's a random generated string to ensure that every installation has its own key.</p>
|
|
131 </dd>
|
|
132
|
|
133 <dt class="propname">ip_check</dt>
|
|
134 <dd>
|
|
135 <?php
|
|
136
|
|
137 $check_ipcheck = new html_checkbox(array('name' => '_ip_check', 'id' => "cfgipcheck"));
|
|
138 echo $check_ipcheck->show(intval($RCI->getprop('ip_check')), array('value' => 1));
|
|
139
|
|
140 ?>
|
|
141 <label for="cfgipcheck">Check client IP in session authorization</label><br />
|
|
142
|
|
143 <p class="hint">This increases security but can cause sudden logouts when someone uses a proxy with changing IPs.</p>
|
|
144 </dd>
|
|
145
|
|
146
|
|
147 <dt class="propname">enable_spellcheck</dt>
|
|
148 <dd>
|
|
149 <?php
|
|
150 $check_spell = new html_checkbox(array('name' => '_enable_spellcheck', 'id' => "cfgspellcheck"));
|
|
151 echo $check_spell->show(intval($RCI->getprop('enable_spellcheck')), array('value' => 1));
|
|
152 ?>
|
|
153 <label for="cfgspellcheck">Make use of the spell checker</label><br />
|
|
154 </dd>
|
|
155
|
|
156 <dt class="propname">spellcheck_engine</dt>
|
|
157 <dd>
|
|
158 <?php
|
|
159 $select_spell = new html_select(array('name' => '_spellcheck_engine', 'id' => "cfgspellcheckengine"));
|
|
160 if (extension_loaded('pspell'))
|
|
161 $select_spell->add('Pspell', 'pspell');
|
|
162 if (extension_loaded('enchant'))
|
|
163 $select_spell->add('Enchant', 'enchant');
|
|
164 $select_spell->add('Googie', 'googie');
|
|
165 $select_spell->add('ATD', 'atd');
|
|
166
|
|
167 echo $select_spell->show($RCI->is_post ? $_POST['_spellcheck_engine'] : 'pspell');
|
|
168
|
|
169 ?>
|
|
170 <label for="cfgspellcheckengine">Which spell checker to use</label><br />
|
|
171
|
|
172 <p class="hint">Googie implies that the message content will be sent to external server to check the spelling.</p>
|
|
173 </dd>
|
|
174
|
|
175 <dt class="propname">identities_level</dt>
|
|
176 <dd>
|
|
177 <?php
|
|
178
|
|
179 $input_ilevel = new html_select(array('name' => '_identities_level', 'id' => "cfgidentitieslevel"));
|
|
180 $input_ilevel->add('many identities with possibility to edit all params', 0);
|
|
181 $input_ilevel->add('many identities with possibility to edit all params but not email address', 1);
|
|
182 $input_ilevel->add('one identity with possibility to edit all params', 2);
|
|
183 $input_ilevel->add('one identity with possibility to edit all params but not email address', 3);
|
|
184 $input_ilevel->add('one identity with possibility to edit only signature', 4);
|
|
185 echo $input_ilevel->show($RCI->getprop('identities_level'), 0);
|
|
186
|
|
187 ?>
|
|
188 <div>Level of identities access</div>
|
|
189 <p class="hint">Defines what users can do with their identities.</p>
|
|
190 </dd>
|
|
191
|
|
192 </dl>
|
|
193 </fieldset>
|
|
194
|
|
195 <fieldset>
|
|
196 <legend>Logging & Debugging</legend>
|
|
197 <dl class="loggingblock">
|
|
198
|
|
199 <dt class="propname">debug_level</dt>
|
|
200 <dd>
|
|
201 <?php
|
|
202
|
|
203 $value = $RCI->getprop('debug_level');
|
|
204 $check_debug = new html_checkbox(array('name' => '_debug_level[]'));
|
|
205 echo $check_debug->show(($value & 1) ? 1 : 0 , array('value' => 1, 'id' => 'cfgdebug1'));
|
|
206 echo '<label for="cfgdebug1">Log errors</label><br />';
|
|
207
|
|
208 echo $check_debug->show(($value & 4) ? 4 : 0, array('value' => 4, 'id' => 'cfgdebug4'));
|
|
209 echo '<label for="cfgdebug4">Print errors (to the browser)</label><br />';
|
|
210
|
|
211 ?>
|
|
212 </dd>
|
|
213
|
|
214 <dt class="propname">log_driver</dt>
|
|
215 <dd>
|
|
216 <?php
|
|
217
|
|
218 $select_log_driver = new html_select(array('name' => '_log_driver', 'id' => "cfglogdriver"));
|
|
219 $select_log_driver->add(array('file', 'syslog', 'stdout'), array('file', 'syslog', 'stdout'));
|
|
220 echo $select_log_driver->show($RCI->getprop('log_driver', 'file'));
|
|
221
|
|
222 ?>
|
|
223 <div>How to do logging? 'file' - write to files in the log directory, 'syslog' - use the syslog facility, 'stdout' writes to the process' STDOUT file descriptor.</div>
|
|
224 </dd>
|
|
225
|
|
226 <dt class="propname">log_dir</dt>
|
|
227 <dd>
|
|
228 <?php
|
|
229
|
|
230 $input_logdir = new html_inputfield(array('name' => '_log_dir', 'size' => 30, 'id' => "cfglogdir"));
|
|
231 echo $input_logdir->show($RCI->getprop('log_dir'));
|
|
232
|
|
233 ?>
|
|
234 <div>Use this folder to store log files (must be writeable for webserver). Note that this only applies if you are using the 'file' log_driver.</div>
|
|
235 </dd>
|
|
236
|
|
237 <dt class="propname">syslog_id</dt>
|
|
238 <dd>
|
|
239 <?php
|
|
240
|
|
241 $input_syslogid = new html_inputfield(array('name' => '_syslog_id', 'size' => 30, 'id' => "cfgsyslogid"));
|
|
242 echo $input_syslogid->show($RCI->getprop('syslog_id', 'roundcube'));
|
|
243
|
|
244 ?>
|
|
245 <div>What ID to use when logging with syslog. Note that this only applies if you are using the 'syslog' log_driver.</div>
|
|
246 </dd>
|
|
247
|
|
248 <dt class="propname">syslog_facility</dt>
|
|
249 <dd>
|
|
250 <?php
|
|
251
|
|
252 $input_syslogfacility = new html_select(array('name' => '_syslog_facility', 'id' => "cfgsyslogfacility"));
|
|
253 $input_syslogfacility->add('user-level messages', LOG_USER);
|
|
254 $input_syslogfacility->add('mail subsystem', LOG_MAIL);
|
|
255 $input_syslogfacility->add('local level 0', LOG_LOCAL0);
|
|
256 $input_syslogfacility->add('local level 1', LOG_LOCAL1);
|
|
257 $input_syslogfacility->add('local level 2', LOG_LOCAL2);
|
|
258 $input_syslogfacility->add('local level 3', LOG_LOCAL3);
|
|
259 $input_syslogfacility->add('local level 4', LOG_LOCAL4);
|
|
260 $input_syslogfacility->add('local level 5', LOG_LOCAL5);
|
|
261 $input_syslogfacility->add('local level 6', LOG_LOCAL6);
|
|
262 $input_syslogfacility->add('local level 7', LOG_LOCAL7);
|
|
263 echo $input_syslogfacility->show($RCI->getprop('syslog_facility'), LOG_USER);
|
|
264
|
|
265 ?>
|
|
266 <div>What ID to use when logging with syslog. Note that this only applies if you are using the 'syslog' log_driver.</div>
|
|
267 </dd>
|
|
268
|
|
269
|
|
270
|
|
271
|
|
272 </dl>
|
|
273 </fieldset>
|
|
274
|
|
275
|
|
276 <fieldset>
|
|
277 <legend>Database setup</legend>
|
|
278 <dl class="configblock" id="cgfblockdb">
|
|
279 <dt class="propname">db_dsnw</dt>
|
|
280 <dd>
|
|
281 <p>Database settings for read/write operations:</p>
|
|
282 <?php
|
|
283
|
|
284 $select_dbtype = new html_select(array('name' => '_dbtype', 'id' => "cfgdbtype"));
|
|
285 foreach ($RCI->supported_dbs as $database => $ext) {
|
|
286 if (extension_loaded($ext)) {
|
|
287 $select_dbtype->add($database, substr($ext, 4));
|
|
288 }
|
|
289 }
|
|
290
|
|
291 $input_dbhost = new html_inputfield(array('name' => '_dbhost', 'size' => 20, 'id' => "cfgdbhost"));
|
|
292 $input_dbname = new html_inputfield(array('name' => '_dbname', 'size' => 20, 'id' => "cfgdbname"));
|
|
293 $input_dbuser = new html_inputfield(array('name' => '_dbuser', 'size' => 20, 'id' => "cfgdbuser"));
|
|
294 $input_dbpass = new html_inputfield(array('name' => '_dbpass', 'size' => 20, 'id' => "cfgdbpass"));
|
|
295
|
|
296 $dsnw = rcube_db::parse_dsn($RCI->getprop('db_dsnw'));
|
|
297
|
|
298 echo $select_dbtype->show($RCI->is_post ? $_POST['_dbtype'] : $dsnw['phptype']);
|
|
299 echo '<label for="cfgdbtype">Database type</label><br />';
|
|
300 echo $input_dbhost->show($RCI->is_post ? $_POST['_dbhost'] : $dsnw['hostspec']);
|
|
301 echo '<label for="cfgdbhost">Database server (omit for sqlite)</label><br />';
|
|
302 echo $input_dbname->show($RCI->is_post ? $_POST['_dbname'] : $dsnw['database']);
|
|
303 echo '<label for="cfgdbname">Database name (use absolute path and filename for sqlite)</label><br />';
|
|
304 echo $input_dbuser->show($RCI->is_post ? $_POST['_dbuser'] : $dsnw['username']);
|
|
305 echo '<label for="cfgdbuser">Database user name (needs write permissions)(omit for sqlite)</label><br />';
|
|
306 echo $input_dbpass->show($RCI->is_post ? $_POST['_dbpass'] : $dsnw['password']);
|
|
307 echo '<label for="cfgdbpass">Database password (omit for sqlite)</label><br />';
|
|
308
|
|
309 ?>
|
|
310 </dd>
|
|
311
|
|
312 <dt class="propname">db_prefix</dt>
|
|
313 <dd>
|
|
314 <?php
|
|
315
|
|
316 $input_prefix = new html_inputfield(array('name' => '_db_prefix', 'size' => 20, 'id' => "cfgdbprefix"));
|
|
317 echo $input_prefix->show($RCI->getprop('db_prefix'));
|
|
318
|
|
319 ?>
|
|
320 <div>Optional prefix that will be added to database object names (tables and sequences).</div>
|
|
321 </dd>
|
|
322
|
|
323 </dl>
|
|
324 </fieldset>
|
|
325
|
|
326
|
|
327 <fieldset>
|
|
328 <legend>IMAP Settings</legend>
|
|
329 <dl class="configblock" id="cgfblockimap">
|
|
330 <dt class="propname">default_host</dt>
|
|
331 <dd>
|
|
332 <div>The IMAP host(s) chosen to perform the log-in</div>
|
|
333 <div id="defaulthostlist">
|
|
334 <?php
|
|
335
|
|
336 $text_imaphost = new html_inputfield(array('name' => '_default_host[]', 'size' => 30));
|
|
337 $default_hosts = $RCI->get_hostlist();
|
|
338
|
|
339 if (empty($default_hosts))
|
|
340 $default_hosts = array('');
|
|
341
|
|
342 $i = 0;
|
|
343 foreach ($default_hosts as $host) {
|
|
344 echo '<div id="defaulthostentry'.$i.'">' . $text_imaphost->show($host);
|
|
345 if ($i++ > 0)
|
|
346 echo '<a href="#" onclick="removehostfield(this.parentNode);return false" class="removelink" title="Remove this entry">remove</a>';
|
|
347 echo '</div>';
|
|
348 }
|
|
349
|
|
350 ?>
|
|
351 </div>
|
|
352 <div><a href="javascript:addhostfield()" class="addlink" title="Add another field">add</a></div>
|
|
353
|
|
354 <p class="hint">Leave blank to show a textbox at login. To use SSL/IMAPS connection, type ssl://hostname</p>
|
|
355 </dd>
|
|
356
|
|
357 <dt class="propname">default_port</dt>
|
|
358 <dd>
|
|
359 <?php
|
|
360
|
|
361 $text_imapport = new html_inputfield(array('name' => '_default_port', 'size' => 6, 'id' => "cfgimapport"));
|
|
362 echo $text_imapport->show($RCI->getprop('default_port'));
|
|
363
|
|
364 ?>
|
|
365 <div>TCP port used for IMAP connections</div>
|
|
366 </dd>
|
|
367
|
|
368 <dt class="propname">username_domain</dt>
|
|
369 <dd>
|
|
370 <?php
|
|
371
|
|
372 $text_userdomain = new html_inputfield(array('name' => '_username_domain', 'size' => 30, 'id' => "cfguserdomain"));
|
|
373 echo $text_userdomain->show($RCI->getprop('username_domain'));
|
|
374
|
|
375 ?>
|
|
376 <div>Automatically add this domain to user names for login</div>
|
|
377
|
|
378 <p class="hint">Only for IMAP servers that require full e-mail addresses for login</p>
|
|
379 </dd>
|
|
380
|
|
381 <dt class="propname">auto_create_user</dt>
|
|
382 <dd>
|
|
383 <?php
|
|
384
|
|
385 $check_autocreate = new html_checkbox(array('name' => '_auto_create_user', 'id' => "cfgautocreate"));
|
|
386 echo $check_autocreate->show(intval($RCI->getprop('auto_create_user')), array('value' => 1));
|
|
387
|
|
388 ?>
|
|
389 <label for="cfgautocreate">Automatically create a new Roundcube user when log-in the first time</label><br />
|
|
390
|
|
391 <p class="hint">A user is authenticated by the IMAP server but it requires a local record to store settings
|
|
392 and contacts. With this option enabled a new user record will automatically be created once the IMAP login succeeds.</p>
|
|
393
|
|
394 <p class="hint">If this option is disabled, the login only succeeds if there's a matching user-record in the local Roundcube database
|
|
395 what means that you have to create those records manually or disable this option after the first login.</p>
|
|
396 </dd>
|
|
397
|
|
398 <dt class="propname">sent_mbox</dt>
|
|
399 <dd>
|
|
400 <?php
|
|
401
|
|
402 $text_sentmbox = new html_inputfield(array('name' => '_sent_mbox', 'size' => 20, 'id' => "cfgsentmbox"));
|
|
403 echo $text_sentmbox->show($RCI->getprop('sent_mbox'));
|
|
404
|
|
405 ?>
|
|
406 <div>Store sent messages in this folder</div>
|
|
407
|
|
408 <p class="hint">Leave blank if sent messages should not be stored. Note: folder must include namespace prefix if any.</p>
|
|
409 </dd>
|
|
410
|
|
411 <dt class="propname">trash_mbox</dt>
|
|
412 <dd>
|
|
413 <?php
|
|
414
|
|
415 $text_trashmbox = new html_inputfield(array('name' => '_trash_mbox', 'size' => 20, 'id' => "cfgtrashmbox"));
|
|
416 echo $text_trashmbox->show($RCI->getprop('trash_mbox'));
|
|
417
|
|
418 ?>
|
|
419 <div>Move messages to this folder when deleting them</div>
|
|
420
|
|
421 <p class="hint">Leave blank if they should be deleted directly. Note: folder must include namespace prefix if any.</p>
|
|
422 </dd>
|
|
423
|
|
424 <dt class="propname">drafts_mbox</dt>
|
|
425 <dd>
|
|
426 <?php
|
|
427
|
|
428 $text_draftsmbox = new html_inputfield(array('name' => '_drafts_mbox', 'size' => 20, 'id' => "cfgdraftsmbox"));
|
|
429 echo $text_draftsmbox->show($RCI->getprop('drafts_mbox'));
|
|
430
|
|
431 ?>
|
|
432 <div>Store draft messages in this folder</div>
|
|
433
|
|
434 <p class="hint">Leave blank if they should not be stored. Note: folder must include namespace prefix if any.</p>
|
|
435 </dd>
|
|
436
|
|
437 <dt class="propname">junk_mbox</dt>
|
|
438 <dd>
|
|
439 <?php
|
|
440
|
|
441 $text_junkmbox = new html_inputfield(array('name' => '_junk_mbox', 'size' => 20, 'id' => "cfgjunkmbox"));
|
|
442 echo $text_junkmbox->show($RCI->getprop('junk_mbox'));
|
|
443
|
|
444 ?>
|
|
445 <div>Store spam messages in this folder</div>
|
|
446
|
|
447 <p class="hint">Note: folder must include namespace prefix if any.</p>
|
|
448 </dd>
|
|
449
|
|
450 </dd>
|
|
451 </dl>
|
|
452 </fieldset>
|
|
453
|
|
454
|
|
455 <fieldset>
|
|
456 <legend>SMTP Settings</legend>
|
|
457 <dl class="configblock" id="cgfblocksmtp">
|
|
458 <dt class="propname">smtp_server</dt>
|
|
459 <dd>
|
|
460 <?php
|
|
461
|
|
462 $text_smtphost = new html_inputfield(array('name' => '_smtp_server', 'size' => 30, 'id' => "cfgsmtphost"));
|
|
463 echo $text_smtphost->show($RCI->getprop('smtp_server', 'localhost'));
|
|
464
|
|
465 ?>
|
|
466 <div>Use this host for sending mails</div>
|
|
467
|
|
468 <p class="hint">To use SSL connection, set ssl://smtp.host.com.</p>
|
|
469 </dd>
|
|
470
|
|
471 <dt class="propname">smtp_port</dt>
|
|
472 <dd>
|
|
473 <?php
|
|
474
|
|
475 $text_smtpport = new html_inputfield(array('name' => '_smtp_port', 'size' => 6, 'id' => "cfgsmtpport"));
|
|
476 echo $text_smtpport->show($RCI->getprop('smtp_port'));
|
|
477
|
|
478 ?>
|
|
479 <div>SMTP port (default is 25; 465 for SSL; 587 for submission)</div>
|
|
480 </dd>
|
|
481
|
|
482 <dt class="propname">smtp_user/smtp_pass</dt>
|
|
483 <dd>
|
|
484 <?php
|
|
485
|
|
486 $text_smtpuser = new html_inputfield(array('name' => '_smtp_user', 'size' => 20, 'id' => "cfgsmtpuser"));
|
|
487 $text_smtppass = new html_inputfield(array('name' => '_smtp_pass', 'size' => 20, 'id' => "cfgsmtppass"));
|
|
488 echo $text_smtpuser->show($RCI->getprop('smtp_user'));
|
|
489 echo $text_smtppass->show($RCI->getprop('smtp_pass'));
|
|
490
|
|
491 ?>
|
|
492 <div>SMTP username and password (if required)</div>
|
|
493 <p>
|
|
494 <?php
|
|
495
|
|
496 $check_smtpuser = new html_checkbox(array('name' => '_smtp_user_u', 'id' => "cfgsmtpuseru"));
|
|
497 echo $check_smtpuser->show($RCI->getprop('smtp_user') == '%u' || $_POST['_smtp_user_u'] ? 1 : 0, array('value' => 1));
|
|
498
|
|
499 ?>
|
|
500 <label for="cfgsmtpuseru">Use the current IMAP username and password for SMTP authentication</label>
|
|
501 </p>
|
|
502 </dd>
|
|
503 <!--
|
|
504 <dt class="propname">smtp_auth_type</dt>
|
|
505 <dd>
|
|
506 <?php
|
|
507 /*
|
|
508 $select_smtpauth = new html_select(array('name' => '_smtp_auth_type', 'id' => "cfgsmtpauth"));
|
|
509 $select_smtpauth->add(array('(auto)', 'PLAIN', 'DIGEST-MD5', 'CRAM-MD5', 'LOGIN'), array('0', 'PLAIN', 'DIGEST-MD5', 'CRAM-MD5', 'LOGIN'));
|
|
510 echo $select_smtpauth->show(intval($RCI->getprop('smtp_auth_type')));
|
|
511 */
|
|
512 ?>
|
|
513 <div>Method to authenticate at the SMTP server. Choose (auto) if you don't know what this is</div>
|
|
514 </dd>
|
|
515 -->
|
|
516 <dt class="propname">smtp_log</dt>
|
|
517 <dd>
|
|
518 <?php
|
|
519
|
|
520 $check_smtplog = new html_checkbox(array('name' => '_smtp_log', 'id' => "cfgsmtplog"));
|
|
521 echo $check_smtplog->show(intval($RCI->getprop('smtp_log')), array('value' => 1));
|
|
522
|
|
523 ?>
|
|
524 <label for="cfgsmtplog">Log sent messages in <tt>{log_dir}/sendmail</tt> or to syslog.</label><br />
|
|
525 </dd>
|
|
526
|
|
527 </dl>
|
|
528 </fieldset>
|
|
529
|
|
530
|
|
531 <fieldset>
|
|
532 <legend>Display settings & user prefs</legend>
|
|
533 <dl class="configblock" id="cgfblockdisplay">
|
|
534
|
|
535 <dt class="propname">language <span class="userconf">*</span></dt>
|
|
536 <dd>
|
|
537 <?php
|
|
538
|
|
539 $input_locale = new html_inputfield(array('name' => '_language', 'size' => 6, 'id' => "cfglocale"));
|
|
540 echo $input_locale->show($RCI->getprop('language'));
|
|
541
|
|
542 ?>
|
|
543 <div>The default locale setting. This also defines the language of the login screen.<br/>Leave it empty to auto-detect the user agent language.</div>
|
|
544 <p class="hint">Enter a <a href="http://www.faqs.org/rfcs/rfc1766">RFC1766</a> formatted language name. Examples: en_US, de_DE, de_CH, fr_FR, pt_BR</p>
|
|
545 </dd>
|
|
546
|
|
547 <dt class="propname">skin <span class="userconf">*</span></dt>
|
|
548 <dd>
|
|
549 <?php
|
|
550
|
|
551 $input_skin = new html_select(array('name' => '_skin', 'id' => "cfgskin"));
|
|
552 $input_skin->add($RCI->list_skins());
|
|
553 echo $input_skin->show($RCI->getprop('skin'));
|
|
554
|
|
555 ?>
|
|
556 <div>Name of interface skin (folder in /skins)</div>
|
|
557 </dd>
|
|
558
|
|
559 <dt class="propname">mail_pagesize <span class="userconf">*</span></dt>
|
|
560 <dd>
|
|
561 <?php
|
|
562
|
|
563 $pagesize = $RCI->getprop('mail_pagesize');
|
|
564 if (!$pagesize) {
|
|
565 $pagesize = $RCI->getprop('pagesize');
|
|
566 }
|
|
567 $input_pagesize = new html_inputfield(array('name' => '_mail_pagesize', 'size' => 6, 'id' => "cfgmailpagesize"));
|
|
568 echo $input_pagesize->show($pagesize);
|
|
569
|
|
570 ?>
|
|
571 <div>Show up to X items in the mail messages list view.</div>
|
|
572 </dd>
|
|
573
|
|
574 <dt class="propname">addressbook_pagesize <span class="userconf">*</span></dt>
|
|
575 <dd>
|
|
576 <?php
|
|
577
|
|
578 $pagesize = $RCI->getprop('addressbook_pagesize');
|
|
579 if (!$pagesize) {
|
|
580 $pagesize = $RCI->getprop('pagesize');
|
|
581 }
|
|
582 $input_pagesize = new html_inputfield(array('name' => '_addressbook_pagesize', 'size' => 6, 'id' => "cfgabookpagesize"));
|
|
583 echo $input_pagesize->show($pagesize);
|
|
584
|
|
585 ?>
|
|
586 <div>Show up to X items in the contacts list view.</div>
|
|
587 </dd>
|
|
588
|
|
589 <dt class="propname">prefer_html <span class="userconf">*</span></dt>
|
|
590 <dd>
|
|
591 <?php
|
|
592
|
|
593 $check_htmlview = new html_checkbox(array('name' => '_prefer_html', 'id' => "cfghtmlview", 'value' => 1));
|
|
594 echo $check_htmlview->show(intval($RCI->getprop('prefer_html')));
|
|
595
|
|
596 ?>
|
|
597 <label for="cfghtmlview">Prefer displaying HTML messages</label><br />
|
|
598 </dd>
|
|
599
|
|
600 <dt class="propname">htmleditor <span class="userconf">*</span></dt>
|
|
601 <dd>
|
|
602 <label for="cfghtmlcompose">Compose HTML formatted messages</label>
|
|
603 <?php
|
|
604
|
|
605 $select_htmlcomp = new html_select(array('name' => '_htmleditor', 'id' => "cfghtmlcompose"));
|
|
606 $select_htmlcomp->add('never', 0);
|
|
607 $select_htmlcomp->add('always', 1);
|
|
608 $select_htmlcomp->add('on reply to HTML message only', 2);
|
|
609 echo $select_htmlcomp->show(intval($RCI->getprop('htmleditor')));
|
|
610
|
|
611 ?>
|
|
612 </dd>
|
|
613
|
|
614 <dt class="propname">draft_autosave <span class="userconf">*</span></dt>
|
|
615 <dd>
|
|
616 <label for="cfgautosave">Save compose message every</label>
|
|
617 <?php
|
|
618
|
|
619 $select_autosave = new html_select(array('name' => '_draft_autosave', 'id' => 'cfgautosave'));
|
|
620 $select_autosave->add('never', 0);
|
|
621 foreach (array(1, 3, 5, 10) as $i => $min)
|
|
622 $select_autosave->add("$min min", $min*60);
|
|
623
|
|
624 echo $select_autosave->show(intval($RCI->getprop('draft_autosave')));
|
|
625
|
|
626 ?>
|
|
627 </dd>
|
|
628
|
|
629 <dt class="propname">mdn_requests <span class="userconf">*</span></dt>
|
|
630 <dd>
|
|
631 <?php
|
|
632
|
|
633 $mdn_opts = array(
|
|
634 0 => 'ask the user',
|
|
635 1 => 'send automatically',
|
|
636 3 => 'send receipt to user contacts, otherwise ask the user',
|
|
637 4 => 'send receipt to user contacts, otherwise ignore',
|
|
638 2 => 'ignore',
|
|
639 );
|
|
640
|
|
641 $select_mdnreq = new html_select(array('name' => '_mdn_requests', 'id' => "cfgmdnreq"));
|
|
642 $select_mdnreq->add(array_values($mdn_opts), array_keys($mdn_opts));
|
|
643 echo $select_mdnreq->show(intval($RCI->getprop('mdn_requests')));
|
|
644
|
|
645 ?>
|
|
646 <div>Behavior if a received message requests a message delivery notification (read receipt)</div>
|
|
647 </dd>
|
|
648
|
|
649 <dt class="propname">mime_param_folding <span class="userconf">*</span></dt>
|
|
650 <dd>
|
|
651 <?php
|
|
652
|
|
653 $select_param_folding = new html_select(array('name' => '_mime_param_folding', 'id' => "cfgmimeparamfolding"));
|
|
654 $select_param_folding->add('Full RFC 2231 (Roundcube, Thunderbird)', '0');
|
|
655 $select_param_folding->add('RFC 2047/2231 (MS Outlook, OE)', '1');
|
|
656 $select_param_folding->add('Full RFC 2047 (deprecated)', '2');
|
|
657
|
|
658 echo $select_param_folding->show(strval($RCI->getprop('mime_param_folding')));
|
|
659
|
|
660 ?>
|
|
661 <div>How to encode attachment long/non-ascii names</div>
|
|
662 </dd>
|
|
663
|
|
664 </dl>
|
|
665
|
|
666 <p class="hint"><span class="userconf">*</span> These settings are defaults for the user preferences</p>
|
|
667 </fieldset>
|
|
668
|
|
669
|
|
670 <fieldset>
|
|
671 <legend>Plugins</legend>
|
|
672 <dl class="configblock" id="cgfblockdisplay">
|
|
673
|
|
674 <?php
|
|
675 $plugins = $RCI->list_plugins();
|
|
676 foreach ($plugins as $p) {
|
|
677 $p_check = new html_checkbox(array('name' => '_plugins_'.$p['name'], 'id' => 'cfgplugin_'.$p['name'], 'value' => $p['name']));
|
|
678 echo '<dt class="propname"><label>';
|
|
679 echo $p_check->show($p['enabled'] ? $p['name'] : 0);
|
|
680 echo ' ' . $p['name'] . '</label></dt><dd>';
|
|
681 echo '<label for="cfgplugin_'.$p['name'].'" class="hint">' . $p['desc'] . '</label><br/></dd>';
|
|
682 }
|
|
683
|
|
684 ?>
|
|
685 </dl>
|
|
686
|
|
687 <p class="hint">Please consider checking dependencies of enabled plugins</p>
|
|
688 </fieldset>
|
|
689
|
|
690 <?php
|
|
691
|
|
692 echo '<p><input type="submit" name="submit" value="' . ($RCI->configured ? 'UPDATE' : 'CREATE') . ' CONFIG" ' . ($RCI->failures ? 'disabled' : '') . ' /></p>';
|
|
693
|
|
694 ?>
|
|
695 </form>
|