Browse Source

Adding missing options, removing globals (they are not stored in generated
config.php), reorganizing it according to conf.pl layout. Some of comments
talk about settings that will be valid only after one week.

tokul 21 years ago
parent
commit
77bad4eaf8
1 changed files with 317 additions and 172 deletions
  1. 317 172
      config/config_default.php

+ 317 - 172
config/config_default.php

@@ -10,77 +10,109 @@
  */
 
 /* Do not change this value. */
+global $version;
 global $config_version;
 $config_version = '1.4.0';
 
-/* Organization's logo picture (blank if none) */
-global $org_logo;
-$org_logo = SM_PATH . 'images/sm_logo.png';
-
-/*  The width of the logo (0 for default) */
-$org_logo_width = 308;
+/*** Organization preferences ***/
+/**
+ * Organization's name
+ */
+$org_name = "SquirrelMail";
 
-/*  The height of the logo (0 for default) */
-$org_logo_height = 111;
+/**
+ * Organization's logo picture (blank if none)
+ */
+$org_logo = SM_PATH . 'images/sm_logo.png';
 
+/**
+ * The width of the logo (0 for default)
+ */
+$org_logo_width = '308';
 
-/* Organization's name */
-global $org_name;
-$org_name = 'SquirrelMail';
+/**
+ * The height of the logo (0 for default)
+ */
+$org_logo_height = '111';
 
 /**
  * Webmail Title
  *   This is the web page title that appears at the top of the browser window.
  */
-global $org_title;
 $org_title = "SquirrelMail $version";
-    
+
 /**
- * Default language
- *   This is the default language. It is used as a last resort
- *   if SquirrelMail can't figure out which language to display.
- *   Use the two-letter code.
+ * Rather than going to the signout.php page (which only allows you
+ * to sign back in), setting signout_page allows you to sign the user
+ * out and then redirect to whatever page you want. For instance,
+ * the following would return the user to your home page:
+ *   $signout_page = '/';
+ * Set to the empty string to continue to use the default signout page.
  */
-global $squirrelmail_default_language;
-$squirrelmail_default_language = 'en_US';
+$signout_page = '';
 
-/* The dns name and port for your imap server. */
-global $imapServerAddress, $imapPort;
-$imapServerAddress = 'localhost';
-$imapPort = 143;
+/**
+ * By default SquirrelMail takes up the whole browser window,
+ * this allows you to embed it within sites using frames. Set
+ * this to the frame you want it to stay in.
+ */
+$frame_top = '_top';
 
+/**
+ * Here you can set link displayed on the right side of main page.
+ * $provider_name sets name of link
+ * $provider_url set address used in the link
+ *
+ * Link will be displayed only if you have $hide_sm_attributions 
+ * option set to true.
+ */
+$provider_name = 'SquirrelMail';
+$provider_uri = 'http://www.squirrelmail.org/';
+
+
+/*** Server Settings ***/
 /**
  * The domain part of local email addresses.
  *   This is for all messages sent out from this server.
  *   Reply address is generated by $username@$domain
  * Example: In bob@foo.com, foo.com is the domain.
  */
-global $domain;
 $domain = 'example.com';
 
-/* Your SMTP server and port number (usually the same as the IMAP server). */
-global $smtpServerAddress, $smtpPort;
-$smtpServerAddress = 'localhost';
-$smtpPort = 25;
+/**
+ * If you are running on a machine that doesn't have the tm_gmtoff
+ * value in your time structure and if you are in a time zone that
+ * has a negative offset, you need to set this value to 1. This is
+ * typically people in the US that are running Solaris 7.
+ */
+$invert_time = false;
 
 /**
- * Uncomment this if you want to deliver locally using sendmail
- * instead of connecting to a SMTP-server.
+ * What should be used when sending email.
+ * If it is set to false, SquirrelMail will use SMTP server settings.
+ * If it is set to true, SquirrelMail will use program defined in 
+ * $sendmail_path
  */
