adding bincimap preset
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 10 Sep 2005 12:50:46 +0000 (12:50 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 10 Sep 2005 12:50:46 +0000 (12:50 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10087 7612ce4b-ef26-0410-bec9-ea0150e637f0

ChangeLog
config/conf.pl
config/config_default.php
doc/presets.txt
plugins/administrator/defines.php
src/folders.php

index f4e670db04f1edff1a7cb3e5e2288d770be2287e..ac73fd9b3abdb65367a82878711834430664a776 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -445,6 +445,7 @@ Version 1.5.1 -- CVS
   - Running SquirrelMail with PHP register_globals = on will cause fatal error 
     in src/configtest.php.
   - Added field size controls to database preference backend (#1233721).
+  - Added bincimap preset (#1285099).
 
 Version 1.5.0 - 2 February 2004
 -------------------------------
index 4f7a175a6fc0213b9e9b08cace3ba46706263d59..20d62efdc5922e7d6b62cbe110bfe2eefb4347a0 100755 (executable)
@@ -3704,6 +3704,7 @@ sub set_defaults {
     $continue = 0;
     while ( $continue != 1 ) {
         print "Please select your IMAP server:\n";
+        print "    bincimap    = Binc IMAP server\n";
         print "    courier     = Courier IMAP server\n";
         print "    cyrus       = Cyrus IMAP server\n";
         print "    dovecot     = Dovecot Secure IMAP server\n";
@@ -3719,6 +3720,9 @@ sub set_defaults {
         $server = <STDIN>;
         $server =~ s/[\r\n]//g;
 
+        # variable is used to display additional messages.
+        $message = "";
+
         print "\n";
         if ( $server eq "cyrus" ) {
             $imap_server_type               = "cyrus";
@@ -3836,6 +3840,24 @@ sub set_defaults {
             $optional_delimiter             = "detect";
             $disp_default_folder_prefix     = "<none>";
 
+            $continue = 1;
+        } elsif ( $server eq "bincimap" ) {
+            $imap_server_type               = "bincimap";
+            $default_folder_prefix          = "INBOX/";
+            $trash_folder                   = "Trash";
+            $sent_folder                    = "Sent";
+            $draft_folder                   = "Drafts";
+            $show_prefix_option             = false;
+            $default_sub_of_inbox           = false;
+            $show_contain_subfolders_option = false;
+            $delete_folder                  = true;
+            $force_username_lowercase       = false;
+            $optional_delimiter             = "detect";
+            $disp_default_folder_prefix     = $default_folder_prefix;
+
+            # Default folder prefix depends on used depot.
+            $message = "\nIf you use IMAPdir depot, you must set default folder prefix to empty string.\n";
+
             $continue = 1;
         } elsif ( $server eq "quit" ) {
             $continue = 1;
@@ -3856,6 +3878,8 @@ sub set_defaults {
         print "            optional_delimiter = $optional_delimiter\n";
         print "                 delete_folder = $delete_folder\n";
         print "      force_username_lowercase = $force_username_lowercase\n";
+
+        print "$message";
     }
     print "\nPress enter to continue...";
     $tmp = <STDIN>;
index cdeb9a36801fa0c1696f111d25ac8a95465a5a56..a94e2b7a7718363d981f3f1a12a426b361d4d757 100644 (file)
@@ -192,14 +192,15 @@ $imapPort = 143;
  *
  * The type of IMAP server you are running.
  * Valid type are the following (case is important):
+ *   bincimap
  *   courier
  *   cyrus
+ *   dovecot
  *   exchange
- *   uw
- *   macosx
  *   hmailserver
+ *   macosx
  *   mercury32
- *   dovecot
+ *   uw
  *   other
  *
  * Please note that this changes only some of server settings.
index 339e8f62fa64b092f65302032db11e33c1e00b52..26ecf18eb277843e4300653e7dcd0e3290a8a3a4 100644 (file)
@@ -189,7 +189,7 @@ show_contain_subfolders_option = false
 --------------------
 'bincimap' settings:
 --------------------
-
+Preset is used with Binc IMAP server. Available since 1.5.1.
 Tested v.1.2.13 and 1.3.4
 
 CAPABILITY IMAP4rev1 STARTTLS AUTH=LOGIN AUTH=PLAIN (1.2.13)
index c8b6018b530a97b346d5c0b296f93ebc89451beb..c7819c2b0a531e94a6d98c967884acca85d1932a 100644 (file)
@@ -110,6 +110,7 @@ $defcfg = array( '$config_version' => array( 'name' => _("Config File Version"),
                                                                    'macosx' => _("Mac OS X Mailserver"),
                                                                    'hmailserver' => _("hMailServer IMAP server"),
                                                                    'mercury32' => _("Mercury/32 IMAP server"),
+                                                                   'bincimap' => _("Binc IMAP server"),
                                                                    'other' => _("Not one of the above servers") ) ),
                  '$optional_delimiter' => array( 'name' => _("IMAP Folder Delimiter"),
                                                  'type' => SMOPT_TYPE_STRING,
index 5dec790ad015d9706176f08b9e4d3a06a73aff8d..42c4a2cdfc8f44a52207b2e9fcfdba03c45a5caf 100644 (file)
@@ -154,6 +154,11 @@ if ( $server_type == 'courier' ) {
         // We don't need INBOX, since it is top folder
         array_push($skip_folders, 'INBOX');
     }
+} elseif ( $server_type == 'bincimap' ) {
+    if ( $default_folder_prefix == 'INBOX/' ) {
+        // We don't need INBOX, since it is top folder
+        array_push($skip_folders, 'INBOX');
+    }
 }
 
 if ( $default_sub_of_inbox == false ) {