" 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 ) {
$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 {
- Encoded From headers now properly quoted (#2830141).
- Multibyte strings (notably subjects) are now handled correctly (#2824813,
#2925731).
- - Send X-DNS-Prefetch-Control: off header to browsers to prevent information
+ - X-DNS-Prefetch-Control: off header is now sent to browsers to prevent information
leakage when Firefox does DNS prefetching for URL's contained in emails.
+ - Added the ability to configure Google Mail (Gmail) as the mail server
+ behind SquirrelMail.
Version 1.5.1 (branched on 2006-02-12)
--------------------------------------
* Configuration with Maildir++ depot and . delimiter - use courier preset.
+
+
+---------------------
+'gmail' settings:
+---------------------
+Support for using SquirrelMail as a front end for Google Mail (Gmail)
+accounts was added in SquirrelMail versions 1.4.20 and 1.5.2 and is
+currently experimental.
+
+CAPABILITY IMAP4rev1 UNSELECT LITERAL+ IDLE NAMESPACE QUOTA ID XLIST CHILDREN
+X-GM-EXT-1 UIDPLUS COMPRESS=DEFLATE
+
+Notes:
+* Might want to remove "All Mail" from folder drop-down lists (such as the
+ ones for moving mail to folders... "All Mail" is not a folder in Gmail
+ (it is a super-folder that shows mail from all folders)
+* Might want to remove the whole folder list drop-down from Create Folder
+ section, since labels/folders are usually just created as children of <none>
+* Might want to remove any folders prefixed with [Gmail]/ from the rename
+ and delete folders drop down selectors, since those are Gmail system folders
+* Might want to tweak what's included in the (un)subscribe menus too(?)
+* The folder list order is slightly strange, with the Gmail system folders
+ listed below the user labels/folders
+* When a user changes languages in Gmail's interface, the Drafts, Sent and
+ Trash folder names are changed to localized versions thereof. To see those
+ folders correctly in SquirrelMail, the user should change the SquirrelMail
+ language to match. Moreover, SquirrelMail then needs to be told what
+ folders to use for Drafts, Sent and Trash in Options --> Folder Preferences.
+ These default settings will only correctly find the Sent, Trash and Drafts
+ folders if both Gmail and SquirrelMail languages are set to English.
+ (This could be solved with implementation of extended LIST command support.)
+* In some places (Europe?), the "[Gmail]" prefix should be "[Google Mail]"
+ and "Trash" might be called "Bin"
+
+ imap_server_type = gmail
+ default_folder_prefix = <none> (is set to empty string)
+ 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
+ optional_delimiter = /
+ delete_folder = true
+ force_username_lowercase = false
+ domain = gmail.com
+ imapServerAddress = imap.gmail.com
+ imapPort = 993
+ use_imap_tls = true
+ imap_auth_mech = login
+ smtpServerAddress = smtp.gmail.com
+ smtpPort = 465
+ use_smtp_tls = true
+ smtp_auth_mech = login
+ pop_before_smtp = false
+ useSendmail = false
+
+-------------------
}
$header = $message->header;
+// gmail does not mark messages as read when retrieving the message body
+// even though RFC 3501, section 6.4.5 (FETCH Command) says:
+// "The \Seen flag is implicitly set; if this causes the flags to change,
+// they SHOULD be included as part of the FETCH responses."
+//
+if ($imap_server_type == 'gmail') {
+ sqimap_toggle_flag($imapConnection, $passed_id, '\\Seen', true, true);
+}
/****************************************/
/* Block for handling incoming url vars */