-#global $useSendmail, $sendmail_path;
-#$useSendmail = true;
-#$sendmail_path = '/usr/sbin/sendmail';
+$useSendmail = false;
 
-/* This is a message that is displayed immediately after a user logs in. */
-global $motd;
-$motd = '';
+/**
+ * Your SMTP server and port number (usually the same as the IMAP server).
+ */
+$smtpServerAddress = 'localhost';
+$smtpPort = 25;
 
 /**
- * Whether or not to use a special color for special folders. If not,
- * special folders will be the same color as the other folders.
+ * Program that should be used when sending email. SquirrelMail expects that
+ * this program will follow options used by original sendmail 
+ * (http://www.sendmail.org).
  */
-global $use_special_folder_color;
-$use_special_folder_color = true;
+$sendmail_path = '/usr/sbin/sendmail';
+    
+/**
+ * The dns name (or IP address) and port for your imap server.
+ */
+$imapServerAddress = 'localhost';
+$imapPort = 143;
 
 /**
  * The type of IMAP server you are running.
@@ -89,22 +121,52 @@ $use_special_folder_color = true;
  *   cyrus
  *   exchange
  *   uw
+ *   macosx
+ *   mercury32
  *   other
+ *
+ * Please note that this changes only some of server settings.
+ *
+ * In order to set everything correctly, you need to adjust several
+ * squirrelmail options. These options are listed in doc/presets.txt
  */
-global $imap_server_type;
 $imap_server_type = 'other';
 
 /**
- * Rather than going to the signout.php page (which only allows you
- * to sign back in), setting signout_page allows you to sign the user
- * out and then redirect to whatever page you want. For instance,
- * the following would return the user to your home page:
- *   $signout_page = '/';
- * Set to the empty string to continue to use the default signout page.
+ * Advanced authentication options
+ * CRAM-MD5, DIGEST-MD5, Plain, and TLS
+ * Set reasonable defaults - you'd never know this was there unless you ask for it
  */
-global $signout_page;
-$signout_page = '';
+$use_imap_tls = false;
+$use_smtp_tls = false;
 
+/**
+ * auth_mech can be either 'login','plain', 'cram-md5', or 'digest-md5'
+ *  SMTP can also be 'none'
+ */
+$smtp_auth_mech = 'none';
+$imap_auth_mech = 'login';
+
+/**
+ * This is the delimiter that your IMAP server uses to distinguish between
+ * folders.  For example, Cyrus uses '.' as the delimiter and a complete
+ * folder would look like 'INBOX.Friends.Bob', while UW uses '/' and would
+ * look like 'INBOX/Friends/Bob'.  Normally this should be left at 'detect'
+ * but if you are sure you know what delimiter your server uses, you can
+ * specify it here.
+ *
+ * To have it autodetect the delimiter, set it to 'detect'.
+ */
+$optional_delimiter = 'detect';
+
+/**
+ * Do you wish to use POP3 before SMTP?  Your server must
+ * support this in order for SquirrelMail to work with it.
+ */
+$pop_before_smtp = false;
+
+
+/*** Folder Settings ***/
 /**
  * Many servers store mail in your home directory. With this, they
  * store them in a subdirectory: mail/ or Mail/, etc. If your server
@@ -119,7 +181,6 @@ $signout_page = '';
  *
  * If you do not use this, set it to the empty string.
  */
-global $default_folder_prefix;
 $default_folder_prefix = '';
 
 /**
@@ -127,20 +188,27 @@ $default_folder_prefix = '';
  * to false. Otherwise, if it is true, they can change the folder prefix
  * to be anything.
  */
