Thomas Bruederli
2013-06-28 d6707475ccf0462849309ac1ab902d37b72c4ff9
commit | author | age
acc005 1 <?php
AM 2
3 /*
4  +-----------------------------------------------------------------------+
5  | Main configuration file with default settings                         |
6  |                                                                       |
7  | This file is part of the Roundcube Webmail client                     |
8  | Copyright (C) 2005-2013, The Roundcube Dev Team                       |
9  |                                                                       |
10  | Licensed under the GNU General Public License version 3 or            |
11  | any later version with exceptions for skins & plugins.                |
12  | See the README file for a full license statement.                     |
13  +-----------------------------------------------------------------------+
14 */
15
16 $config = array();
17
18 // ----------------------------------
19 // SQL DATABASE
20 // ----------------------------------
21
22 // Database connection string (DSN) for read+write operations
23 // Format (compatible with PEAR MDB2): db_provider://user:password@host/database
24 // Currently supported db_providers: mysql, pgsql, sqlite, mssql or sqlsrv
25 // For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php
26 // NOTE: for SQLite use absolute path: 'sqlite:////full/path/to/sqlite.db?mode=0646'
27 $config['db_dsnw'] = 'mysql://roundcube:pass@localhost/roundcubemail';
28
29 // Database DSN for read-only operations (if empty write database will be used)
30 // useful for database replication
31 $config['db_dsnr'] = '';
32
33 // use persistent db-connections
34 // beware this will not "always" work as expected
35 // see: http://www.php.net/manual/en/features.persistent-connections.php
36 $config['db_persistent'] = false;
37
38 // you can define specific table (and sequence) names prefix
39 $config['db_prefix'] = '';
40
41
42 // ----------------------------------
43 // LOGGING/DEBUGGING
44 // ----------------------------------
45
46 // system error reporting, sum of: 1 = log; 4 = show, 8 = trace
47 $config['debug_level'] = 1;
48
49 // log driver:  'syslog' or 'file'.
50 $config['log_driver'] = 'file';
51
52 // date format for log entries
53 // (read http://php.net/manual/en/function.date.php for all format characters)  
54 $config['log_date_format'] = 'd-M-Y H:i:s O';
55
56 // Syslog ident string to use, if using the 'syslog' log driver.
57 $config['syslog_id'] = 'roundcube';
58
59 // Syslog facility to use, if using the 'syslog' log driver.
60 // For possible values see installer or http://php.net/manual/en/function.openlog.php
61 $config['syslog_facility'] = LOG_USER;
62
63 // Log sent messages to <log_dir>/sendmail or to syslog
64 $config['smtp_log'] = true;
65
66 // Log successful logins to <log_dir>/userlogins or to syslog
67 $config['log_logins'] = false;
68
69 // Log session authentication errors to <log_dir>/session or to syslog
70 $config['log_session'] = false;
71
72 // Log SQL queries to <log_dir>/sql or to syslog
73 $config['sql_debug'] = false;
74
75 // Log IMAP conversation to <log_dir>/imap or to syslog
76 $config['imap_debug'] = false;
77
78 // Log LDAP conversation to <log_dir>/ldap or to syslog
79 $config['ldap_debug'] = false;
80
81 // Log SMTP conversation to <log_dir>/smtp or to syslog
82 $config['smtp_debug'] = false;
83
84 // ----------------------------------
85 // IMAP
86 // ----------------------------------
87
88 // The mail host chosen to perform the log-in.
89 // Leave blank to show a textbox at login, give a list of hosts
90 // to display a pulldown menu or set one host as string.
91 // To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
92 // Supported replacement variables:
93 // %n - hostname ($_SERVER['SERVER_NAME'])
94 // %t - hostname without the first part
95 // %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
96 // %s - domain name after the '@' from e-mail address provided at login screen
97 // For example %n = mail.domain.tld, %t = domain.tld
98 // WARNING: After hostname change update of mail_host column in users table is
99 //          required to match old user data records with the new host.
100 $config['default_host'] = '';
101
102 // TCP port used for IMAP connections
103 $config['default_port'] = 143;
104
105 // IMAP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or null to use
106 // best server supported one)
107 $config['imap_auth_type'] = null;
108
109 // If you know your imap's folder delimiter, you can specify it here.
110 // Otherwise it will be determined automatically
111 $config['imap_delimiter'] = null;
112
113 // If IMAP server doesn't support NAMESPACE extension, but you're
114 // using shared folders or personal root folder is non-empty, you'll need to
115 // set these options. All can be strings or arrays of strings.
116 // Folders need to be ended with directory separator, e.g. "INBOX."
117 // (special directory "~" is an exception to this rule)
118 // These can be used also to overwrite server's namespaces
119 $config['imap_ns_personal'] = null;
120 $config['imap_ns_other']    = null;
121 $config['imap_ns_shared']   = null;
122
123 // By default IMAP capabilities are readed after connection to IMAP server
124 // In some cases, e.g. when using IMAP proxy, there's a need to refresh the list
125 // after login. Set to True if you've got this case.
126 $config['imap_force_caps'] = false;
127
128 // By default list of subscribed folders is determined using LIST-EXTENDED
129 // extension if available. Some servers (dovecot 1.x) returns wrong results
130 // for shared namespaces in this case. http://trac.roundcube.net/ticket/1486225
131 // Enable this option to force LSUB command usage instead.
132 $config['imap_force_lsub'] = false;
133
134 // Some server configurations (e.g. Courier) doesn't list folders in all namespaces
135 // Enable this option to force listing of folders in all namespaces
136 $config['imap_force_ns'] = false;
137
138 // IMAP connection timeout, in seconds. Default: 0 (no limit)
139 $config['imap_timeout'] = 0;
140
141 // Optional IMAP authentication identifier to be used as authorization proxy
142 $config['imap_auth_cid'] = null;
143
144 // Optional IMAP authentication password to be used for imap_auth_cid
145 $config['imap_auth_pw'] = null;
146
147 // Type of IMAP indexes cache. Supported values: 'db', 'apc' and 'memcache'.
148 $config['imap_cache'] = null;
149
150 // Enables messages cache. Only 'db' cache is supported.
151 $config['messages_cache'] = false;
152
153 // Lifetime of IMAP indexes cache. Possible units: s, m, h, d, w
154 $config['imap_cache_ttl'] = '10d';
155
156 // Lifetime of messages cache. Possible units: s, m, h, d, w
157 $config['messages_cache_ttl'] = '10d';
158
159 // ----------------------------------
160 // SMTP
161 // ----------------------------------
162
163 // SMTP server host (for sending mails).
164 // To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
165 // If left blank, the PHP mail() function is used
166 // Supported replacement variables:
167 // %h - user's IMAP hostname
168 // %n - hostname ($_SERVER['SERVER_NAME'])
169 // %t - hostname without the first part
170 // %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
171 // %z - IMAP domain (IMAP hostname without the first part)
172 // For example %n = mail.domain.tld, %t = domain.tld
173 $config['smtp_server'] = '';
174
175 // SMTP port (default is 25; use 587 for STARTTLS or 465 for the
176 // deprecated SSL over SMTP (aka SMTPS))
177 $config['smtp_port'] = 25;
178
179 // SMTP username (if required) if you use %u as the username Roundcube
180 // will use the current username for login
181 $config['smtp_user'] = '';
182
183 // SMTP password (if required) if you use %p as the password Roundcube
184 // will use the current user's password for login
185 $config['smtp_pass'] = '';
186
187 // SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
188 // best server supported one)
189 $config['smtp_auth_type'] = '';
190
191 // Optional SMTP authentication identifier to be used as authorization proxy
192 $config['smtp_auth_cid'] = null;
193
194 // Optional SMTP authentication password to be used for smtp_auth_cid
195 $config['smtp_auth_pw'] = null;
196
197 // SMTP HELO host 
198 // Hostname to give to the remote server for SMTP 'HELO' or 'EHLO' messages 
199 // Leave this blank and you will get the server variable 'server_name' or 
200 // localhost if that isn't defined.
201 $config['smtp_helo_host'] = '';
202
203 // SMTP connection timeout, in seconds. Default: 0 (no limit)
204 $config['smtp_timeout'] = 0;
205
206 // ----------------------------------
207 // LDAP
208 // ----------------------------------
209
210 // Type of LDAP cache. Supported values: 'db', 'apc' and 'memcache'.
211 $config['ldap_cache'] = 'db';
212
213 // Lifetime of LDAP cache. Possible units: s, m, h, d, w
214 $config['ldap_cache_ttl'] = '10m';
215
216 // ----------------------------------
217 // SYSTEM
218 // ----------------------------------
219
220 // THIS OPTION WILL ALLOW THE INSTALLER TO RUN AND CAN EXPOSE SENSITIVE CONFIG DATA.
221 // ONLY ENABLE IT IF YOU'RE REALLY SURE WHAT YOU'RE DOING!
222 $config['enable_installer'] = false;
223
224 // don't allow these settings to be overriden by the user
225 $config['dont_override'] = array();
226
227 // provide an URL where a user can get support for this Roundcube installation
228 // PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!
229 $config['support_url'] = '';
230
231 // replace Roundcube logo with this image
232 // specify an URL relative to the document root of this Roundcube installation
233 $config['skin_logo'] = null;
234
235 // automatically create a new Roundcube user when log-in the first time.
236 // a new user will be created once the IMAP login succeeds.
237 // set to false if only registered users can use this service
238 $config['auto_create_user'] = true;
239
240 // Enables possibility to log in using email address from user identities
241 $config['user_aliases'] = false;
242
243 // use this folder to store log files (must be writeable for apache user)
244 // This is used by the 'file' log driver.
245 $config['log_dir'] = 'logs/';
246
247 // use this folder to store temp files (must be writeable for apache user)
248 $config['temp_dir'] = 'temp/';
249
250 // enforce connections over https
251 // with this option enabled, all non-secure connections will be redirected.
252 // set the port for the ssl connection as value of this option if it differs from the default 443
253 $config['force_https'] = false;
254
255 // tell PHP that it should work as under secure connection
256 // even if it doesn't recognize it as secure ($_SERVER['HTTPS'] is not set)
257 // e.g. when you're running Roundcube behind a https proxy
258 // this option is mutually exclusive to 'force_https' and only either one of them should be set to true.
259 $config['use_https'] = false;
260
261 // Allow browser-autocompletion on login form.
262 // 0 - disabled, 1 - username and host only, 2 - username, host, password
263 $config['login_autocomplete'] = 0;
264
265 // Forces conversion of logins to lower case.
266 // 0 - disabled, 1 - only domain part, 2 - domain and local part.
267 // If users authentication is case-insensitive this must be enabled.
268 // Note: After enabling it all user records need to be updated, e.g. with query:
269 //       UPDATE users SET username = LOWER(username);
270 $config['login_lc'] = 2;
271
272 // Includes should be interpreted as PHP files
273 $config['skin_include_php'] = false;
274
275 // display software version on login screen
276 $config['display_version'] = false;
277
278 // Session lifetime in minutes
279 $config['session_lifetime'] = 10;
280
281 // Session domain: .example.org
282 $config['session_domain'] = '';
283
284 // Session name. Default: 'roundcube_sessid'
285 $config['session_name'] = null;
286
287 // Session path. Defaults to PHP session.cookie_path setting.
288 $config['session_path'] = null;
289
290 // Backend to use for session storage. Can either be 'db' (default), 'memcache' or 'php'
291 // If set to 'memcache', a list of servers need to be specified in 'memcache_hosts'
292 // Make sure the Memcache extension (http://pecl.php.net/package/memcache) version >= 2.0.0 is installed
293 // Setting this value to 'php' will use the default session save handler configured in PHP
294 $config['session_storage'] = 'db';
295
296 // Use these hosts for accessing memcached
297 // Define any number of hosts in the form of hostname:port or unix:///path/to/socket.file
298 $config['memcache_hosts'] = null; // e.g. array( 'localhost:11211', '192.168.1.12:11211', 'unix:///var/tmp/memcached.sock' );
299
300 // check client IP in session athorization
301 $config['ip_check'] = false;
302
303 // check referer of incoming requests
304 $config['referer_check'] = false;
305
306 // X-Frame-Options HTTP header value sent to prevent from Clickjacking.
307 // Possible values: sameorigin|deny. Set to false in order to disable sending them
308 $config['x_frame_options'] = 'sameorigin';
309
310 // this key is used to encrypt the users imap password which is stored
311 // in the session record (and the client cookie if remember password is enabled).
312 // please provide a string of exactly 24 chars.
313 $config['des_key'] = 'rcmail-!24ByteDESkey*Str';
314
315 // Automatically add this domain to user names for login
316 // Only for IMAP servers that require full e-mail addresses for login
317 // Specify an array with 'host' => 'domain' values to support multiple hosts
318 // Supported replacement variables:
319 // %h - user's IMAP hostname
320 // %n - hostname ($_SERVER['SERVER_NAME'])
321 // %t - hostname without the first part
322 // %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
323 // %z - IMAP domain (IMAP hostname without the first part)
324 // For example %n = mail.domain.tld, %t = domain.tld
325 $config['username_domain'] = '';
326
327 // This domain will be used to form e-mail addresses of new users
328 // Specify an array with 'host' => 'domain' values to support multiple hosts
329 // Supported replacement variables:
330 // %h - user's IMAP hostname
331 // %n - http hostname ($_SERVER['SERVER_NAME'])
332 // %d - domain (http hostname without the first part)
333 // %z - IMAP domain (IMAP hostname without the first part)
334 // For example %n = mail.domain.tld, %t = domain.tld
335 $config['mail_domain'] = '';
336
337 // Password charset.
338 // Use it if your authentication backend doesn't support UTF-8.
339 // Defaults to ISO-8859-1 for backward compatibility
340 $config['password_charset'] = 'ISO-8859-1';
341
342 // How many seconds must pass between emails sent by a user
343 $config['sendmail_delay'] = 0;
344
345 // Maximum number of recipients per message. Default: 0 (no limit)
346 $config['max_recipients'] = 0; 
347
348 // Maximum allowednumber of members of an address group. Default: 0 (no limit)
349 // If 'max_recipients' is set this value should be less or equal
350 $config['max_group_members'] = 0; 
351
352 // add this user-agent to message headers when sending
353 $config['useragent'] = 'Roundcube Webmail/'.RCMAIL_VERSION;
354
355 // use this name to compose page titles
356 $config['product_name'] = 'Roundcube Webmail';
357
358 // try to load host-specific configuration
359 // see http://trac.roundcube.net/wiki/Howto_Config for more details
360 $config['include_host_config'] = false;
361
362 // path to a text file which will be added to each sent message
363 // paths are relative to the Roundcube root folder
364 $config['generic_message_footer'] = '';
365
366 // path to a text file which will be added to each sent HTML message
367 // paths are relative to the Roundcube root folder
368 $config['generic_message_footer_html'] = '';
369
370 // add a received header to outgoing mails containing the creators IP and hostname
371 $config['http_received_header'] = false;
372
373 // Whether or not to encrypt the IP address and the host name
374 // these could, in some circles, be considered as sensitive information;
375 // however, for the administrator, these could be invaluable help
376 // when tracking down issues.
377 $config['http_received_header_encrypt'] = false;
378
379 // This string is used as a delimiter for message headers when sending
380 // a message via mail() function. Leave empty for auto-detection
381 $config['mail_header_delimiter'] = NULL;
382
383 // number of chars allowed for line when wrapping text.
384 // text wrapping is done when composing/sending messages
385 $config['line_length'] = 72;
386
387 // send plaintext messages as format=flowed
388 $config['send_format_flowed'] = true;
389
390 // According to RFC2298, return receipt envelope sender address must be empty.
391 // If this option is true, Roundcube will use user's identity as envelope sender for MDN responses.
392 $config['mdn_use_from'] = false;
393
394 // Set identities access level:
395 // 0 - many identities with possibility to edit all params
396 // 1 - many identities with possibility to edit all params but not email address
397 // 2 - one identity with possibility to edit all params
398 // 3 - one identity with possibility to edit all params but not email address
399 // 4 - one identity with possibility to edit only signature
400 $config['identities_level'] = 0;
401
402 // Mimetypes supported by the browser.
403 // attachments of these types will open in a preview window
404 // either a comma-separated list or an array: 'text/plain,text/html,text/xml,image/jpeg,image/gif,image/png,application/pdf'
405 $config['client_mimetypes'] = null;  # null == default
406
407 // Path to a local mime magic database file for PHPs finfo extension.
408 // Set to null if the default path should be used.
409 $config['mime_magic'] = null;
410
411 // Absolute path to a local mime.types mapping table file.
412 // This is used to derive mime-types from the filename extension or vice versa.
413 // Such a file is usually part of the apache webserver. If you don't find a file named mime.types on your system,
414 // download it from http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
415 $config['mime_types'] = null;
416
417 // path to imagemagick identify binary
418 $config['im_identify_path'] = null;
419
420 // path to imagemagick convert binary
421 $config['im_convert_path'] = null;
422
423 // Size of thumbnails from image attachments displayed below the message content.
424 // Note: whether images are displayed at all depends on the 'inline_images' option.
425 // Set to 0 to display images in full size.
426 $config['image_thumbnail_size'] = 240;
427
428 // maximum size of uploaded contact photos in pixel
429 $config['contact_photo_size'] = 160;
430
431 // Enable DNS checking for e-mail address validation
432 $config['email_dns_check'] = false;
433
434 // Disables saving sent messages in Sent folder (like gmail) (Default: false)
435 // Note: useful when SMTP server stores sent mail in user mailbox
436 $config['no_save_sent_messages'] = false;
437
438 // ----------------------------------
439 // PLUGINS
440 // ----------------------------------
441
442 // List of active plugins (in plugins/ directory)
443 $config['plugins'] = array();
444
445 // ----------------------------------
446 // USER INTERFACE
447 // ----------------------------------
448
449 // default messages sort column. Use empty value for default server's sorting, 
450 // or 'arrival', 'date', 'subject', 'from', 'to', 'fromto', 'size', 'cc'
451 $config['message_sort_col'] = '';
452
453 // default messages sort order
454 $config['message_sort_order'] = 'DESC';
455
456 // These cols are shown in the message list. Available cols are:
457 // subject, from, to, fromto, cc, replyto, date, size, status, flag, attachment, 'priority'
458 $config['list_cols'] = array('subject', 'status', 'fromto', 'date', 'size', 'flag', 'attachment');
459
460 // the default locale setting (leave empty for auto-detection)
461 // RFC1766 formatted language name like en_US, de_DE, de_CH, fr_FR, pt_BR
462 $config['language'] = null;
463
464 // use this format for date display (date or strftime format)
465 $config['date_format'] = 'Y-m-d';
466
467 // give this choice of date formats to the user to select from
468 $config['date_formats'] = array('Y-m-d', 'd-m-Y', 'Y/m/d', 'm/d/Y', 'd/m/Y', 'd.m.Y', 'j.n.Y');
469
470 // use this format for time display (date or strftime format)
471 $config['time_format'] = 'H:i';
472
473 // give this choice of time formats to the user to select from
474 $config['time_formats'] = array('G:i', 'H:i', 'g:i a', 'h:i A');
475
476 // use this format for short date display (derived from date_format and time_format)
477 $config['date_short'] = 'D H:i';
478
479 // use this format for detailed date/time formatting (derived from date_format and time_format)
480 $config['date_long'] = 'Y-m-d H:i';
481
482 // store draft message is this mailbox
483 // leave blank if draft messages should not be stored
484 // NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
485 $config['drafts_mbox'] = 'Drafts';
486
487 // store spam messages in this mailbox
488 // NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
489 $config['junk_mbox'] = 'Junk';
490
491 // store sent message is this mailbox
492 // leave blank if sent messages should not be stored
493 // NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
494 $config['sent_mbox'] = 'Sent';
495
496 // move messages to this folder when deleting them
497 // leave blank if they should be deleted directly
498 // NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
499 $config['trash_mbox'] = 'Trash';
500
501 // display these folders separately in the mailbox list.
502 // these folders will also be displayed with localized names
503 // NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
504 $config['default_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash');
505
506 // Disable localization of the default folder names listed above
507 $config['show_real_foldernames'] = false;
508
509 // automatically create the above listed default folders on first login
510 $config['create_default_folders'] = false;
511
512 // protect the default folders from renames, deletes, and subscription changes
513 $config['protect_default_folders'] = true;
514
515 // if in your system 0 quota means no limit set this option to true 
516 $config['quota_zero_as_unlimited'] = false;
517
518 // Make use of the built-in spell checker. It is based on GoogieSpell.
519 // Since Google only accepts connections over https your PHP installatation
520 // requires to be compiled with Open SSL support
521 $config['enable_spellcheck'] = true;
522
523 // Enables spellchecker exceptions dictionary.
524 // Setting it to 'shared' will make the dictionary shared by all users.
525 $config['spellcheck_dictionary'] = false;
526
527 // Set the spell checking engine. 'googie' is the default. 'pspell' is also available,
528 // but requires the Pspell extensions. When using Nox Spell Server, also set 'googie' here.
529 $config['spellcheck_engine'] = 'googie';
530
531 // For a locally installed Nox Spell Server, please specify the URI to call it.
532 // Get Nox Spell Server from http://orangoo.com/labs/?page_id=72
533 // Leave empty to use the Google spell checking service, what means
534 // that the message content will be sent to Google in order to check spelling
535 $config['spellcheck_uri'] = '';
536
537 // These languages can be selected for spell checking.
538 // Configure as a PHP style hash array: array('en'=>'English', 'de'=>'Deutsch');
539 // Leave empty for default set of available language.
540 $config['spellcheck_languages'] = NULL;
541
542 // Makes that words with all letters capitalized will be ignored (e.g. GOOGLE)
543 $config['spellcheck_ignore_caps'] = false;
544
545 // Makes that words with numbers will be ignored (e.g. g00gle)
546 $config['spellcheck_ignore_nums'] = false;
547
548 // Makes that words with symbols will be ignored (e.g. g@@gle)
549 $config['spellcheck_ignore_syms'] = false;
550
551 // Use this char/string to separate recipients when composing a new message
552 $config['recipients_separator'] = ',';
553
554 // don't let users set pagesize to more than this value if set
555 $config['max_pagesize'] = 200;
556
557 // Minimal value of user's 'refresh_interval' setting (in seconds)
558 $config['min_refresh_interval'] = 60;
559
560 // Enables files upload indicator. Requires APC installed and enabled apc.rfc1867 option.
561 // By default refresh time is set to 1 second. You can set this value to true
562 // or any integer value indicating number of seconds.
563 $config['upload_progress'] = false;
564
565 // Specifies for how many seconds the Undo button will be available
566 // after object delete action. Currently used with supporting address book sources.
567 // Setting it to 0, disables the feature.
568 $config['undo_timeout'] = 0;
569
570 // ----------------------------------
571 // ADDRESSBOOK SETTINGS
572 // ----------------------------------
573
574 // This indicates which type of address book to use. Possible choises:
575 // 'sql' (default), 'ldap' and ''.
576 // If set to 'ldap' then it will look at using the first writable LDAP
577 // address book as the primary address book and it will not display the
578 // SQL address book in the 'Address Book' view.
579 // If set to '' then no address book will be displayed or only the
580 // addressbook which is created by a plugin (like CardDAV).
581 $config['address_book_type'] = 'sql';
582
583 // In order to enable public ldap search, configure an array like the Verisign
584 // example further below. if you would like to test, simply uncomment the example.
585 // Array key must contain only safe characters, ie. a-zA-Z0-9_
586 $config['ldap_public'] = array();
587
588 // If you are going to use LDAP for individual address books, you will need to 
589 // set 'user_specific' to true and use the variables to generate the appropriate DNs to access it.
590 //
591 // The recommended directory structure for LDAP is to store all the address book entries
592 // under the users main entry, e.g.:
593 //
594 //  o=root
595 //   ou=people
596 //    uid=user@domain
597 //  mail=contact@contactdomain
598 //
599 // So the base_dn would be uid=%fu,ou=people,o=root
600 // The bind_dn would be the same as based_dn or some super user login.
601 /* 
602  * example config for Verisign directory
603  *
604 $config['ldap_public']['Verisign'] = array(
605   'name'          => 'Verisign.com',
606   // Replacement variables supported in host names:
607   // %h - user's IMAP hostname
608   // %n - hostname ($_SERVER['SERVER_NAME'])
609   // %t - hostname without the first part
610   // %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
611   // %z - IMAP domain (IMAP hostname without the first part)
612   // For example %n = mail.domain.tld, %t = domain.tld
613   'hosts'         => array('directory.verisign.com'),
614   'port'          => 389,
615   'use_tls'          => false,
616   'ldap_version'  => 3,       // using LDAPv3
617   'network_timeout' => 10,    // The timeout (in seconds) for connect + bind arrempts. This is only supported in PHP >= 5.3.0 with OpenLDAP 2.x
618   'user_specific' => false,   // If true the base_dn, bind_dn and bind_pass default to the user's IMAP login.
619   // %fu - The full username provided, assumes the username is an email
620   //       address, uses the username_domain value if not an email address.
621   // %u  - The username prior to the '@'.
622   // %d  - The domain name after the '@'.
623   // %dc - The domain name hierarchal string e.g. "dc=test,dc=domain,dc=com"
624   // %dn - DN found by ldap search when search_filter/search_base_dn are used
625   'base_dn'       => '',
626   'bind_dn'       => '',
627   'bind_pass'     => '',
628   // It's possible to bind for an individual address book
629   // The login name is used to search for the DN to bind with
630   'search_base_dn' => '',
631   'search_filter'  => '',   // e.g. '(&(objectClass=posixAccount)(uid=%u))'
632   // DN and password to bind as before searching for bind DN, if anonymous search is not allowed
633   'search_bind_dn' => '',
634   'search_bind_pw' => '',
635   // Default for %dn variable if search doesn't return DN value
636   'search_dn_default' => '',
637   // Optional authentication identifier to be used as SASL authorization proxy
638   // bind_dn need to be empty
639   'auth_cid'       => '',
640   // SASL authentication method (for proxy auth), e.g. DIGEST-MD5
641   'auth_method'    => '',
642   // Indicates if the addressbook shall be hidden from the list.
643   // With this option enabled you can still search/view contacts.
644   'hidden'        => false,
645   // Indicates if the addressbook shall not list contacts but only allows searching.
646   'searchonly'    => false,
647   // Indicates if we can write to the LDAP directory or not.
648   // If writable is true then these fields need to be populated:
649   // LDAP_Object_Classes, required_fields, LDAP_rdn
650   'writable'       => false,
651   // To create a new contact these are the object classes to specify
652   // (or any other classes you wish to use).
653   'LDAP_Object_Classes' => array('top', 'inetOrgPerson'),
654   // The RDN field that is used for new entries, this field needs
655   // to be one of the search_fields, the base of base_dn is appended
656   // to the RDN to insert into the LDAP directory.
657   'LDAP_rdn'       => 'cn',
658   // The required fields needed to build a new contact as required by
659   // the object classes (can include additional fields not required by the object classes).
660   'required_fields' => array('cn', 'sn', 'mail'),
661   'search_fields'   => array('mail', 'cn'),  // fields to search in
662   // mapping of contact fields to directory attributes
663   //   for every attribute one can specify the number of values (limit) allowed.
664   //   default is 1, a wildcard * means unlimited
665   'fieldmap' => array(
666     // Roundcube  => LDAP:limit
667     'name'        => 'cn',
668     'surname'     => 'sn',
669     'firstname'   => 'givenName',
670     'jobtitle'    => 'title',
671     'email'       => 'mail:*',
672     'phone:home'  => 'homePhone',
673     'phone:work'  => 'telephoneNumber',
674     'phone:mobile' => 'mobile',
675     'phone:pager' => 'pager',
676     'street'      => 'street',
677     'zipcode'     => 'postalCode',
678     'region'      => 'st',
679     'locality'    => 'l',
680     // if you country is a complex object, you need to configure 'sub_fields' below
681     'country'      => 'c',
682     'organization' => 'o',
683     'department'   => 'ou',
684     'jobtitle'     => 'title',
685     'notes'        => 'description',
686     // these currently don't work:
687     // 'phone:workfax' => 'facsimileTelephoneNumber',
688     // 'photo'         => 'jpegPhoto',
689     // 'manager'       => 'manager',
690     // 'assistant'     => 'secretary',
691   ),
692   // Map of contact sub-objects (attribute name => objectClass(es)), e.g. 'c' => 'country'
693   'sub_fields' => array(),
694   // Generate values for the following LDAP attributes automatically when creating a new record
695   'autovalues' => array(
696   // 'uid'  => 'md5(microtime())',               // You may specify PHP code snippets which are then eval'ed 
697   // 'mail' => '{givenname}.{sn}@mydomain.com',  // or composite strings with placeholders for existing attributes
698   ),
699   'sort'          => 'cn',    // The field to sort the listing by.
700   'scope'         => 'sub',   // search mode: sub|base|list
701   'filter'        => '(objectClass=inetOrgPerson)',      // used for basic listing (if not empty) and will be &'d with search queries. example: status=act
702   'fuzzy_search'  => true,    // server allows wildcard search
703   'vlv'           => false,   // Enable Virtual List View to more efficiently fetch paginated data (if server supports it)
704   'numsub_filter' => '(objectClass=organizationalUnit)',   // with VLV, we also use numSubOrdinates to query the total number of records. Set this filter to get all numSubOrdinates attributes for counting
705   'sizelimit'     => '0',     // Enables you to limit the count of entries fetched. Setting this to 0 means no limit.
706   'timelimit'     => '0',     // Sets the number of seconds how long is spend on the search. Setting this to 0 means no limit.
707   'referrals'     => true|false,  // Sets the LDAP_OPT_REFERRALS option. Mostly used in multi-domain Active Directory setups
708
709   // definition for contact groups (uncomment if no groups are supported)
710   // for the groups base_dn, the user replacements %fu, %u, $d and %dc work as for base_dn (see above)
711   // if the groups base_dn is empty, the contact base_dn is used for the groups as well
712   // -> in this case, assure that groups and contacts are separated due to the concernig filters! 
713   'groups'        => array(
714     'base_dn'     => '',
715     'scope'       => 'sub',   // search mode: sub|base|list
716     'filter'      => '(objectClass=groupOfNames)',
717     'object_classes' => array("top", "groupOfNames"),
718     'member_attr'  => 'member',   // name of the member attribute, e.g. uniqueMember
719     'name_attr'    => 'cn',       // attribute to be used as group name
720   ),
721 );
722 */
723
724 // An ordered array of the ids of the addressbooks that should be searched
725 // when populating address autocomplete fields server-side. ex: array('sql','Verisign');
726 $config['autocomplete_addressbooks'] = array('sql');
727
728 // The minimum number of characters required to be typed in an autocomplete field
729 // before address books will be searched. Most useful for LDAP directories that
730 // may need to do lengthy results building given overly-broad searches
731 $config['autocomplete_min_length'] = 1;
732
733 // Number of parallel autocomplete requests.
734 // If there's more than one address book, n parallel (async) requests will be created,
735 // where each request will search in one address book. By default (0), all address
736 // books are searched in one request.
737 $config['autocomplete_threads'] = 0;
738
739 // Max. numer of entries in autocomplete popup. Default: 15.
740 $config['autocomplete_max'] = 15;
741
742 // show address fields in this order
743 // available placeholders: {street}, {locality}, {zipcode}, {country}, {region}
744 $config['address_template'] = '{street}<br/>{locality} {zipcode}<br/>{country} {region}';
745
746 // Matching mode for addressbook search (including autocompletion)
747 // 0 - partial (*abc*), default
748 // 1 - strict (abc)
749 // 2 - prefix (abc*)
750 // Note: For LDAP sources fuzzy_search must be enabled to use 'partial' or 'prefix' mode
751 $config['addressbook_search_mode'] = 0;
752
753 // ----------------------------------
754 // USER PREFERENCES
755 // ----------------------------------
756
757 // Use this charset as fallback for message decoding
758 $config['default_charset'] = 'ISO-8859-1';
759
760 // skin name: folder from skins/
761 $config['skin'] = 'larry';
762
763 // Enables using standard browser windows (that can be handled as tabs)
764 // instead of popup windows
765 $config['standard_windows'] = false;
766
767 // show up to X items in messages list view
768 $config['mail_pagesize'] = 50;
769
770 // show up to X items in contacts list view
771 $config['addressbook_pagesize'] = 50;
772
773 // sort contacts by this col (preferably either one of name, firstname, surname)
774 $config['addressbook_sort_col'] = 'surname';
775
776 // the way how contact names are displayed in the list
777 // 0: display name
778 // 1: (prefix) firstname middlename surname (suffix)
779 // 2: (prefix) surname firstname middlename (suffix)
780 // 3: (prefix) surname, firstname middlename (suffix)
781 $config['addressbook_name_listing'] = 0;
782
783 // use this timezone to display date/time
784 // valid timezone identifers are listed here: php.net/manual/en/timezones.php
785 // 'auto' will use the browser's timezone settings
786 $config['timezone'] = 'auto';
787
788 // prefer displaying HTML messages
789 $config['prefer_html'] = true;
790
791 // display remote inline images
792 // 0 - Never, always ask
793 // 1 - Ask if sender is not in address book
794 // 2 - Always show inline images
795 $config['show_images'] = 0;
796
797 // open messages in new window
798 $config['message_extwin'] = false;
799
800 // open message compose form in new window
801 $config['compose_extwin'] = false;
802
803 // compose html formatted messages by default
804 // 0 - never, 1 - always, 2 - on reply to HTML message, 3 - on forward or reply to HTML message
805 $config['htmleditor'] = 0;
806
807 // show pretty dates as standard
808 $config['prettydate'] = true;
809
810 // save compose message every 300 seconds (5min)
811 $config['draft_autosave'] = 300;
812
813 // default setting if preview pane is enabled
814 $config['preview_pane'] = false;
815
816 // Mark as read when viewed in preview pane (delay in seconds)
817 // Set to -1 if messages in preview pane should not be marked as read
818 $config['preview_pane_mark_read'] = 0;
819
820 // Clear Trash on logout
821 $config['logout_purge'] = false;
822
823 // Compact INBOX on logout
824 $config['logout_expunge'] = false;
825
826 // Display attached images below the message body 
827 $config['inline_images'] = true;
828
829 // Encoding of long/non-ascii attachment names:
830 // 0 - Full RFC 2231 compatible
831 // 1 - RFC 2047 for 'name' and RFC 2231 for 'filename' parameter (Thunderbird's default)
832 // 2 - Full 2047 compatible
833 $config['mime_param_folding'] = 1;
834
835 // Set true if deleted messages should not be displayed
836 // This will make the application run slower
837 $config['skip_deleted'] = false;
838
839 // Set true to Mark deleted messages as read as well as deleted
840 // False means that a message's read status is not affected by marking it as deleted
841 $config['read_when_deleted'] = true;
842
843 // Set to true to never delete messages immediately
844 // Use 'Purge' to remove messages marked as deleted
845 $config['flag_for_deletion'] = false;
846
847 // Default interval for auto-refresh requests (in seconds)
848 // These are requests for system state updates e.g. checking for new messages, etc.
849 // Setting it to 0 disables the feature.
850 $config['refresh_interval'] = 60;
851
852 // If true all folders will be checked for recent messages
853 $config['check_all_folders'] = false;
854
855 // If true, after message delete/move, the next message will be displayed
856 $config['display_next'] = true;
857
858 // 0 - Do not expand threads 
859 // 1 - Expand all threads automatically 
860 // 2 - Expand only threads with unread messages 
861 $config['autoexpand_threads'] = 0;
862
863 // When replying:
864 // -1 - don't cite the original message
865 // 0  - place cursor below the original message
866 // 1  - place cursor above original message (top posting)
867 $config['reply_mode'] = 0;
868
869 // When replying strip original signature from message
870 $config['strip_existing_sig'] = true;
871
872 // Show signature:
873 // 0 - Never
874 // 1 - Always
875 // 2 - New messages only
876 // 3 - Forwards and Replies only
877 $config['show_sig'] = 1;
878
879 // Use MIME encoding (quoted-printable) for 8bit characters in message body
880 $config['force_7bit'] = false;
881
882 // Defaults of the search field configuration.
883 // The array can contain a per-folder list of header fields which should be considered when searching
884 // The entry with key '*' stands for all folders which do not have a specific list set.
885 // Please note that folder names should to be in sync with $config['default_folders']
886 $config['search_mods'] = null;  // Example: array('*' => array('subject'=>1, 'from'=>1), 'Sent' => array('subject'=>1, 'to'=>1));
887
888 // Defaults of the addressbook search field configuration.
889 $config['addressbook_search_mods'] = null;  // Example: array('name'=>1, 'firstname'=>1, 'surname'=>1, 'email'=>1, '*'=>1);
890
891 // 'Delete always'
892 // This setting reflects if mail should be always deleted
893 // when moving to Trash fails. This is necessary in some setups
894 // when user is over quota and Trash is included in the quota.
895 $config['delete_always'] = false;
896
897 // Directly delete messages in Junk instead of moving to Trash
898 $config['delete_junk'] = false;
899
900 // Behavior if a received message requests a message delivery notification (read receipt)
901 // 0 = ask the user, 1 = send automatically, 2 = ignore (never send or ask)
902 // 3 = send automatically if sender is in addressbook, otherwise ask the user
903 // 4 = send automatically if sender is in addressbook, otherwise ignore
904 $config['mdn_requests'] = 0;
905
906 // Return receipt checkbox default state
907 $config['mdn_default'] = 0;
908
909 // Delivery Status Notification checkbox default state
910 $config['dsn_default'] = 0;
911
912 // Place replies in the folder of the message being replied to
913 $config['reply_same_folder'] = false;
914
915 // Sets default mode of Forward feature to "forward as attachment"
916 $config['forward_attachment'] = false;
917
918 // Defines address book (internal index) to which new contacts will be added
919 // By default it is the first writeable addressbook.
920 // Note: Use '0' for built-in address book.
921 $config['default_addressbook'] = null;
922
923 // Enables spell checking before sending a message.
924 $config['spellcheck_before_send'] = false;
925
926 // Skip alternative email addresses in autocompletion (show one address per contact)
927 $config['autocomplete_single'] = false;
928
929 // Default font for composed HTML message.
930 // Supported values: Andale Mono, Arial, Arial Black, Book Antiqua, Courier New,
931 // Georgia, Helvetica, Impact, Tahoma, Terminal, Times New Roman, Trebuchet MS, Verdana
932 $config['default_font'] = 'Verdana';
933
934 // Enables display of email address with name instead of a name (and address in title)
935 $config['message_show_email'] = false;