made the sendmail/smtp option more clear
[squirrelmail.git] / config / conf.pl
index 2d6e34d740f486ae7f197533e0234aa92dfb059f..ea7dcd07453317347794352ecc90eee7e9ee6299 100755 (executable)
@@ -224,12 +224,13 @@ if (!$default_unseen_type) {
 
 while (($command ne "q") && ($command ne "Q")) {
    system "clear";
-   if ($menu == 0) {
-      print $WHT."SquirrelMail Configuration : ".$NRM;
-      if ($config == 1) { print "Read: config.php"; }
-      elsif ($config == 2) { print "Read: config_default.php"; }
-      print "\n";
+   print $WHT."SquirrelMail Configuration : ".$NRM;
+   if ($config == 1) { print "Read: config.php"; }
+   elsif ($config == 2) { print "Read: config_default.php"; }
+   print "\n";
+   print "---------------------------------------------------------\n";
 
+   if ($menu == 0) {
       print $WHT."Main Menu --\n".$NRM;
       print "1.  Organization Preferences\n";
       print "2.  Server Settings\n";
@@ -254,7 +255,13 @@ while (($command ne "q") && ($command ne "Q")) {
       print "1.  Domain               : $WHT$domain$NRM\n";
       print "2.  IMAP Server          : $WHT$imapServerAddress$NRM\n";
       print "3.  IMAP Port            : $WHT$imapPort$NRM\n";
-      print "4.  Use Sendmail         : $WHT$useSendmail$NRM\n";
+      print "4.  Use Sendmail/SMTP    : $WHT";
+      if ($useSendmail eq "true") {
+         print "Sendmail";
+      } else {
+         print "SMTP";
+      }
+      print "$NRM\n";
       if ($useSendmail eq "true") {
          print "5.    Sendmail Path      : $WHT$sendmail_path$NRM\n";
       } else {
@@ -395,9 +402,9 @@ while (($command ne "q") && ($command ne "Q")) {
          if    ($command == 1) { command61(); }
          elsif ($command == 2) { command62(); }
       } elsif ($menu == 7) {
-         if    ($command == 1) { $motd = command71(); }
+         if    ($command == 1) { $motd             = command71(); }
       } elsif ($menu == 8) {
-         if    ($command == 1) { $motd = command81(); }
+         if    ($command == 1) { $plugins = command81(); }
       }
    }   
 }
@@ -504,14 +511,16 @@ sub command14 {
    print "messages in SquirrelMail.  You can either connect to an SMTP server\n";
    print "or use sendmail directly.\n";
    if ($useSendmail eq "true") {
-      $default_value = "y";
+      $default_value = "1";
    } else {
-      $default_value = "n";
+      $default_value = "2";
    }
    print "\n";
-   print "Use Sendmail (y/n) [$WHT$default_value$NRM]: $WHT";
+   print "  1.  Sendmail\n";
+   print "  2.  SMTP\n";
+   print "Your choice [1/2] [$WHT$default_value$NRM]: $WHT";
    $use_sendmail = <STDIN>;
-   if (($use_sendmail =~ /^y\n/i) || (($use_sendmail =~ /^\n/) && ($default_value eq "y"))) {
+   if (($use_sendmail =~ /^1\n/i) || (($use_sendmail =~ /^\n/) && ($default_value eq "1"))) {
       $useSendmail = "true";
    } else {
       $useSendmail = "false";
@@ -586,7 +595,7 @@ sub command18 {
 sub command71 {
    print "\nYou can now create the welcome message that is displayed\n";
    print "every time a user logs on.  You can use HTML or just plain\n";
-   print "text.\n\n(Type @ on a blank line to exit)\n";
+   print "text.  If you do not wish to have one, just make it blank.\n\n(Type @ on a blank line to exit)\n";
    
    $new_motd = "";
    do {
@@ -1475,6 +1484,12 @@ sub save_data {
 
 sub set_defaults {
    system "clear";
+   print $WHT."SquirrelMail Configuration : ".$NRM;
+   if ($config == 1) { print "Read: config.php"; }
+   elsif ($config == 2) { print "Read: config_default.php"; }
+   print "\n";
+   print "---------------------------------------------------------\n";
+
    print "While we have been building SquirrelMail, we have discovered some\n";
    print "preferences that work better with some servers that don't work so\n";
    print "well with others.  If you select your IMAP server, this option will\n";
@@ -1541,12 +1556,21 @@ sub set_defaults {
                        $sent_folder = "INBOX/Sent Items";
                        $show_prefix_option = false;
                        $show_contain_subfolders_option = false;
-                       
                        $imap_server_type = "exchange";
          
+         print "          default_folder_prefix = INBOX/\n";
+         print "           default_sub_of_inbox = true\n";
+         print "                   trash_folder = \"INBOX/Deleted Items\"\n";
+         print "                    sent_folder = \"INBOX/Sent Items\"\n";
+         print "             show_prefix_option = false\n";
+         print " show_contain_subfolders_option = false\n";
+         print "               imap_server_type = exchange\n";
+         
                        $continue = 1;
       } elsif ($server eq "courier") {
                        $imap_server_type = "courier";
+
+         print "   imap_server_type = courier\n";
                        
          $continue = 1;
                } elsif ($server eq "quit") {