-global $show_prefix_option;
 $show_prefix_option = false;
 
 /**
  * The following are related to deleting messages.
- *   $move_to_trash
- *      if this is set to 'true', when 'delete' is pressed, it
+ *   $default_move_to_trash
+ *      If this is set to 'true', when 'delete' is pressed, it
  *      will attempt to move the selected messages to the folder
  *      named $trash_folder. If it's set to 'false', we won't even
  *      attempt to move the messages, just delete them.
+ *   $default_move_to_sent
+ *      If this is set to 'true', sent messages will be stored in
+ *      $sent_folder by default.
+ *   $default_save_as_draft
+ *      If this is set to 'true', users are able to use $draft_folder
+ *      to store their unfinished messages.
  *   $trash_folder
  *      This is the path to the default trash folder. For Cyrus
  *      IMAP, it would be 'INBOX.Trash', but for UW it would be
  *      'Trash'. We need the full path name here.
+ *   $draft_folder
+ *      This is the patch to where Draft messages will be stored.
  *   $auto_expunge
  *      If this is true, when a message is moved or copied, the
  *      source mailbox will get expunged, removing all messages
@@ -151,9 +219,6 @@ $show_prefix_option = false;
  *      If this is true, when a folder is deleted then it will
  *      not get moved into the Trash folder.
  */
-global $default_move_to_trash, $default_move_to_sent, $default_save_as_draft;
-global $trash_folder, $sent_folder, $draft_folder, $auto_expunge;
-global $delete_folder;
 $default_move_to_trash = true;
 $default_move_to_sent  = true;
 $default_save_as_draft = true;
@@ -163,22 +228,25 @@ $draft_folder = 'INBOX.Drafts';
 $auto_expunge = true;
 $delete_folder = false;
 
+/**
+ * Whether or not to use a special color for special folders. If not,
+ * special folders will be the same color as the other folders.
+ */
+$use_special_folder_color = true;
+
 /**
  * Should I create the Sent and Trash folders automatically for
  * a new user that doesn't already have them created?
  */
-global $auto_create_special;
 $auto_create_special = true;
 
 /* Whether or not to list the special folders first (true/false). */
-global $list_special_folders_first;
 $list_special_folders_first = true;
 
 /**
  * Are all your folders subfolders of INBOX (i.e. cyrus IMAP server).
  * If you are unsure, set it to false.
  */
-global $default_sub_of_inbox;
 $default_sub_of_inbox = true;
 
 /**
@@ -192,18 +260,29 @@ $default_sub_of_inbox = true;
  * anything if it's true, but some servers will respond weird if it's
  * false. (Cyrus works fine whether it's true OR false).
  */
-global $show_contain_subfolders_option;
 $show_contain_subfolders_option = false;
 
 /**
- * This option controls what character set is used when sending mail
- * and when sending HTMl to the browser. Do not set this to US-ASCII,
- * use ISO-8859-1 instead. For cyrillic it is best to use KOI8-R,
- * since this implementation is faster than the alternatives.
+ * These next two options set the defaults for the way that the
+ * users see their folder list.
+ *   $default_unseen_notify
+ *       Specifies whether or not the users will see the number of 
+ *       unseen in each folder by default and also which folders to
+ *       do this to. Valid values are: 1=none, 2=inbox, 3=all.
+ *   $default_unseen_type
+ *       Specifies the type of notification to give the users by
+ *       default. Valid choice are: 1=(4), 2=(4,25).
  */
-global $default_charset;
-$default_charset = 'iso-8859-1';
+$default_unseen_notify = 2;
+$default_unseen_type   = 1;
 
+/**
+ * This enables the no select fix for Cyrus when subfolders
+ * exist but parent folders do not
+ */
+$noselect_fix_enable = false;
+
+/*** General options ***/
 /**
  * Path to the data/ directory
  *   It is a possible security hole to have a writable directory
@@ -216,10 +295,9 @@ $default_charset = 'iso-8859-1';
  * Absolute:
  *   $data_dir = '/usr/local/squirrelmail/data/';
  *
- * Relative (to the config directory):
+ * Relative (to main SM directory):
  *   $data_dir = SM_PATH . 'data/';
  */
