#!/usr/bin/env perl
# conf.pl
#
-# Copyright (c) 1999-2009 The SquirrelMail Project Team
+# Copyright (c) 1999-2012 The SquirrelMail Project Team
# Licensed under the GNU GPL. For full terms see COPYING.
#
# A simple configure script to configure SquirrelMail
" hmailserver = hMailServer\n" .
" macosx = Mac OS X Mailserver\n" .
" mercury32 = Mercury/32\n" .
- " uw = University of Washington's IMAP server\n";
+ " uw = University of Washington's IMAP server\n" .
+ " gmail = IMAP access to Google mail (Gmail) accounts\n";
#####################################################################################
if ( $config_use_color == 1 ) {
# SMTP authentication type
-# Possible choices: none, plain, cram-md5, digest-md5
+# Possible choices: none, login, plain, cram-md5, digest-md5
sub command112b {
if ($use_smtp_tls ne "0") {
print "Auto-detection of login methods is unavailable when using TLS or STARTTLS.\n";
print $sock "QUIT\r\n";
close $sock;
}
+
# Try login (SquirrelMail default)
print "Testing login:\t\t";
$tmp=detect_auth_support('SMTP',$host,'LOGIN');
print $WHT . "ERROR DETECTING$NRM\n";
}
+ # Try plain
+ print "Testing plain:\t\t";
+ $tmp=detect_auth_support('SMTP',$host,'PLAIN');
+ if (defined($tmp)) {
+ if ($tmp eq 'YES') {
+ print $WHT . "SUPPORTED$NRM\n";
+ } else {
+ print $WHT . "NOT SUPPORTED$NRM\n";
+ }
+ } else {
+ print $WHT . "ERROR DETECTING$NRM\n";
+ }
+
# Try CRAM-MD5
print "Testing CRAM-MD5:\t";
$tmp=detect_auth_support('SMTP',$host,'CRAM-MD5');
print "\nWhat authentication mechanism do you want to use for SMTP connections?\n";
print $WHT . "none" . $NRM . " - Your SMTP server does not require authorization.\n";
print $WHT . "login" . $NRM . " - Plaintext. If you can do better, you probably should.\n";
- print $WHT . "plain" . $NRM . " - SASL PLAIN. You already know it if you need this.\n";
+ print $WHT . "plain" . $NRM . " - SASL PLAIN. Plaintext. If you can do better, you probably should.\n";
print $WHT . "cram-md5" . $NRM . " - Slightly better than plaintext.\n";
print $WHT . "digest-md5" . $NRM . " - Privacy protection - better than cram-md5.\n";
print $WHT . "\n*** YOUR SMTP SERVER MUST SUPPORT THE MECHANISM YOU CHOOSE HERE ***\n" . $NRM;
print "If you don't understand or are unsure, you probably want \"none\"\n\n";
- print "none, login, cram-md5, or digest-md5 [$WHT$smtp_auth_mech$NRM]: $WHT";
+ print "none, login, plain, cram-md5, or digest-md5 [$WHT$smtp_auth_mech$NRM]: $WHT";
$inval=<STDIN>;
chomp($inval);
if ($inval =~ /^none\b/i) {
sub command311b {
print "$NRM";
- print "\n SquirrelMail adds username information to every outgoing
- email in order to prevent possible sender forging when users are
- allowed to change their email and/or full name.
+ print "\n SquirrelMail adds username information to every outgoing email in
+ order to prevent possible sender forging by users that are allowed
+ to change their email and/or full name.
- You can remove user information from this header (y) if you think that
- it violates privacy or security.
+ You can remove user information from this header (y) if you think
+ that it violates privacy or security.
- Note: If users are allowed to change their email addresses,
- this setting will make it difficult to determine who sent what where.
+ Note: If users are allowed to change their email addresses, this
+ setting will make it difficult to determine who sent what where.
Use at your own risk.
Note: If you have defined a header encryption key in your SMTP or
print "[$WHT$addrbook_dsn$NRM]: $WHT";
$new_dsn = <STDIN>;
if ( $new_dsn eq "\n" ) {
- $new_dsn = "";
+ $new_dsn = $addrbook_dsn;
} else {
$new_dsn =~ s/[\r\n]//g;
$new_dsn =~ s/^\s+$//g;
print "[$WHT$prefs_dsn$NRM]: $WHT";
$new_dsn = <STDIN>;
if ( $new_dsn eq "\n" ) {
- $new_dsn = "";
+ $new_dsn = $prefs_dsn;
} else {
$new_dsn =~ s/[\r\n]//g;
$new_dsn =~ s/^\s+$//g;
sub command95 {
print "This is the name of the field in which you want to store the\n";
- print "username of the person the prefs are for. It default to 'user'\n";
- print "which clashes with a reserved keyword in PostgreSQL so this\n";
- print "will need to be changed for that database at least\n";
+ print "username of the person the prefs are for. It defaults to 'user'\n";
print "\n";
print "[$WHT$prefs_user_field$NRM]: $WHT";
$new_field = <STDIN>;
print "[$WHT$addrbook_global_dsn$NRM]: $WHT";
$new_dsn = <STDIN>;
if ( $new_dsn eq "\n" ) {
- $new_dsn = "";
+ $new_dsn = $addrbook_global_dsn;
} else {
$new_dsn =~ s/[\r\n]//g;
$new_dsn =~ s/^\s+$//g;
print "1 " . ($sm_debug_mode & 1 ? "y" : " ")
. " Simple debugging (PHP E_ERROR)\n";
print "2 " . ($sm_debug_mode & 512 ? "y" : " ")
- . " Moderate debugging (PHP E_ALL)\n";
+ . " Moderate debugging (PHP E_ALL without E_STRICT)\n";
print "3 " . ($sm_debug_mode & 524288 ? "y" : " ")
- . " Advanced debugging (PHP E_ALL plus log errors\n";
- print " intentionally suppressed)\n";
+ . " Advanced debugging (PHP E_ALL (without E_STRICT) plus\n";
+ print " log errors intentionally suppressed)\n";
print "4 " . ($sm_debug_mode & 536870912 ? "y" : " ")
- . " Strict debugging (PHP E_STRICT)\n";
+ . " Strict debugging (PHP E_ALL and E_STRICT)\n";
print "\n";
print "SquirrelMail debug mode (0,1,2,3,4) or d when done? : $WHT";
# integer
print CF " 'search_tree' => $ldap_search_tree[$count]";
}
- if ( $ldap_listing[$count] ) {
+ if ( $ldap_starttls[$count] ) {
print CF ",\n";
# boolean
print CF " 'starttls' => $ldap_starttls[$count]";
$message = "\nIf you use IMAPdir depot, you must set default folder prefix to empty string.\n";
$continue = 1;
+ } elsif ( $server eq "gmail" ) {
+ $imap_server_type = "gmail";
+ $default_folder_prefix = "";
+ $trash_folder = "[Gmail]/Trash";
+ $default_move_to_trash = true;
+ $sent_folder = "[Gmail]/Sent Mail";
+ $draft_folder = "[Gmail]/Drafts";
+ $auto_create_special = false;
+ $show_prefix_option = false;
+ $default_sub_of_inbox = false;
+ $show_contain_subfolders_option = false;
+ $delete_folder = true;
+ $force_username_lowercase = false;
+ $optional_delimiter = "/";
+ $disp_default_folder_prefix = "<none>";
+ $domain = "gmail.com";
+ $imapServerAddress = "imap.gmail.com";
+ $imapPort = 993;
+ $use_imap_tls = true;
+ $imap_auth_mech = "login";
+ $smtpServerAddress = "smtp.gmail.com";
+ $smtpPort = 465;
+ $pop_before_smtp = false;
+ $useSendmail = false;
+ $use_smtp_tls = true;
+ $smtp_auth_mech = "login";
+ $continue = 1;
+
+ # Gmail changes system folder names (Drafts, Sent, Trash) out
+ # from under you when the user changes language settings
+ $message = "\nNOTE! When a user changes languages in Gmail's interface, the\n"
+ . "Drafts, Sent and Trash folder names are changed to localized\n"
+ . "versions thereof. To see those folders correctly in SquirrelMail,\n"
+ . "the user should change the SquirrelMail language to match.\n"
+ . "Moreover, SquirrelMail then needs to be told what folders to use\n"
+ . "for Drafts, Sent and Trash in Options --> Folder Preferences.\n"
+ . "These default settings will only correctly find the Sent, Trash\n"
+ . "and Drafts folders if both Gmail and SquirrelMail languages are\n"
+ . "set to English.\n\n"
+ . "Also note that in some regions (Europe?), the default folder\n"
+ . "names (see main menu selection 3. Folder Defaults) are different\n"
+ . "(they may need to have the prefix \"[Google Mail]\" instead of\n"
+ . "\"[Gmail]\") and \"Trash\" may be called \"Bin\" instead.\n";
+
} elsif ( $server eq "quit" ) {
$continue = 1;
} else {