summaryrefslogtreecommitdiff
path: root/nocc/conf.php
blob: 61873c0b60884296fac04122d218c9eee84df0b8 (plain)
  1. <?php
  2. /*
  3.  * $Header: /var/local/cvs/local-COMMON/nocc/conf.php,v 1.3 2003-03-11 07:24:27 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 = 'mail.bitbase.dk';
  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';
  54. $i++;
  55. $conf->domains[$i]->domain = 'homebase.dk';
  56. $conf->domains[$i]->in = 'mail.homebase.dk';
  57. $i++;
  58. $conf->domains[$i]->domain = '107b.dk';
  59. $conf->domains[$i]->in = 'mail.107b.dk';
  60. //$i++;
  61. //$conf->domains[$i]->domain = 'bitbase.dk';
  62. //$conf->domains[$i]->in = 'mail.bitbase.dk';
  63. $i++;
  64. $conf->domains[$i]->domain = 'vega.dk';
  65. $conf->domains[$i]->in = 'mail.vega.dk';
  66. // Is the user allowed to change his "From:" address? (true/false)
  67. $conf->allow_address_change = true;
  68. // Default tmp directory (where to store temporary uploaded files)
  69. // This should be something like '/tmp' on Unix System
  70. // And 'c:\\temp' on Win32 (note that we must escape "\")
  71. $conf->tmpdir = '/var/lib/nocc/tmp';
  72. // Preferences data directory
  73. // IMPORTANT: This directory must exist and be writable by the user
  74. // the webserver is running as (e.g. 'apache', or 'nobody'). For
  75. // Apache, see the User directive in the httpd.conf file.
  76. // See README for more about this.
  77. // This should be something like 'profiles/' on Unix System
  78. // or 'prefs\\' on Win32 (note that we must escape "\")
  79. // If left empty, preferences will be disabled.
  80. $conf->prefs_dir = '/var/lib/nocc/profiles';
  81. // Default folder to go first
  82. $conf->default_folder = 'INBOX';
  83. // ===> End of required parameters
  84. // The following parameters can be changed but it's not necessary to
  85. // get a working version of nocc
  86. // if browser has no preferred language, we use the default language
  87. // This is only needed for browsers that don't send any preferred
  88. // language such as W3 Amaya
  89. $conf->default_lang = 'en';
  90. // How many messages to display in the inbox (devel only)
  91. $conf->max_msg_num = 1;
  92. // let user see the header of a message
  93. $conf->use_verbose = true;
  94. // the user can logout or not (if nocc is used within your website
  95. // enter 'false' here else leave 'true')
  96. $conf->enable_logout = true;
  97. // the user can change their 'reply leadin' string
  98. $conf->enable_reply_leadin = false;
  99. // Whether or not to display attachment part number
  100. $conf->display_part_no = true;
  101. // Whether or not to display the Message/RFC822 into the attachments
  102. // (the attachments of that part are still available even if false is set
  103. $conf->display_rfc822 = true;
  104. // If you don't want to display images (GIF, JPEG and PNG) sent as attachements
  105. // set it to 'false'
  106. $conf->display_img_attach = true;
  107. // If you don't want to display text/plain attachments set it to 'false'
  108. $conf->display_text_attach = true;
  109. // By default the messages are sorted by date
  110. $conf->default_sort = '1';
  111. // By default the most recent is in top ('1' --> sorting top to bottom,
  112. // '0' --> bottom to top)
  113. $conf->default_sortdir = '1';
  114. // For old UCB POP server, change this setting to 1 to enable
  115. // new mail detection. Recommended: leave it to 0 for any other POP or
  116. // IMAP server.
  117. // See FAQ for more details.
  118. $conf->have_ucb_pop_server = false;
  119. // If you wanna make your own theme and force people to use that one,
  120. // set $conf->use_theme to false and fill in the $conf->default_theme to
  121. // the theme name you want to use
  122. // Theme handling: allows users to choose a theme on the login page
  123. $conf->use_theme = true;
  124. // Default theme
  125. $conf->default_theme = 'standard';
  126. // Error reporting
  127. // Display all errors (including IMAP connection errors, such as
  128. // 'host not found' or 'invalid login')
  129. $conf->debug_level = E_ALL;
  130. // Base URL where NOCC is hosted (only needed for Xitami servers, see #463390)
  131. // (NOTE: should end in a slash). Leave blank to prevent warnings if not used.
  132. //$conf->base_url = 'http://www.yoursite.com/webmail/';
  133. $conf->base_url = '';
  134. // Another tip for Xitami users, whose $_SERVER['PHP_SELF'] is broken
  135. // (see http://sourceforge.net/tracker/index.php?func=detail&aid=505194&group_id=12177&atid=112177)
  136. //$_SERVER['PHP_SELF'] = 'action.php';
  137. // Use old-style forwarding (quote original message, and attach original attachments).
  138. // This is discouraged, because it mangles the original message, removing important headers etc.
  139. $conf->broken_forwarding = false;
  140. // This sets the number of messages per page to display from a imap folder or pop mailbox
  141. $conf->msg_per_page = '25';
  142. // Set this to '1' to enable the status line for folders at the bottom of the inbox page.
  143. // If you get slow page loads, set it to '0' to disable this (rather slow) function.
  144. $conf->status_line = '1';
  145. // ################### Messages Signature ################### //
  146. // This message is added to every message, the user cannot delete it
  147. // Be careful if you modify this, do not forget to write '\r\n' to switch
  148. // to the next line !
  149. $conf->ad = "___________________________________\r\nNOCC, http://nocc.sourceforge.net";
  150. // PHP error reporting for this application
  151. error_reporting($conf->debug_level);
  152. // Prevent mangling of uploaded attachments
  153. set_magic_quotes_runtime(0);
  154. /*
  155. ################### End of Configuration ####################
  156. */
  157. require_once './user_prefs.php';
  158. require_once './user_filters.php';
  159. require_once './functions.php';
  160. // This function allows you to customise the default e-mail address
  161. function get_default_from_address() {
  162. if(!isset($_SESSION['nocc_user_prefs']))
  163. return '';
  164. $user_prefs = $_SESSION['nocc_user_prefs'];
  165. $from_address = "";
  166. // Determine e-mail address
  167. if(!empty($user_prefs->email_address))
  168. $from_address = $user_prefs->email_address;
  169. else {
  170. $from_address = $_SESSION['nocc_user'].'@'.$_SESSION['nocc_domain'];
  171. if($from_address == '@') {
  172. return '';
  173. }
  174. }
  175. // Append name if known
  176. if(!empty($user_prefs->full_name))
  177. $from_address = $user_prefs->full_name . ' <' . $from_address . '>';
  178. return $from_address;
  179. }
  180. ?>