-global $data_dir;
 $data_dir = SM_PATH . 'data/';
 
 /**
@@ -235,19 +313,25 @@ $data_dir = SM_PATH . 'data/';
  *       there for too long.
  *    + It should probably be another directory than data_dir.
  */
-global $attachment_dir;
-$attachment_dir = "$data_dir";
+$attachment_dir = $data_dir;
 
-/* Hash level used for data directory. */
-global $dir_hash_level;
+/**
+ * Hash level used for data directory.
+ * 
+ * This option allows spliting file based squirrelmail user
+ * data storage directory into several subfolders. Number from
+ * 0 to 4 allows allows having up to four subfolder levels.
+ *
+ * Hashing should speed up directory access if you have big number 
+ * of users (500 and more).
+ */
 $dir_hash_level = 0;
 
 /**
  * This is the default size of the folder list. Default
  * is 150, but you can set it to whatever you wish.
  */
-global $default_left_size;
-$default_left_size = 150;
+$default_left_size = '150';
 
 /**
  * Some IMAP servers allow a username (like 'bob') to log in if they use
@@ -255,9 +339,61 @@ $default_left_size = 150;
  * preference files.  Toggling this option to true will transparently
  * change all usernames to lowercase.
  */
-global $force_username_lowercase;
 $force_username_lowercase = false;
 
+/**
+ * This option enables use of email priority flags by end users.
+ */
+$default_use_priority = true;
+
+/**
+ * This option disables display of "created by squirrelmail developers" 
+ * strings and provider link
+ */
+$hide_sm_attributions = false;
+
+/**
+ * This option enables use of read/delivery reciepts by end users.
+ */
+$default_use_mdn = true;
+
+/**
+ * If you don't want to allow users to change their email address
+ * then you can set $edit_identity to false, if you want them to
+ * not be able to change their full name too then set $edit_name
+ * to false as well. $edit_name has no effect unless $edit_identity
+ * is false;
+ */
+$edit_identity = true;
+$edit_name = true;
+
+/**
+ * If you want to enable server side thread sorting options
+ * Your IMAP server must support the THREAD extension for 
+ * this to work.
+ */
+$allow_thread_sort = false;
+
+/** 
+ * to use server-side sorting instead of SM client side.
+ * Your IMAP server must support the SORT extension for this
+ * to work.
+ */
+$allow_server_sort = false;
+
+/**
+ * This option allows you to choose if SM uses charset search
+ * Your imap server should support SEARCH CHARSET command for 
+ * this to work.
+ */
+$allow_charset_search = true;
+
+/**
+ * PHP session name.  Leave this alone unless you know what you are doing.
+ */
+$session_name = 'SQMSESSID';
+
+
 /**
  * Themes
  *   You can define your own theme and put it in this directory.
@@ -267,11 +403,13 @@ $force_username_lowercase = false;
  *
  * To add a new theme to the options that users can choose from, just
  * add a new number to the array at the bottom, and follow the pattern.
+ * 
+ * $theme_default sets theme that will be used by default
+ * $theme_css sets stylesheet (from theme/css directory) that will be 
+ * used by default.
  */
-
 $theme_default = 0;
-
-global $theme;
+$theme_css = '';
 
 $theme[0]['PATH'] = SM_PATH . 'themes/default_theme.php';
 $theme[0]['NAME'] = 'Default';
@@ -395,25 +533,7 @@ $theme[35]['NAME'] = 'Minimal BW';
  *       'base' => 'ou=member_directory,o=netcenter.com'
  *   ); 
  */
