Version 0.5pre1 -- DEVELOPMENT
------------------------------
+- Folder list now shows configurable details about messages
- It is now possible to select multiple subscribes/unsubscribes
- Removed a bunch of annoying "success" screens, improved navigation
- Better IMAP session handling
have a few minutes, please send us an email to let us know! You can send
it to our mailing list: squirrelmail-list@sourceforge.net
+You can also go to the page below and fill out a small form to get listed
+with the list of people already using SquirrelMail.
+
+ http://www.squirrelmail.org/index.php3?page=16
+
Contact:
--------
It is pretty easy to get in contact with the developers if you need help or
if (!$sendmail_path) {
$sendmail_path = "/usr/sbin/sendmail";
}
+if (!$default_unseen_notify) {
+ $default_unseen_notify = 2;
+}
+if (!$default_unseen_type) {
+ $default_unseen_type = 1;
+}
#####################################################################################
print "9. Auto Expunge : $WHT$auto_expunge$NRM\n";
print "10. Default Sub. of INBOX : $WHT$default_sub_of_inbox$NRM\n";
print "11. Show 'Contain Sub.' Option : $WHT$show_contain_subfolders_option$NRM\n";
+ print "12. Default Unseen Notify : $WHT$default_unseen_notify$NRM\n";
+ print "13. Default Unseen Type : $WHT$default_unseen_type$NRM\n";
print "\n";
print "R Return to Main Menu\n";
} elsif ($menu == 4) {
elsif ($command == 9) { $auto_expunge = command29 (); }
elsif ($command == 10){ $default_sub_of_inbox = command210(); }
elsif ($command == 11){ $show_contain_subfolders_option = command211(); }
+ elsif ($command == 12){ $default_unseen_notify = command212(); }
+ elsif ($command == 13){ $default_unseen_type = command213(); }
} elsif ($menu == 4) {
if ($command == 1) { $default_charset = command31 (); }
elsif ($command == 2) { $data_dir = command33 (); }
return $show_contain_subfolders_option;
}
+# Default Unseen Notify
+sub command212 {
+ print "This option specifies where the users will receive notification\n";
+ print "about unseen messages by default. This is of course an option that\n";
+ print "can be changed on a user level.\n";
+ print " 1 = No notification\n";
+ print " 2 = Only on the INBOX\n";
+ print " 3 = On all folders\n";
+ print "\n";
+
+ print "Which one should be default (1,2,3)? [$WHT$default_unseen_notify$NRM]: $WHT";
+ $new_show = <STDIN>;
+ if ($new_show =~ /^[1|2|3]\n/i) {
+ $default_unseen_notify = $new_show;
+ }
+ $default_unseen_notify =~ s/[\r|\n]//g;
+ return $default_unseen_notify;
+}
+
+# Default Unseen Type
+sub command213 {
+ print "Here you can define the default way that unseen messages will be displayed\n";
+ print "to the user in the folder listing on the left side.\n";
+ print " 1 = Only unseen messages (4)\n";
+ print " 2 = Unseen and Total messages (4/27)\n";
+ print "\n";
+
+ print "Which one should be default (1,2)? [$WHT$default_unseen_type$NRM]: $WHT";
+ $new_show = <STDIN>;
+ if ($new_show =~ /^[1|2]\n/i) {
+ $default_unseen_type = $new_show;
+ }
+ $default_unseen_type =~ s/[\r|\n]//g;
+ return $default_unseen_type;
+}
+
+
############# GENERAL OPTIONS #####################
# Default Charset
print FILE "\t\$auto_expunge = $auto_expunge;\n";
print FILE "\t\$default_sub_of_inbox = $default_sub_of_inbox;\n";
print FILE "\t\$show_contain_subfolders_option = $show_contain_subfolders_option;\n";
+ print FILE "\t\$default_unseen_notify = $default_unseen_notify;\n";
+ print FILE "\t\$default_unseen_type = $default_unseen_type;\n";
print FILE "\n";
print FILE "\t\$default_charset = \"$default_charset\";\n";
$theme[9]["PATH"] = "../config/bluesteel_theme.php";
$theme[9]["NAME"] = "Blue Steel";
+ $theme[10]["PATH"] = "../config/high_contrast_theme.php";
+ $theme[10]["NAME"] = "High Contrast";
+
// LDAP server(s)
//
// Array of arrays with LDAP server parameters. See
$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 alsy which folders to do this to.
+ // 1=none, 2=inbox, 3=all
+ // $default_unseen_type specifies the type of notification to give the
+ // users by default.
+ // 1=(4), 2=(4,25)
+
+ $default_unseen_notify = 2;
+ $default_unseen_type = 1;
?>
--- /dev/null
+<?php
+ /** Author: Casey A. Peel
+ Date: July 13, 2000
+ Theme Name: "High Contrast"
+
+ **/
+
+ $color[0] = "#818181"; // (light gray) TitleBar
+ $color[1] = "#FF0000"; // (red)
+ $color[2] = "#CC0000"; // (light red) Warning/Error Messages
+ $color[3] = "#008080"; // (green-blue) Left Bar Background
+ $color[4] = "#FFFFFF"; // (white) Normal Background
+ $color[5] = "#FFFF00"; // (light yellow) Table Headers
+ $color[6] = "#000000"; // (black) Text on left bar
+ $color[7] = "#0000FF"; // (blue) Links
+ $color[8] = "#000000"; // (black) Normal text
+ $color[9] = "#C0C0C0"; // (mid-gray) Darker version of #0
+ $color[10] = "#808080"; // (dark gray) Darker version of #9
+ $color[11] = "#FFFFFF"; // (white) Special Folders color
+?>
-mime.txt
-by Luke Ehresman
-June 22, 2000 - Last updated: June 22, 2000
+SquirrelMail MIME Support Introduction
+======================================
-Who should read this?
----------------------
- The intended audience for this document are people who want to understand how
- the MIME code works. This is a technical documentation of how mime.php
- works and how it parses a MIME encoded message.
+The intended audience for this document are people who want to understand how
+the MIME code works. This is a technical documentation of how mime.php
+works and how it parses a MIME encoded message.
Object Structure
----------------
- There are two objects that are used: "message" and "msg_header". here is a
- brief overview of what each object contains.
+There are two objects that are used: "message" and "msg_header". here is a
+brief overview of what each object contains.
- msg_header
- Contains variables for all the necessary parts of the header of a
- message. This includes (but is not limited to) the following: to, from,
- subject, type (type0), subtype (type1), filename ...
+msg_header
+ Contains variables for all the necessary parts of the header of a
+ message. This includes (but is not limited to) the following: to, from,
+ subject, type (type0), subtype (type1), filename ...
- message
- This contains the structure for the message. It contains two parts:
- $header and $entities[]. $header is of type msg_header, and $entities[]
- is an array of type $message. The $entities[] array is optional. If
- it does not exist, then we are at a leaf node, and have an actual
- attachment (entity) that can be displayed. Here is a tree view of how
- this object functions.
-
- header
- entities
- |
- +--- header
- |
- +--- header
- | entities
- | |
- | +--- header
- | |
- | +--- header
- |
- +--- header
+message
+ This contains the structure for the message. It contains two parts:
+ $header and $entities[]. $header is of type msg_header, and $entities[]
+ is an array of type $message. The $entities[] array is optional. If
+ it does not exist, then we are at a leaf node, and have an actual
+ attachment (entity) that can be displayed. Here is a tree view of how
+ this object functions.
+
+ header
+ entities
+ |
+ +--- header
+ |
+ +--- header
+ | entities
+ | |
+ | +--- header
+ | |
+ | +--- header
+ |
+ +--- header
Getting the Structure
---------------------
- Previously (version 0.4 and below), SquirrelMail handled all the parsing of
- the email message. It would read the entire message in, search for
- boundaries, and created an array similar to the $message object discribed
- above. This was very inefficient.
+Previously (version 0.4 and below), SquirrelMail handled all the parsing of
+the email message. It would read the entire message in, search for
+boundaries, and created an array similar to the $message object discribed
+above. This was very inefficient.
- Currently, all the parsing of the body of the message takes place on the
- IMAP server itself. According to RFC 2060 section 7.4.2, we can use the
- BODYSTRUCTURE function which will return the structure of the body (imagine
- that). It goes into detail of how the bodystructure should be formatted,
- and we have based our new MIME support on this specification.
+Currently, all the parsing of the body of the message takes place on the
+IMAP server itself. According to RFC 2060 section 7.4.2, we can use the
+BODYSTRUCTURE function which will return the structure of the body (imagine
+that). It goes into detail of how the bodystructure should be formatted,
+and we have based our new MIME support on this specification.
- A simple text/plain message would have a BODYSTRUCTURE similar to the
- following:
+A simple text/plain message would have a BODYSTRUCTURE similar to the
+following:
- ("TEXT" "PLAIN" ("CHARSET" "US-ASCII") NIL NIL "7BIT" 1152 23)
+ ("TEXT" "PLAIN" ("CHARSET" "US-ASCII") NIL NIL "7BIT" 1152 23)
- A more complicated multipart message with an attachment would look like:
+A more complicated multipart message with an attachment would look like:
- (("TEXT" "PLAIN" ("CHARSET" "US-ASCII") NIL NIL "7BIT" 1152 23)("TEXT"
- "PLAIN" ("CHARSET" "US-ASCII" "NAME" "cc.diff")
- "<960723163407.20117h@cac.washington.edu>" "Compiler diff" "BASE64"
- 4554 73) "MIXED"))
+ (("TEXT" "PLAIN" ("CHARSET" "US-ASCII") NIL NIL "7BIT" 1152 23)("TEXT"
+ "PLAIN" ("CHARSET" "US-ASCII" "NAME" "cc.diff")
+ "<960723163407.20117h@cac.washington.edu>" "Compiler diff" "BASE64"
+ 4554 73) "MIXED"))
- Our MIME functionality implements different functions that recursively
- run through this text and parses out the structure of the message. If you
- want to learn more about how the structure of a message is returned with
- the BODYSTRUCTURE function, please see RFC 2060 section 7.4.2.
+Our MIME functionality implements different functions that recursively
+run through this text and parses out the structure of the message. If you
+want to learn more about how the structure of a message is returned with
+the BODYSTRUCTURE function, please see RFC 2060 section 7.4.2.
- NOTE: SquirrelMail passes the MIME Torture Test written by Mark
- Crispin (author of the IMAP protocol). This message is crazy! It
- has about 30 parts nested inside each other. A very good test,
- and SquirrelMail passed it. It can be found here:
+NOTE: SquirrelMail passes the MIME Torture Test written by Mark
+ Crispin (author of the IMAP protocol). This message is crazy! It
+ has about 30 parts nested inside each other. A very good test,
+ and SquirrelMail passed it. It can be found here:
- ftp://ftp.lysator.liu.se/mirror/unix/imapd/mime/torture-test.mbox
+ ftp://ftp.lysator.liu.se/mirror/unix/imapd/mime/torture-test.mbox
Getting the Body
----------------
- Once all of the structure of the message has been read into the $message
- object, we then need to display the body of one entity. There are a number
- of ways we decide which entity to display at a certain time, and I won't go
- into that here.
+Once all of the structure of the message has been read into the $message
+object, we then need to display the body of one entity. There are a number
+of ways we decide which entity to display at a certain time, and I won't go
+into that here.
- Each entity has its own ID. Entity IDs look something like "1.2.1", or
- "4.1", or just "2". You can find a detailed description of how entities
- should be identified by reading RFC 2060 section 6.4.5. To fetch the body
- of a particular entity, we use the function "BODY[<section>]". For
- instance, if we were wanting to return entity 1.2.1, we would send the
- IMAP server the command: "a001 FETCH <msg_id> BODY[1.2.1]".
+Each entity has its own ID. Entity IDs look something like "1.2.1", or
+"4.1", or just "2". You can find a detailed description of how entities
+should be identified by reading RFC 2060 section 6.4.5. To fetch the body
+of a particular entity, we use the function "BODY[<section>]". For
+instance, if we were wanting to return entity 1.2.1, we would send the
+IMAP server the command: "a001 FETCH <msg_id> BODY[1.2.1]".
- This returns a string of the entire body. Based upon what is in the header,
- we may need to decode it or do other things to it.
+This returns a string of the entire body. Based upon what is in the header,
+we may need to decode it or do other things to it.
Closing Notes
-------------
- That is basically how it works. There is a variable in mime.php called
- $debug_mime that is defined at the top of that file. If you set it to true,
- it will output all kinds of valuable information while it tries to decode
- the MIME message.
+That is basically how it works. There is a variable in mime.php called
+$debug_mime that is defined at the top of that file. If you set it to true,
+it will output all kinds of valuable information while it tries to decode
+the MIME message.
- The code in mime.php is pretty well documented, so you might want to poke
- around there as well to find out more details of how this works.
-
- If you have questions about this, please direct them to our mailing list:
- squirrelmail-list@sourceforge.net
+The code in mime.php is pretty well documented, so you might want to poke
+around there as well to find out more details of how this works.
+
+If you have questions about this, please direct them to our mailing list:
+squirrelmail-list@sourceforge.net
}
-
/******************************************************************************
** Returns the number of unseen messages in this folder
******************************************************************************/
function formatMailboxName($imapConnection, $mailbox, $real_box, $delimeter, $unseen) {
global $folder_prefix, $trash_folder, $sent_folder;
global $color, $move_to_sent, $move_to_trash;
+ global $unseen_notify, $unseen_type;
$mailboxURL = urlencode($real_box);
- if($real_box=="INBOX") {
+
+ if ($unseen_notify == 2 && $real_box == "INBOX") {
+ $unseen = sqimap_unseen_messages($imapConnection, $numUnseen, $real_box);
+ if ($unseen_type == 1 && $unseen > 0) {
+ $unseen_string = "($unseen)";
+ $unseen_found = true;
+ } else if ($unseen_type == 2) {
+ $numMessages = sqimap_get_num_messages($imapConnection, $real_box);
+ $unseen_string = "<font color=\"$color[11]\">($unseen/$numMessages)</font>";
+ $unseen_found = true;
+ }
+ } else if ($unseen_notify == 3) {
$unseen = sqimap_unseen_messages($imapConnection, $numUnseen, $real_box);
- }
+ if ($unseen_type == 1 && $unseen > 0) {
+ $unseen_string = "($unseen)";
+ $unseen_found = true;
+ } else if ($unseen_type == 2) {
+ $numMessages = sqimap_get_num_messages($imapConnection, $real_box);
+ $unseen_string = "<font color=\"$color[11]\">($unseen/$numMessages)</font>";
+ $unseen_found = true;
+ }
+ }
$line .= "<NOBR>";
if ($unseen > 0)
if ($unseen > 0)
$line .= "</B>";
- if ($unseen > 0) {
- $line .= " <small>($unseen)</small>";
+ if ($unseen_found) {
+ $line .= " <small>$unseen_string</small>";
}
if (($move_to_trash == true) && ($real_box == $trash_folder)) {
$urlMailbox = urlencode($real_box);
$line .= "\n<small>\n";
- $line .= " (<B><A HREF=\"empty_trash.php\" style=\"text-decoration:none\">"._("purge")."</A></B>)";
+ $line .= " (<B><A HREF=\"empty_trash.php\" style=\"text-decoration:none\">"._("purge")."</A></B>)";
$line .= "\n</small>\n";
}
$line .= "</NOBR>";
$move_to_trash = $default_move_to_trash;
+ $unseen_type = getPref($data_dir, $username, "unseen_type");
+ if ($default_unseen_type == "")
+ $default_unseen_type = 1;
+ if ($unseen_type == "")
+ $unseen_type = $default_unseen_type;
+
+ $unseen_notify = getPref($data_dir, $username, "unseen_notify");
+ if ($default_unseen_notify == "")
+ $default_unseen_notify = 2;
+ if ($unseen_notify == "")
+ $unseen_notify = $default_unseen_notify;
+
+
$folder_prefix = getPref($data_dir, $username, "folder_prefix");
if ($folder_prefix == "")
$folder_prefix = $default_folder_prefix;
setPref($data_dir, $username, "sent_folder", "");
}
setPref($data_dir, $username, "folder_prefix", $folderprefix);
+ setPref($data_dir, $username, "unseen_notify", $unseennotify);
+ setPref($data_dir, $username, "unseen_type", $unseentype);
echo "<br><center><b>"._("Successfully saved folder preferences!")."</b><br>";
echo "<a href=\"left_main.php\" target=left>"._("Refresh Folders")."</a></center><br>";
}
<td align=right nowrap><? echo _("Folder Path"); ?>:
</td><td>
<? if (isset ($folder_prefix))
- echo " <input type=text name=folderprefix value=\"$folder_prefix\" size=50><br>";
+ echo " <input type=text name=folderprefix value=\"$folder_prefix\" size=35><br>";
else
- echo " <input type=text name=folderprefix value=\"$default_folder_prefix\" size=50><br>";
+ echo " <input type=text name=folderprefix value=\"$default_folder_prefix\" size=35><br>";
?>
</td>
</tr>
echo "</SELECT></TT>\n";
echo "</td></tr>";
?>
+ <tr>
+ <td valign=top align=right>
+ <br>
+ <? echo _("Unseen message notification"); ?>:
+ </td>
+ <td>
+ <input type=radio name=unseennotify value=1<? if ($unseen_notify == 1) echo " checked"; ?>> <? echo _("No notification") ?><br>
+ <input type=radio name=unseennotify value=2<? if ($unseen_notify != 1 && $unseen_notify != 3) echo " checked"; ?>> <? echo _("Only INBOX") ?><br>
+ <input type=radio name=unseennotify value=3<? if ($unseen_notify == 3) echo " checked"; ?>> <? echo _("All Folders") ?><br>
+ <br>
+ </td>
+ </tr>
+ <tr>
+ <td valign=top align=right>
+ <br>
+ <? echo _("Unseen message notification type"); ?>:
+ </td>
+ <td>
+ <input type=radio name=unseentype value=1<? if ($unseen_type < 2 || $unseen_type > 2) echo " checked"; ?>> <? echo _("Only unseen"); ?> - (4)<br>
+ <input type=radio name=unseentype value=2<? if ($unseen_type == 2) echo " checked"; ?>> <? echo _("Unseen and Total"); ?> - (4/27)
+ </td>
+ </tr>
<tr>
<td>
</td><td>