Bez popisu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

etc_roundcube_main.inc.php 33KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809
  1. <?php
  2. /*
  3. +-----------------------------------------------------------------------+
  4. | Main configuration file |
  5. | |
  6. | This file is part of the Roundcube Webmail client |
  7. | Copyright (C) 2005-2011, The Roundcube Dev Team |
  8. | Licensed under the GNU GPL |
  9. | |
  10. +-----------------------------------------------------------------------+
  11. */
  12. $rcmail_config = array();
  13. // ----------------------------------
  14. // LOGGING/DEBUGGING
  15. // ----------------------------------
  16. // system error reporting: 1 = log; 2 = report (not implemented yet), 4 = show, 8 = trace
  17. $rcmail_config['debug_level'] = 1;
  18. // log driver: 'syslog' or 'file'.
  19. $rcmail_config['log_driver'] = 'file';
  20. // date format for log entries
  21. // (read http://php.net/manual/en/function.date.php for all format characters)
  22. $rcmail_config['log_date_format'] = 'd-M-Y H:i:s O';
  23. // Syslog ident string to use, if using the 'syslog' log driver.
  24. $rcmail_config['syslog_id'] = 'roundcube';
  25. // Syslog facility to use, if using the 'syslog' log driver.
  26. // For possible values see installer or http://php.net/manual/en/function.openlog.php
  27. $rcmail_config['syslog_facility'] = LOG_USER;
  28. // Log sent messages to <log_dir>/sendmail or to syslog
  29. $rcmail_config['smtp_log'] = true;
  30. // Log successful logins to <log_dir>/userlogins or to syslog
  31. $rcmail_config['log_logins'] = false;
  32. // Log session authentication errors to <log_dir>/session or to syslog
  33. $rcmail_config['log_session'] = false;
  34. // Log SQL queries to <log_dir>/sql or to syslog
  35. $rcmail_config['sql_debug'] = false;
  36. // Log IMAP conversation to <log_dir>/imap or to syslog
  37. $rcmail_config['imap_debug'] = false;
  38. // Log LDAP conversation to <log_dir>/ldap or to syslog
  39. $rcmail_config['ldap_debug'] = false;
  40. // Log SMTP conversation to <log_dir>/smtp or to syslog
  41. $rcmail_config['smtp_debug'] = false;
  42. // ----------------------------------
  43. // IMAP
  44. // ----------------------------------
  45. // the mail host chosen to perform the log-in
  46. // leave blank to show a textbox at login, give a list of hosts
  47. // to display a pulldown menu or set one host as string.
  48. // To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
  49. // Supported replacement variables:
  50. // %n - http hostname ($_SERVER['SERVER_NAME'])
  51. // %d - domain (http hostname without the first part)
  52. // %s - domain name after the '@' from e-mail address provided at login screen
  53. // For example %n = mail.domain.tld, %d = domain.tld
  54. // $rcmail_config['default_host'] = '';
  55. $rcmail_config['default_host'] = 'ssl://127.0.0.1:993';
  56. // TCP port used for IMAP connections
  57. // $rcmail_config['default_port'] = 143;
  58. // IMAP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
  59. // best server supported one)
  60. $rcmail_config['imap_auth_type'] = null;
  61. // If you know your imap's folder delimiter, you can specify it here.
  62. // Otherwise it will be determined automatically
  63. $rcmail_config['imap_delimiter'] = null;
  64. // If IMAP server doesn't support NAMESPACE extension, but you're
  65. // using shared folders or personal root folder is non-empty, you'll need to
  66. // set these options. All can be strings or arrays of strings.
  67. // Folders need to be ended with directory separator, e.g. "INBOX."
  68. // (special directory "~" is an exception to this rule)
  69. // These can be used also to overwrite server's namespaces
  70. $rcmail_config['imap_ns_personal'] = null;
  71. $rcmail_config['imap_ns_other'] = null;
  72. $rcmail_config['imap_ns_shared'] = null;
  73. // By default IMAP capabilities are readed after connection to IMAP server
  74. // In some cases, e.g. when using IMAP proxy, there's a need to refresh the list
  75. // after login. Set to True if you've got this case.
  76. $rcmail_config['imap_force_caps'] = false;
  77. // By default list of subscribed folders is determined using LIST-EXTENDED
  78. // extension if available. Some servers (dovecot 1.x) returns wrong results
  79. // for shared namespaces in this case. http://trac.roundcube.net/ticket/1486225
  80. // Enable this option to force LSUB command usage instead.
  81. $rcmail_config['imap_force_lsub'] = false;
  82. // IMAP connection timeout, in seconds. Default: 0 (no limit)
  83. $rcmail_config['imap_timeout'] = 0;
  84. // Optional IMAP authentication identifier to be used as authorization proxy
  85. $rcmail_config['imap_auth_cid'] = null;
  86. // Optional IMAP authentication password to be used for imap_auth_cid
  87. $rcmail_config['imap_auth_pw'] = null;
  88. // Type of IMAP indexes cache. Supported values: 'db', 'apc' and 'memcache'.
  89. $rcmail_config['imap_cache'] = null;
  90. // Enables messages cache. Only 'db' cache is supported.
  91. $rcmail_config['messages_cache'] = false;
  92. // ----------------------------------
  93. // SMTP
  94. // ----------------------------------
  95. // SMTP server host (for sending mails).
  96. // To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
  97. // If left blank, the PHP mail() function is used
  98. // Supported replacement variables:
  99. // %h - user's IMAP hostname
  100. // %n - http hostname ($_SERVER['SERVER_NAME'])
  101. // %d - domain (http hostname without the first part)
  102. // %z - IMAP domain (IMAP hostname without the first part)
  103. // For example %n = mail.domain.tld, %d = domain.tld
  104. // $rcmail_config['smtp_server'] = '';
  105. $rcmail_config['smtp_server'] = 'ssl://127.0.0.1';
  106. // SMTP port (default is 25; 465 for SSL)
  107. $rcmail_config['smtp_port'] = 465;
  108. // SMTP username (if required) if you use %u as the username Roundcube
  109. // will use the current username for login
  110. //$rcmail_config['smtp_user'] = '';
  111. $rcmail_config['smtp_user'] = '%u';
  112. // SMTP password (if required) if you use %p as the password Roundcube
  113. // will use the current user's password for login
  114. //$rcmail_config['smtp_pass'] = '';
  115. $rcmail_config['smtp_pass'] = '%p';
  116. // SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
  117. // best server supported one)
  118. $rcmail_config['smtp_auth_type'] = '';
  119. // Optional SMTP authentication identifier to be used as authorization proxy
  120. $rcmail_config['smtp_auth_cid'] = null;
  121. // Optional SMTP authentication password to be used for smtp_auth_cid
  122. $rcmail_config['smtp_auth_pw'] = null;
  123. // SMTP HELO host
  124. // Hostname to give to the remote server for SMTP 'HELO' or 'EHLO' messages
  125. // Leave this blank and you will get the server variable 'server_name' or
  126. // localhost if that isn't defined.
  127. $rcmail_config['smtp_helo_host'] = '';
  128. // SMTP connection timeout, in seconds. Default: 0 (no limit)
  129. $rcmail_config['smtp_timeout'] = 0;
  130. // ----------------------------------
  131. // SYSTEM
  132. // ----------------------------------
  133. // THIS OPTION WILL ALLOW THE INSTALLER TO RUN AND CAN EXPOSE SENSITIVE CONFIG DATA.
  134. // ONLY ENABLE IT IF YOU'RE REALLY SURE WHAT YOU'RE DOING!
  135. $rcmail_config['enable_installer'] = false;
  136. // use this folder to store log files (must be writeable for apache user)
  137. // This is used by the 'file' log driver.
  138. $rcmail_config['log_dir'] = 'logs/';
  139. // use this folder to store temp files (must be writeable for apache user)
  140. $rcmail_config['temp_dir'] = 'temp/';
  141. // lifetime of message cache
  142. // possible units: s, m, h, d, w
  143. $rcmail_config['message_cache_lifetime'] = '10d';
  144. // enforce connections over https
  145. // with this option enabled, all non-secure connections will be redirected.
  146. // set the port for the ssl connection as value of this option if it differs from the default 443
  147. $rcmail_config['force_https'] = true;
  148. // tell PHP that it should work as under secure connection
  149. // even if it doesn't recognize it as secure ($_SERVER['HTTPS'] is not set)
  150. // e.g. when you're running Roundcube behind a https proxy
  151. $rcmail_config['use_https'] = false;
  152. // Allow browser-autocompletion on login form.
  153. // 0 - disabled, 1 - username and host only, 2 - username, host, password
  154. $rcmail_config['login_autocomplete'] = 0;
  155. // If users authentication is not case sensitive this must be enabled.
  156. // You can also use it to force conversion of logins to lower case.
  157. // After enabling it all user records need to be updated, e.g. with query:
  158. // UPDATE users SET username = LOWER(username);
  159. $rcmail_config['login_lc'] = false;
  160. // automatically create a new Roundcube user when log-in the first time.
  161. // a new user will be created once the IMAP login succeeds.
  162. // set to false if only registered users can use this service
  163. $rcmail_config['auto_create_user'] = true;
  164. // replace Roundcube logo with this image
  165. // specify an URL relative to the document root of this Roundcube installation
  166. $rcmail_config['skin_logo'] = null;
  167. // Includes should be interpreted as PHP files
  168. $rcmail_config['skin_include_php'] = false;
  169. // Session lifetime in minutes
  170. // must be greater than 'keep_alive'/60
  171. $rcmail_config['session_lifetime'] = 10;
  172. // session domain: .example.org
  173. $rcmail_config['session_domain'] = '';
  174. // session name. Default: 'roundcube_sessid'
  175. $rcmail_config['session_name'] = null;
  176. // Backend to use for session storage. Can either be 'db' (default) or 'memcache'
  177. // If set to memcache, a list of servers need to be specified in 'memcache_hosts'
  178. // Make sure the Memcache extension (http://pecl.php.net/package/memcache) version >= 2.0.0 is installed
  179. $rcmail_config['session_storage'] = 'db';
  180. // Use these hosts for accessing memcached
  181. // Define any number of hosts in the form hostname:port
  182. $rcmail_config['memcache_hosts'] = null; // e.g. array( 'localhost:11211', '192.168.1.12:11211' );
  183. // check client IP in session athorization
  184. $rcmail_config['ip_check'] = false;
  185. // check referer of incoming requests
  186. $rcmail_config['referer_check'] = false;
  187. // X-Frame-Options HTTP header value sent to prevent from Clickjacking.
  188. // Possible values: sameorigin|deny. Set to false in order to disable sending them
  189. $rcmail_config['x_frame_options'] = 'sameorigin';
  190. // this key is used to encrypt the users imap password which is stored
  191. // in the session record (and the client cookie if remember password is enabled).
  192. // please provide a string of exactly 24 chars.
  193. $rcmail_config['des_key'] = 'cQro25fVv3ruWTNh0a6Sm1Rp';
  194. // Automatically add this domain to user names for login
  195. // Only for IMAP servers that require full e-mail addresses for login
  196. // Specify an array with 'host' => 'domain' values to support multiple hosts
  197. // Supported replacement variables:
  198. // %h - user's IMAP hostname
  199. // %n - http hostname ($_SERVER['SERVER_NAME'])
  200. // %d - domain (http hostname without the first part)
  201. // %z - IMAP domain (IMAP hostname without the first part)
  202. // For example %n = mail.domain.tld, %d = domain.tld
  203. $rcmail_config['username_domain'] = '';
  204. // This domain will be used to form e-mail addresses of new users
  205. // Specify an array with 'host' => 'domain' values to support multiple hosts
  206. // Supported replacement variables:
  207. // %h - user's IMAP hostname
  208. // %n - http hostname ($_SERVER['SERVER_NAME'])
  209. // %d - domain (http hostname without the first part)
  210. // %z - IMAP domain (IMAP hostname without the first part)
  211. // For example %n = mail.domain.tld, %d = domain.tld
  212. $rcmail_config['mail_domain'] = '';
  213. // Password charset.
  214. // Use it if your authentication backend doesn't support UTF-8.
  215. // Defaults to ISO-8859-1 for backward compatibility
  216. $rcmail_config['password_charset'] = 'ISO-8859-1';
  217. // How many seconds must pass between emails sent by a user
  218. $rcmail_config['sendmail_delay'] = 0;
  219. // Maximum number of recipients per message. Default: 0 (no limit)
  220. $rcmail_config['max_recipients'] = 0;
  221. // Maximum allowednumber of members of an address group. Default: 0 (no limit)
  222. // If 'max_recipients' is set this value should be less or equal
  223. $rcmail_config['max_group_members'] = 0;
  224. // add this user-agent to message headers when sending
  225. $rcmail_config['useragent'] = 'Roundcube Webmail/'.RCMAIL_VERSION;
  226. // use this name to compose page titles
  227. $rcmail_config['product_name'] = 'Roundcube Webmail';
  228. // try to load host-specific configuration
  229. // see http://trac.roundcube.net/wiki/Howto_Config for more details
  230. $rcmail_config['include_host_config'] = false;
  231. // path to a text file which will be added to each sent message
  232. // paths are relative to the Roundcube root folder
  233. $rcmail_config['generic_message_footer'] = '';
  234. // path to a text file which will be added to each sent HTML message
  235. // paths are relative to the Roundcube root folder
  236. $rcmail_config['generic_message_footer_html'] = '';
  237. // add a received header to outgoing mails containing the creators IP and hostname
  238. $rcmail_config['http_received_header'] = false;
  239. // Whether or not to encrypt the IP address and the host name
  240. // these could, in some circles, be considered as sensitive information;
  241. // however, for the administrator, these could be invaluable help
  242. // when tracking down issues.
  243. $rcmail_config['http_received_header_encrypt'] = false;
  244. // This string is used as a delimiter for message headers when sending
  245. // a message via mail() function. Leave empty for auto-detection
  246. $rcmail_config['mail_header_delimiter'] = NULL;
  247. // number of chars allowed for line when wrapping text.
  248. // text wrapping is done when composing/sending messages
  249. $rcmail_config['line_length'] = 72;
  250. // send plaintext messages as format=flowed
  251. $rcmail_config['send_format_flowed'] = true;
  252. // don't allow these settings to be overriden by the user
  253. $rcmail_config['dont_override'] = array();
  254. // Set identities access level:
  255. // 0 - many identities with possibility to edit all params
  256. // 1 - many identities with possibility to edit all params but not email address
  257. // 2 - one identity with possibility to edit all params
  258. // 3 - one identity with possibility to edit all params but not email address
  259. $rcmail_config['identities_level'] = 0;
  260. // Mimetypes supported by the browser.
  261. // attachments of these types will open in a preview window
  262. // either a comma-separated list or an array: 'text/plain,text/html,text/xml,image/jpeg,image/gif,image/png,application/pdf'
  263. $rcmail_config['client_mimetypes'] = null; # null == default
  264. // mime magic database
  265. $rcmail_config['mime_magic'] = '/usr/share/misc/magic';
  266. // path to imagemagick identify binary
  267. $rcmail_config['im_identify_path'] = null;
  268. // path to imagemagick convert binary
  269. $rcmail_config['im_convert_path'] = null;
  270. // maximum size of uploaded contact photos in pixel
  271. $rcmail_config['contact_photo_size'] = 160;
  272. // Enable DNS checking for e-mail address validation
  273. $rcmail_config['email_dns_check'] = false;
  274. // ----------------------------------
  275. // PLUGINS
  276. // ----------------------------------
  277. // List of active plugins (in plugins/ directory)
  278. $rcmail_config['plugins'] = array('managesieve');
  279. // ----------------------------------
  280. // USER INTERFACE
  281. // ----------------------------------
  282. // default messages sort column. Use empty value for default server's sorting,
  283. // or 'arrival', 'date', 'subject', 'from', 'to', 'size', 'cc'
  284. $rcmail_config['message_sort_col'] = '';
  285. // default messages sort order
  286. $rcmail_config['message_sort_order'] = 'DESC';
  287. // These cols are shown in the message list. Available cols are:
  288. // subject, from, to, cc, replyto, date, size, status, flag, attachment, 'priority'
  289. $rcmail_config['list_cols'] = array('subject', 'status', 'from', 'date', 'size', 'flag', 'attachment');
  290. // the default locale setting (leave empty for auto-detection)
  291. // RFC1766 formatted language name like en_US, de_DE, de_CH, fr_FR, pt_BR
  292. $rcmail_config['language'] = 'en_US';
  293. // use this format for date display (date or strftime format)
  294. $rcmail_config['date_format'] = 'Y-m-d';
  295. // give this choice of date formats to the user to select from
  296. $rcmail_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');
  297. // use this format for time display (date or strftime format)
  298. $rcmail_config['time_format'] = 'H:i';
  299. // give this choice of time formats to the user to select from
  300. $rcmail_config['time_formats'] = array('G:i', 'H:i', 'g:i a', 'h:i A');
  301. // use this format for short date display (derived from date_format and time_format)
  302. $rcmail_config['date_short'] = 'D H:i';
  303. // use this format for detailed date/time formatting (derived from date_format and time_format)
  304. $rcmail_config['date_long'] = 'Y-m-d H:i';
  305. // store draft message is this mailbox
  306. // leave blank if draft messages should not be stored
  307. // NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
  308. $rcmail_config['drafts_mbox'] = 'Drafts';
  309. // store spam messages in this mailbox
  310. // NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
  311. $rcmail_config['junk_mbox'] = 'Junk';
  312. // store sent message is this mailbox
  313. // leave blank if sent messages should not be stored
  314. // NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
  315. $rcmail_config['sent_mbox'] = 'Sent';
  316. // move messages to this folder when deleting them
  317. // leave blank if they should be deleted directly
  318. // NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
  319. $rcmail_config['trash_mbox'] = 'Trash';
  320. // display these folders separately in the mailbox list.
  321. // these folders will also be displayed with localized names
  322. // NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
  323. $rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash');
  324. // automatically create the above listed default folders on first login
  325. // $rcmail_config['create_default_folders'] = false;
  326. $rcmail_config['create_default_folders'] = true;
  327. // protect the default folders from renames, deletes, and subscription changes
  328. $rcmail_config['protect_default_folders'] = true;
  329. // if in your system 0 quota means no limit set this option to true
  330. $rcmail_config['quota_zero_as_unlimited'] = false;
  331. // Make use of the built-in spell checker. It is based on GoogieSpell.
  332. // Since Google only accepts connections over https your PHP installatation
  333. // requires to be compiled with Open SSL support
  334. $rcmail_config['enable_spellcheck'] = true;
  335. // Enables spellchecker exceptions dictionary.
  336. // Setting it to 'shared' will make the dictionary shared by all users.
  337. $rcmail_config['spellcheck_dictionary'] = false;
  338. // Set the spell checking engine. 'googie' is the default. 'pspell' is also available,
  339. // but requires the Pspell extensions. When using Nox Spell Server, also set 'googie' here.
  340. $rcmail_config['spellcheck_engine'] = 'pspell';
  341. // For a locally installed Nox Spell Server, please specify the URI to call it.
  342. // Get Nox Spell Server from http://orangoo.com/labs/?page_id=72
  343. // Leave empty to use the Google spell checking service, what means
  344. // that the message content will be sent to Google in order to check spelling
  345. $rcmail_config['spellcheck_uri'] = '';
  346. // These languages can be selected for spell checking.
  347. // Configure as a PHP style hash array: array('en'=>'English', 'de'=>'Deutsch');
  348. // Leave empty for default set of available language.
  349. $rcmail_config['spellcheck_languages'] = NULL;
  350. // Makes that words with all letters capitalized will be ignored (e.g. GOOGLE)
  351. $rcmail_config['spellcheck_ignore_caps'] = false;
  352. // Makes that words with numbers will be ignored (e.g. g00gle)
  353. $rcmail_config['spellcheck_ignore_nums'] = false;
  354. // Makes that words with symbols will be ignored (e.g. g@@gle)
  355. $rcmail_config['spellcheck_ignore_syms'] = false;
  356. // Use this char/string to separate recipients when composing a new message
  357. $rcmail_config['recipients_separator'] = ',';
  358. // don't let users set pagesize to more than this value if set
  359. $rcmail_config['max_pagesize'] = 200;
  360. // Minimal value of user's 'keep_alive' setting (in seconds)
  361. // Must be less than 'session_lifetime'
  362. $rcmail_config['min_keep_alive'] = 60;
  363. // Enables files upload indicator. Requires APC installed and enabled apc.rfc1867 option.
  364. // By default refresh time is set to 1 second. You can set this value to true
  365. // or any integer value indicating number of seconds.
  366. $rcmail_config['upload_progress'] = false;
  367. // Specifies for how many seconds the Undo button will be available
  368. // after object delete action. Currently used with supporting address book sources.
  369. // Setting it to 0, disables the feature.
  370. $rcmail_config['undo_timeout'] = 0;
  371. // ----------------------------------
  372. // ADDRESSBOOK SETTINGS
  373. // ----------------------------------
  374. // This indicates which type of address book to use. Possible choises:
  375. // 'sql' (default) and 'ldap'.
  376. // If set to 'ldap' then it will look at using the first writable LDAP
  377. // address book as the primary address book and it will not display the
  378. // SQL address book in the 'Address Book' view.
  379. $rcmail_config['address_book_type'] = 'sql';
  380. // In order to enable public ldap search, configure an array like the Verisign
  381. // example further below. if you would like to test, simply uncomment the example.
  382. // Array key must contain only safe characters, ie. a-zA-Z0-9_
  383. $rcmail_config['ldap_public'] = array();
  384. // If you are going to use LDAP for individual address books, you will need to
  385. // set 'user_specific' to true and use the variables to generate the appropriate DNs to access it.
  386. //
  387. // The recommended directory structure for LDAP is to store all the address book entries
  388. // under the users main entry, e.g.:
  389. //
  390. // o=root
  391. // ou=people
  392. // uid=user@domain
  393. // mail=contact@contactdomain
  394. //
  395. // So the base_dn would be uid=%fu,ou=people,o=root
  396. // The bind_dn would be the same as based_dn or some super user login.
  397. /*
  398. * example config for Verisign directory
  399. *
  400. $rcmail_config['ldap_public']['Verisign'] = array(
  401. 'name' => 'Verisign.com',
  402. // Replacement variables supported in host names:
  403. // %h - user's IMAP hostname
  404. // %n - http hostname ($_SERVER['SERVER_NAME'])
  405. // %d - domain (http hostname without the first part)
  406. // %z - IMAP domain (IMAP hostname without the first part)
  407. // For example %n = mail.domain.tld, %d = domain.tld
  408. 'hosts' => array('directory.verisign.com'),
  409. 'port' => 389,
  410. 'use_tls' => false,
  411. 'ldap_version' => 3, // using LDAPv3
  412. 'user_specific' => false, // If true the base_dn, bind_dn and bind_pass default to the user's IMAP login.
  413. // %fu - The full username provided, assumes the username is an email
  414. // address, uses the username_domain value if not an email address.
  415. // %u - The username prior to the '@'.
  416. // %d - The domain name after the '@'.
  417. // %dc - The domain name hierarchal string e.g. "dc=test,dc=domain,dc=com"
  418. // %dn - DN found by ldap search when search_filter/search_base_dn are used
  419. 'base_dn' => '',
  420. 'bind_dn' => '',
  421. 'bind_pass' => '',
  422. // It's possible to bind for an individual address book
  423. // The login name is used to search for the DN to bind with
  424. 'search_base_dn' => '',
  425. 'search_filter' => '', // e.g. '(&(objectClass=posixAccount)(uid=%u))'
  426. // DN and password to bind as before searching for bind DN, if anonymous search is not allowed
  427. 'search_bind_dn' => '',
  428. 'search_bind_pw' => '',
  429. // Default for %dn variable if search doesn't return DN value
  430. 'search_dn_default' => '',
  431. // Optional authentication identifier to be used as SASL authorization proxy
  432. // bind_dn need to be empty
  433. 'auth_cid' => '',
  434. // SASL authentication method (for proxy auth), e.g. DIGEST-MD5
  435. 'auth_method' => '',
  436. // Indicates if the addressbook shall be hidden from the list.
  437. // With this option enabled you can still search/view contacts.
  438. 'hidden' => false,
  439. // Indicates if the addressbook shall not list contacts but only allows searching.
  440. 'searchonly' => false,
  441. // Indicates if we can write to the LDAP directory or not.
  442. // If writable is true then these fields need to be populated:
  443. // LDAP_Object_Classes, required_fields, LDAP_rdn
  444. 'writable' => false,
  445. // To create a new contact these are the object classes to specify
  446. // (or any other classes you wish to use).
  447. 'LDAP_Object_Classes' => array('top', 'inetOrgPerson'),
  448. // The RDN field that is used for new entries, this field needs
  449. // to be one of the search_fields, the base of base_dn is appended
  450. // to the RDN to insert into the LDAP directory.
  451. 'LDAP_rdn' => 'mail',
  452. // The required fields needed to build a new contact as required by
  453. // the object classes (can include additional fields not required by the object classes).
  454. 'required_fields' => array('cn', 'sn', 'mail'),
  455. 'search_fields' => array('mail', 'cn'), // fields to search in
  456. // mapping of contact fields to directory attributes
  457. 'fieldmap' => array(
  458. // Roundcube => LDAP
  459. 'name' => 'cn',
  460. 'surname' => 'sn',
  461. 'firstname' => 'givenName',
  462. 'email' => 'mail',
  463. 'phone:home' => 'homePhone',
  464. 'phone:work' => 'telephoneNumber',
  465. 'phone:mobile' => 'mobile',
  466. 'street' => 'street',
  467. 'zipcode' => 'postalCode',
  468. 'locality' => 'l',
  469. 'country' => 'c',
  470. 'organization' => 'o',
  471. ),
  472. 'sort' => 'cn', // The field to sort the listing by.
  473. 'scope' => 'sub', // search mode: sub|base|list
  474. 'filter' => '(objectClass=inetOrgPerson)', // used for basic listing (if not empty) and will be &'d with search queries. example: status=act
  475. 'fuzzy_search' => true, // server allows wildcard search
  476. 'vlv' => false, // Enable Virtual List View to more efficiently fetch paginated data (if server supports it)
  477. '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
  478. 'sizelimit' => '0', // Enables you to limit the count of entries fetched. Setting this to 0 means no limit.
  479. 'timelimit' => '0', // Sets the number of seconds how long is spend on the search. Setting this to 0 means no limit.
  480. 'referrals' => true|false, // Sets the LDAP_OPT_REFERRALS option. Mostly used in multi-domain Active Directory setups
  481. // definition for contact groups (uncomment if no groups are supported)
  482. // for the groups base_dn, the user replacements %fu, %u, $d and %dc work as for base_dn (see above)
  483. // if the groups base_dn is empty, the contact base_dn is used for the groups as well
  484. // -> in this case, assure that groups and contacts are separated due to the concernig filters!
  485. 'groups' => array(
  486. 'base_dn' => '',
  487. 'scope' => 'sub', // search mode: sub|base|list
  488. 'filter' => '(objectClass=groupOfNames)',
  489. 'object_classes' => array("top", "groupOfNames"),
  490. 'member_attr' => 'member', // name of the member attribute, e.g. uniqueMember
  491. 'name_attr' => 'cn', // attribute to be used as group name
  492. ),
  493. );
  494. */
  495. // An ordered array of the ids of the addressbooks that should be searched
  496. // when populating address autocomplete fields server-side. ex: array('sql','Verisign');
  497. $rcmail_config['autocomplete_addressbooks'] = array('sql');
  498. // The minimum number of characters required to be typed in an autocomplete field
  499. // before address books will be searched. Most useful for LDAP directories that
  500. // may need to do lengthy results building given overly-broad searches
  501. $rcmail_config['autocomplete_min_length'] = 1;
  502. // Number of parallel autocomplete requests.
  503. // If there's more than one address book, n parallel (async) requests will be created,
  504. // where each request will search in one address book. By default (0), all address
  505. // books are searched in one request.
  506. $rcmail_config['autocomplete_threads'] = 0;
  507. // Max. numer of entries in autocomplete popup. Default: 15.
  508. $rcmail_config['autocomplete_max'] = 15;
  509. // show address fields in this order
  510. // available placeholders: {street}, {locality}, {zipcode}, {country}, {region}
  511. $rcmail_config['address_template'] = '{street}<br/>{locality} {zipcode}<br/>{country} {region}';
  512. // Matching mode for addressbook search (including autocompletion)
  513. // 0 - partial (*abc*), default
  514. // 1 - strict (abc)
  515. // 2 - prefix (abc*)
  516. // Note: For LDAP sources fuzzy_search must be enabled to use 'partial' or 'prefix' mode
  517. $rcmail_config['addressbook_search_mode'] = 0;
  518. // ----------------------------------
  519. // USER PREFERENCES
  520. // ----------------------------------
  521. // Use this charset as fallback for message decoding
  522. $rcmail_config['default_charset'] = 'UTF-8';
  523. // skin name: folder from skins/
  524. $rcmail_config['skin'] = 'default';
  525. // show up to X items in list view
  526. $rcmail_config['pagesize'] = 40;
  527. // sort contacts by this col (preferably either one of name, firstname, surname)
  528. $rcmail_config['addressbook_sort_col'] = 'surname';
  529. // the way how contact names are displayed in the list
  530. // 0: display name
  531. // 1: (prefix) firstname middlename surname (suffix)
  532. // 2: (prefix) surname firstname middlename (suffix)
  533. // 3: (prefix) surname, firstname middlename (suffix)
  534. $rcmail_config['addressbook_name_listing'] = 0;
  535. // use this timezone to display date/time
  536. $rcmail_config['timezone'] = 'auto';
  537. // is daylight saving On? Default: (bool)date('I');
  538. $rcmail_config['dst_active'] = null;
  539. // prefer displaying HTML messages
  540. $rcmail_config['prefer_html'] = true;
  541. // display remote inline images
  542. // 0 - Never, always ask
  543. // 1 - Ask if sender is not in address book
  544. // 2 - Always show inline images
  545. $rcmail_config['show_images'] = 0;
  546. // compose html formatted messages by default
  547. // 0 - never, 1 - always, 2 - on reply to HTML message only
  548. $rcmail_config['htmleditor'] = 0;
  549. // show pretty dates as standard
  550. $rcmail_config['prettydate'] = true;
  551. // save compose message every 300 seconds (5min)
  552. $rcmail_config['draft_autosave'] = 300;
  553. // default setting if preview pane is enabled
  554. $rcmail_config['preview_pane'] = false;
  555. // Mark as read when viewed in preview pane (delay in seconds)
  556. // Set to -1 if messages in preview pane should not be marked as read
  557. $rcmail_config['preview_pane_mark_read'] = 0;
  558. // Clear Trash on logout
  559. $rcmail_config['logout_purge'] = false;
  560. // Compact INBOX on logout
  561. $rcmail_config['logout_expunge'] = false;
  562. // Display attached images below the message body
  563. $rcmail_config['inline_images'] = true;
  564. // Encoding of long/non-ascii attachment names:
  565. // 0 - Full RFC 2231 compatible
  566. // 1 - RFC 2047 for 'name' and RFC 2231 for 'filename' parameter (Thunderbird's default)
  567. // 2 - Full 2047 compatible
  568. $rcmail_config['mime_param_folding'] = 1;
  569. // Set true if deleted messages should not be displayed
  570. // This will make the application run slower
  571. $rcmail_config['skip_deleted'] = false;
  572. // Set true to Mark deleted messages as read as well as deleted
  573. // False means that a message's read status is not affected by marking it as deleted
  574. $rcmail_config['read_when_deleted'] = true;
  575. // Set to true to never delete messages immediately
  576. // Use 'Purge' to remove messages marked as deleted
  577. $rcmail_config['flag_for_deletion'] = false;
  578. // Default interval for keep-alive/check-recent requests (in seconds)
  579. // Must be greater than or equal to 'min_keep_alive' and less than 'session_lifetime'
  580. $rcmail_config['keep_alive'] = 60;
  581. // If true all folders will be checked for recent messages
  582. $rcmail_config['check_all_folders'] = false;
  583. // If true, after message delete/move, the next message will be displayed
  584. $rcmail_config['display_next'] = false;
  585. // 0 - Do not expand threads
  586. // 1 - Expand all threads automatically
  587. // 2 - Expand only threads with unread messages
  588. $rcmail_config['autoexpand_threads'] = 0;
  589. // When replying place cursor above original message (top posting)
  590. $rcmail_config['top_posting'] = false;
  591. // When replying strip original signature from message
  592. $rcmail_config['strip_existing_sig'] = true;
  593. // Show signature:
  594. // 0 - Never
  595. // 1 - Always
  596. // 2 - New messages only
  597. // 3 - Forwards and Replies only
  598. $rcmail_config['show_sig'] = 1;
  599. // When replying or forwarding place sender's signature above existing message
  600. $rcmail_config['sig_above'] = false;
  601. // Use MIME encoding (quoted-printable) for 8bit characters in message body
  602. $rcmail_config['force_7bit'] = false;
  603. // Defaults of the search field configuration.
  604. // The array can contain a per-folder list of header fields which should be considered when searching
  605. // The entry with key '*' stands for all folders which do not have a specific list set.
  606. // Please note that folder names should to be in sync with $rcmail_config['default_imap_folders']
  607. $rcmail_config['search_mods'] = null; // Example: array('*' => array('subject'=>1, 'from'=>1), 'Sent' => array('subject'=>1, 'to'=>1));
  608. // Defaults of the addressbook search field configuration.
  609. $rcmail_config['addressbook_search_mods'] = null; // Example: array('name'=>1, 'firstname'=>1, 'surname'=>1, 'email'=>1, '*'=>1);
  610. // 'Delete always'
  611. // This setting reflects if mail should be always deleted
  612. // when moving to Trash fails. This is necessary in some setups
  613. // when user is over quota and Trash is included in the quota.
  614. $rcmail_config['delete_always'] = false;
  615. // Behavior if a received message requests a message delivery notification (read receipt)
  616. // 0 = ask the user, 1 = send automatically, 2 = ignore (never send or ask)
  617. // 3 = send automatically if sender is in addressbook, otherwise ask the user
  618. // 4 = send automatically if sender is in addressbook, otherwise ignore
  619. $rcmail_config['mdn_requests'] = 0;
  620. // Return receipt checkbox default state
  621. $rcmail_config['mdn_default'] = 0;
  622. // Delivery Status Notification checkbox default state
  623. $rcmail_config['dsn_default'] = 0;
  624. // Place replies in the folder of the message being replied to
  625. $rcmail_config['reply_same_folder'] = false;
  626. // Sets default mode of Forward feature to "forward as attachment"
  627. $rcmail_config['forward_attachment'] = false;
  628. // Defines address book (internal index) to which new contacts will be added
  629. // By default it is the first writeable addressbook.
  630. // Note: Use '0' for built-in address book.
  631. $rcmail_config['default_addressbook'] = null;
  632. // Enables spell checking before sending a message.
  633. $rcmail_config['spellcheck_before_send'] = false;
  634. // Skip alternative email addresses in autocompletion (show one address per contact)
  635. $rcmail_config['autocomplete_single'] = false;
  636. // end of config file