-global $ldap_server;
-
-/**
- * Database-driven private addressbooks
- *   DSN (Data Source Name) for a database where the private
- *   addressbooks are stored.  See doc/db-backend.txt for more info.
- *   If it is not set, the addressbooks are stored in files
- *   in the data dir.
- *   The DSN is in the format: mysql://user:pass@hostname/dbname
- *   The table is the name of the table to use within the
- *   specified database.
- */
-global $addrbook_dsn, $addrbook_table;
-$addrbook_dsn = '';
-$addrbook_table = 'address';
-
-global $prefs_dsn, $prefs_table;
-$prefs_dsn = '';
-$prefs_table = 'userprefs';
+// Add your ldap server options here
 
 /**
  * Users may search their addressbook via either a plain HTML or Javascript
@@ -422,43 +542,16 @@ $prefs_table = 'userprefs';
  *    true  = javascript
  *    false = html
  */
-global $default_use_javascript_addr_book;
 $default_use_javascript_addr_book = false;
 
-/**
- * These next two options set the defaults for the way that the
- * users see their folder list.
- *   $default_unseen_notify
- *       Specifies whether or not the users will see the number of 
- *       unseen in each folder by default and also which folders to
- *       do this to. Valid values are: 1=none, 2=inbox, 3=all.
- *   $default_unseen_type
- *       Specifies the type of notification to give the users by
- *       default. Valid choice are: 1=(4), 2=(4,25).
- */
-global $default_unseen_notify, $default_unseen_type;
-$default_unseen_notify = 2;
-$default_unseen_type   = 1;
- 
-/**
- * If you are running on a machine that doesn't have the tm_gmtoff
- * value in your time structure and if you are in a time zone that
- * has a negative offset, you need to set this value to 1. This is
- * typically people in the US that are running Solaris 7.
- */
-global $invert_time;
-$invert_time = false;
 
 /**
- * By default SquirrelMail takes up the whole browser window,
- * this allows you to embed it within sites using frames. Set
- * this to the frame you want it to stay in.
+ * MOTD
+ * This is a message that is displayed immediately after a user logs in. 
  */
+$motd = "";
 
-global $frame_top;
-$frame_top = '_top';
 
-global $plugins;
 /**
  * To install plugins, just add elements to this array that have
  * the plugin directory name relative to the /plugins/ directory.
@@ -467,75 +560,127 @@ global $plugins;
  *    $plugins[0] = 'sqclock';
  *    $plugins[1] = 'attachment_common';
  */
+// Add list of enabled plugins here
 
+
+/*** Database ***/
 /**
- * If you don't want to allow users to change their email address
- * then you can set $edit_identity to false, if you want them to
- * not be able to change their full name too then set $edit_name
- * to false as well. $edit_name has no effect unless $edit_identity
- * is false;
+ * Read doc/database.txt in order to get more information 
+ * about these settings.
  */
-
-global $edit_identity, $edit_name;
-$edit_identity = true;
-$edit_name = true;
+/**
+ * Database-driven private addressbooks
+ *   DSN (Data Source Name) for a database where the private
+ *   addressbooks are stored.  See doc/db-backend.txt for more info.
+ *   If it is not set, the addressbooks are stored in files
+ *   in the data dir.
+ *   The DSN is in the format: mysql://user:pass@hostname/dbname
+ *   The table is the name of the table to use within the
+ *   specified database.
+ */
+$addrbook_dsn = '';
+$addrbook_table = 'address';
+/**
+ * Database used to store user data
+ */
+$prefs_dsn = '';
+$prefs_table = 'userprefs';
+$prefs_key_field = 'prefkey';
+$prefs_user_field = 'user';
+$prefs_val_field = 'prefval';
 
 
+/*** Language settings ***/
 /**
- * If you want to enable server side thread sorting options
- * Your IMAP server must support the THREAD extension for 
- * this to work.
+ * Default language
+ *   This is the default language. It is used as a last resort
+ *   if SquirrelMail can't figure out which language to display.
+ *   Language names usually consist of language code, undercore 
+ *   symbol and country code
  */
+$squirrelmail_default_language = 'en_US';
 
