summaryrefslogtreecommitdiff
path: root/nocc/conf.php
blob: fc3e526bb2966eee0f8d65b4ba62267a98c18d19 (plain)
  1. <?php
  2. /*
  3.  * $Header: /var/local/cvs/local-COMMON/nocc/conf.php,v 1.4 2006-04-03 13:10:42 jonas Exp $
  4. *
  5. * Copyright 2001 Nicolas Chalanset <nicocha@free.fr>
  6. * Copyright 2001 Olivier Cahagne <cahagn_o@epita.fr>
  7. * Copyright 2002 Mike Rylander <mrylander@mail.com>
  8. *
  9. * See the enclosed file COPYING for license information (GPL). If you
  10. * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
  11. */
  12. // ################### This is the main configuration for NOCC ########## //
  13. // ==> Required parameters
  14. // Default smtp server and smtp_port (default is 25)
  15. // If a domain has no smtp server, this one will be used
  16. // If no smtp server is provided, Nocc will default to the mail() function,
  17. // and try to use Sendmail or any other MTA (Postfix)
  18. $conf->default_smtp_server = 'localhost';
  19. $conf->default_smtp_port = 25;
  20. // List of domains people can log in
  21. // You can have as many domains as you need
  22. // $conf->domains[$i]->domain = 'sourceforge.net';
  23. // domain name e.g 'sourceforge.net'. This field is used when sending message
  24. //
  25. // $conf->domains[$i]->in = 'mail.sourceforge.net:110/pop3';
  26. // imap or pop3 server name + port + protocol (only if not imap)
  27. // [server_name]:[port number]/[protocol]
  28. // ex for an imap server : mail.sourceforge.net:143
  29. // ex for an ssl imap server : mail.sourceforge.net:993/ssl
  30. // ex for an ssl imap server with a self-signed certificate : mail.sourceforge.net:993/ssl/novalidate-cert
  31. // ex for a pop3 server : mail.sourceforge.net:110/pop3
  32. // ex for an ssl pop3 server : mail.sourceforge.net:995/pop3/ssl
  33. // ex for an ssl pop3 server with a self-signed certificate : mail.sourceforge.net:995/pop3/ssl/novalidate-cert
  34. // protocol can only be pop3
  35. //
  36. // $conf->domains[$i]->smtp = 'smtp.isp.com';
  37. // Optional: smtp server name or IP address
  38. // Leave empty to send mail via sendmail
  39. //
  40. // $conf->domains[$i]->smtp_port = 25;
  41. // Port number to connect to smtp server (usually 25)
  42. $i = 0;
  43. $conf->domains[$i]->domain = 'bitbase.dk';
  44. $conf->domains[$i]->in = 'localhost';
  45. //$conf->domains[$i]->smtp = '';
  46. //$conf->domains[$i]->smtp_port = 25;
  47. // Uncomment for 'user@domain.com' style logins
  48. //$conf->domains[$i]->login_with_domain = 1;
  49. // If you want to add more domains, uncomment the following
  50. // lines and fill them in
  51. $i++;
  52. $conf->domains[$i]->domain = 'jones.dk';
  53. $conf->domains[$i]->in = 'mail.jones.dk:993/ssl';
  54. $i++;
  55. $conf->domains[$i]->domain = 'homebase.dk';
  56. $conf->domains[$i]->in = 'mail.homebase.dk:993/ssl';
  57. $i++;
  58. $conf->domains[$i]->domain = '107b.dk';
  59. $conf->domains[$i]->in = 'mail.107b.dk:993/ssl';
  60. //$i++;
  61. //$conf->domains[$i]->domain = 'bitbase.dk';
  62. //$conf->domains[$i]->in = 'mail.bitbase.dk';
  63. $i++;
  64. $conf->domains[$i]->domain = 'users.kaospilot.no';
  65. $conf->domains[$i]->in = 'mail.kaospilot.no:993/ssl';
  66. $i++;
  67. $conf->domains[$i]->domain = 'dgi-huset.dk';
  68. $conf->domains[$i]->in = 'mail.dgi-huset.dk:993/ssl';
  69. $i++;
  70. $conf->domains[$i]->domain = 'idraetsdaghojskolen.dk';
  71. $conf->domains[$i]->in = 'mail.idraetsdaghojskolen.dk:993/ssl';
  72. // Is the user allowed to change his "From:" address? (true/false)
  73. $conf->allow_address_change = true;
  74. // Default tmp directory (where to store temporary uploaded files)
  75. // This should be something like '/tmp' on Unix System
  76. // And 'c:\\temp' on Win32 (note that we must escape "\")
  77. $conf->tmpdir = '/var/lib/nocc/tmp';
  78. // Preferences data directory
  79. // IMPORTANT: This directory must exist and be writable by the user
  80. // the webserver is running as (e.g. 'apache', or 'nobody'). For
  81. // Apache, see the User directive in the httpd.conf file.
  82. // See README for more about this.
  83. // This should be something like 'profiles/' on Unix System
  84. // or 'prefs\\' on Win32 (note that we must escape "\")
  85. // If left empty, preferences will be disabled.
  86. $conf->prefs_dir = '/var/lib/nocc/profiles';
  87. // Default folder to go first
  88. $conf->default_folder = 'INBOX';
  89. // ===> End of required parameters
  90. // The following parameters can be changed but it's not necessary to
  91. // get a working version of nocc
  92. // if browser has no preferred language, we use the default language
  93. // This is only needed for browsers that don't send any preferred
  94. // language such as W3 Amaya
  95. $conf->default_lang = 'en';
  96. // How many messages to display in the inbox (devel only)
  97. $conf->max_msg_num = 1;
  98. // let user see the header of a message
  99. $conf->use_verbose = true;
  100. // the user can logout or not (if nocc is used within your website
  101. // enter 'false' here else leave 'true')
  102. $conf->enable_logout = true;
  103. // the user can change their 'reply leadin' string
  104. $conf->enable_reply_leadin = false;
  105. // Whether or not to display attachment part number
  106. $conf->display_part_no = true;
  107. // Whether or not to display the Message/RFC822 into the attachments
  108. // (the attachments of that part are still available even if false is set
  109. $conf->display_rfc822 = true;
  110. // If you don't want to display images (GIF, JPEG and PNG) sent as attachements
  111. // set it to 'false'
  112. $conf->display_img_attach = true;
  113. // If you don't want to display text/plain attachments set it to 'false'
  114. $conf->display_text_attach = true;
  115. // By default the messages are sorted by date
  116. $conf->default_sort = '1';
  117. // By default the most recent is in top ('1' --> sorting top to bottom,
  118. // '0' --> bottom to top)
  119. $conf->default_sortdir = '1';
  120. // For old UCB POP server, change this setting to 1 to enable
  121. // new mail detection. Recommended: leave it to 0 for any other POP or
  122. // IMAP server.
  123. // See FAQ for more details.
  124. $conf->have_ucb_pop_server = false;
  125. // If you wanna make your own theme and force people to use that one,
  126. // set $conf->use_theme to false and fill in the $conf->default_theme to
  127. // the theme name you want to use
  128. // Theme handling: allows users to choose a theme on the login page
  129. $conf->use_theme = true;
  130. // Default theme
  131. $conf->default_theme = 'standard';
  132. // Error reporting
  133. // Display all errors (including IMAP connection errors, such as
  134. // 'host not found' or 'invalid login')
  135. $conf->debug_level = E_ALL;
  136. // Base URL where NOCC is hosted (only needed for Xitami servers, see #463390)
  137. // (NOTE: should end in a slash). Leave blank to prevent warnings if not used.
  138. //$conf->base_url = 'http://www.yoursite.com/webmail/';
  139. $conf->base_url = '';
  140. // Another tip for Xitami users, whose $_SERVER['PHP_SELF'] is broken
  141. // (see http://sourceforge.net/tracker/index.php?func=detail&aid=505194&group_id=12177&atid=112177)
  142. //$_SERVER['PHP_SELF'] = 'action.php';
  143. // Use old-style forwarding (quote original message, and attach original attachments).
  144. // This is discouraged, because it mangles the original message, removing important headers etc.
  145. $conf->broken_forwarding = false;
  146. // This sets the number of messages per page to display from a imap folder or pop mailbox
  147. $conf->msg_per_page = '25';
  148. // Set this to '1' to enable the status line for folders at the bottom of the inbox page.
  149. // If you get slow page loads, set it to '0' to disable this (rather slow) function.
  150. $conf->status_line = '1';
  151. // ################### Messages Signature ################### //
  152. // This message is added to every message, the user cannot delete it
  153. // Be careful if you modify this, do not forget to write '\r\n' to switch
  154. // to the next line !
  155. $conf->ad = "___________________________________\r\nNOCC, http://nocc.sourceforge.net";
  156. // PHP error reporting for this application
  157. error_reporting($conf->debug_level);
  158. // Prevent mangling of uploaded attachments
  159. set_magic_quotes_runtime(0);
  160. /*
  161. ################### End of Configuration ####################
  162. */
  163. require_once './user_prefs.php';
  164. require_once './user_filters.php';
  165. require_once './functions.php';
  166. // This function allows you to customise the default e-mail address
  167. function get_default_from_address() {
  168. if(!isset($_SESSION['nocc_user_prefs']))
  169. return '';
  170. $user_prefs = $_SESSION['nocc_user_prefs'];
  171. $from_address = "";
  172. // Determine e-mail address
  173. if(!empty($user_prefs->email_address))
  174. $from_address = $user_prefs->email_address;
  175. else {
  176. $from_address = $_SESSION['nocc_user'].'@'.$_SESSION['nocc_domain'];
  177. if($from_address == '@') {
  178. return '';
  179. }
  180. }
  181. // Append name if known
  182. if(!empty($user_prefs->full_name))
  183. $from_address = $user_prefs->full_name . ' <' . $from_address . '>';
  184. return $from_address;
  185. }
  186. ?>