-global $allow_thread_sort;
-$allow_thread_sort = false;
+/**
+ * This option controls what character set is used when sending mail
+ * and when sending HTML to the browser. Do not set this to US-ASCII,
+ * use ISO-8859-1 instead.
+ * 
+ * You can set this option, only if $squirrelmail_default_language setting
+ * contains 'en_US' string. In any other case system does not allow 
+ * making mistakes with incorrect language and charset combinations.
+ */
+$default_charset = 'iso-8859-1';
 
-/** 
- * to use server-side sorting instead of SM client side.
- * Your IMAP server must support the SORT extension for this
- * to work.
+/**
+ * This option controls number of languages available to end user in
+ * language selection preferences. You can use space separated list
+ * of translations installed in locale/ directory or special keys
+ * 'all' (all languages are available) and 'none' (language selection
+ * is disabled, interface is set to $squirrelmail_default_language
  */
+$available_languages   = 'all';
 
-global $allow_server_sort;
-$allow_server_sort = false;
+/**
+ * This options allows displaying native language names in language 
+ * selection box.
+ */
+$show_alternative_names   = false;
 
 /**
- * This enables the no select fix for Cyrus when subfolders
- * exist but parent folders do not
+ * This option enables reading of Eastern multibyte encodings. 
+ * Functions that provide this support are very cpu and memory intensive.
+ * Don't enable this option unless you really need it.
  */
+$agresive_decoding = false;
 
-global $noselect_fix_enable;
-$noselect_fix_enable = false;
+/*** Tweaks ***/
+/**
+ * Use experimental DHTML folder listing
+ */
+$advanced_tree = false;
+/**
+ * Use older way of folder listing
+ */
+$oldway = false;
+/**
+ * Use experimental code with php recode functions when reading messages with
+ * different encoding. This code is faster that original SM functions,
+ * but it require php with recode support.
+ * 
+ * Don't enable this option if you are not sure about availability of 
+ * recode support.
+ */
+$use_php_recode = false;
+/**
+ * Use experimental code with php iconv functions when reading messages with
+ * different encoding. This code is faster that original SM functions,
+ * but it require php with iconv support and works only with some translations.
+ * 
+ * Don't enable this option if you are not sure about availability of 
+ * iconv support.
+ */
+$use_php_iconv = false;
 
 /**
  * this disables listing all of the folders on the IMAP Server to
  * generate the folder subscribe listbox (this can take a long time
  * when you have a lot of folders).  Instead, a textbox will be
- * displayed allowing users to enter a specific folder name to subscribe to */
-global $no_list_for_subscribe;
+ * displayed allowing users to enter a specific folder name to subscribe to
+ * 
+ * This option can't be changed by conf.pl
+ */
 $no_list_for_subscribe = false;
 
 /**
- * Advanced authentication options
- * CRAM-MD5, DIGEST-MD5, Plain, and TLS
- * Set reasonable defaults - you'd never know this was there unless you ask for it
+ * This option is used only by conf.pl script to generate configuration
+ * menu with some colors and is provided here only as reference. 
  */
-global $use_imap_tls;
-global $use_smtp_tls;
-$use_imap_tls = false;
-$use_smtp_tls = false;
-
-/* auth_mech can be either 'login','plain', 'cram-md5', or 'digest-md5'
-   SMTP can also be 'none'
-*/
-global $smtp_auth_mech;
-global $imap_auth_mech;
-$smtp_auth_mech = 'none';
-$imap_auth_mech = 'login';
+$config_use_color = 2;
 
-/* PHP session name.  Leave this alone unless you know what you are doing. */
-global $session_name;
-$session_name = 'SQMSESSID';
+/**
+ * This option includes special configuration options
+ */
+@include SM_PATH . 'config/config_local.php';
 
 /**
  * Make sure there are no characters after the PHP closing
@@ -544,4 +689,4 @@ $session_name = 'SQMSESSID';
  * sent and regular output to begin, which will majorly screw
  * things up when we try to send more headers later.
  */
-?>
+?>