Skip to content

Commit

Permalink
Optimized loading time; added periodic mail check; added EXPUNGE command
Browse files Browse the repository at this point in the history
  • Loading branch information
thomascube committed Jan 5, 2006
1 parent 977a295 commit 15a9d1c
Show file tree
Hide file tree
Showing 24 changed files with 887 additions and 260 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG
@@ -1,6 +1,20 @@
CHANGELOG RoundCube Webmail CHANGELOG RoundCube Webmail
--------------------------- ---------------------------


2006/01/04
----------
- Fixed bug when inserting signatures with !?&
- Chopping message headers before inserting into the message cache table (to avoid bugs in Postgres)
- Allow one-char domains in e-mail addresses
- Make product name in page title configurable
- Make username available as skin object
- Added session_write_close() in rcube_db class destructor to avoid problems in PHP 5.0.5
- Use move_uploaded_file() instead of copy() for a more secure handling of uploaded attachments
- Additional config parameter to show/hide deleted messages
- Added periodic request for checking new mails (Request #1307821)
- Added EXPUNGE command
- Optimized loading time for mail interface



2005/12/16 2005/12/16
---------- ----------
Expand Down
1 change: 1 addition & 0 deletions INSTALL
Expand Up @@ -76,6 +76,7 @@ REQUIREMENTS
* The Apache Webserver * The Apache Webserver
* .htaccess support allowing overrides for DirectoryIndex * .htaccess support allowing overrides for DirectoryIndex
* PHP Version 4.3.1 or greater * PHP Version 4.3.1 or greater
* PCRE (perl compatible regular expression) installed with PHP
* php.ini options: * php.ini options:
- error_reporting E_ALL & ~E_NOTICE (or lower) - error_reporting E_ALL & ~E_NOTICE (or lower)
- file_uploads on (for attachment upload features) - file_uploads on (for attachment upload features)
Expand Down
2 changes: 1 addition & 1 deletion SQL/mysql.initial.sql
Expand Up @@ -91,7 +91,7 @@ CREATE TABLE `users` (
`created` datetime NOT NULL default '0000-00-00 00:00:00', `created` datetime NOT NULL default '0000-00-00 00:00:00',
`last_login` datetime NOT NULL default '0000-00-00 00:00:00', `last_login` datetime NOT NULL default '0000-00-00 00:00:00',
`language` varchar(5) NOT NULL default 'en', `language` varchar(5) NOT NULL default 'en',
`preferences` text NOT NULL, `preferences` text NOT NULL default '',
PRIMARY KEY (`user_id`) PRIMARY KEY (`user_id`)
) TYPE=MyISAM; ) TYPE=MyISAM;


Expand Down
4 changes: 2 additions & 2 deletions SQL/mysql.update.sql
Expand Up @@ -2,8 +2,8 @@
-- Version 0.1-20051007 -- Version 0.1-20051007




ALTER TABLE session ADD ip VARCHAR(15) NOT NULL AFTER changed; ALTER TABLE `session` ADD `ip` VARCHAR(15) NOT NULL AFTER changed;
ALTER TABLE users ADD alias VARCHAR(128) NOT NULL AFTER mail_host; ALTER TABLE `users` ADD `alias` VARCHAR(128) NOT NULL AFTER mail_host;






Expand Down
74 changes: 11 additions & 63 deletions SQL/postgres.initial.sql
Expand Up @@ -68,7 +68,7 @@ CREATE SEQUENCE message_ids
-- --


CREATE TABLE users ( CREATE TABLE users (
user_id integer DEFAULT nextval('user_ids'::text) NOT NULL, user_id integer DEFAULT nextval('user_ids'::text) PRIMARY KEY,
username character varying(128) DEFAULT ''::character varying NOT NULL, username character varying(128) DEFAULT ''::character varying NOT NULL,
mail_host character varying(128) DEFAULT ''::character varying NOT NULL, mail_host character varying(128) DEFAULT ''::character varying NOT NULL,
alias character varying(128) DEFAULT ''::character varying NOT NULL, alias character varying(128) DEFAULT ''::character varying NOT NULL,
Expand All @@ -86,7 +86,7 @@ CREATE TABLE users (
-- --


CREATE TABLE "session" ( CREATE TABLE "session" (
sess_id character varying(40) DEFAULT ''::character varying NOT NULL, sess_id character varying(40) DEFAULT ''::character varying PRIMARY KEY,
created timestamp with time zone DEFAULT now() NOT NULL, created timestamp with time zone DEFAULT now() NOT NULL,
changed timestamp with time zone DEFAULT now() NOT NULL, changed timestamp with time zone DEFAULT now() NOT NULL,
ip character varying(16) NOT NULL, ip character varying(16) NOT NULL,
Expand All @@ -101,8 +101,8 @@ CREATE TABLE "session" (
-- --


CREATE TABLE identities ( CREATE TABLE identities (
identity_id integer DEFAULT nextval('identity_ids'::text) NOT NULL, identity_id integer DEFAULT nextval('identity_ids'::text) PRIMARY KEY,
user_id integer DEFAULT 0 NOT NULL, user_id integer NOT NULL REFERENCES users (user_id),
del integer DEFAULT 0 NOT NULL, del integer DEFAULT 0 NOT NULL,
standard integer DEFAULT 0 NOT NULL, standard integer DEFAULT 0 NOT NULL,
name character varying(128) NOT NULL, name character varying(128) NOT NULL,
Expand All @@ -120,8 +120,8 @@ CREATE TABLE identities (
-- --


CREATE TABLE contacts ( CREATE TABLE contacts (
contact_id integer DEFAULT nextval('contact_ids'::text) NOT NULL, contact_id integer DEFAULT nextval('contact_ids'::text) PRIMARY KEY,
user_id integer DEFAULT 0 NOT NULL, user_id integer NOT NULL REFERENCES users (user_id),
changed timestamp with time zone DEFAULT now() NOT NULL, changed timestamp with time zone DEFAULT now() NOT NULL,
del integer DEFAULT 0 NOT NULL, del integer DEFAULT 0 NOT NULL,
name character varying(128) DEFAULT ''::character varying NOT NULL, name character varying(128) DEFAULT ''::character varying NOT NULL,
Expand All @@ -139,9 +139,9 @@ CREATE TABLE contacts (
-- --


CREATE TABLE "cache" ( CREATE TABLE "cache" (
cache_id integer DEFAULT nextval('cache_ids'::text) NOT NULL, cache_id integer DEFAULT nextval('cache_ids'::text) PRIMARY KEY,
user_id integer DEFAULT 0 NOT NULL, user_id integer NOT NULL REFERENCES users (user_id),
session_id character varying(40), session_id character varying(40) REFERENCES "session" (session_id),
cache_key character varying(128) DEFAULT ''::character varying NOT NULL, cache_key character varying(128) DEFAULT ''::character varying NOT NULL,
created timestamp with time zone DEFAULT now() NOT NULL, created timestamp with time zone DEFAULT now() NOT NULL,
data text NOT NULL data text NOT NULL
Expand All @@ -155,8 +155,8 @@ CREATE TABLE "cache" (
-- --


CREATE TABLE "messages" ( CREATE TABLE "messages" (
message_id integer DEFAULT nextval('message_ids'::text) NOT NULL, message_id integer DEFAULT nextval('message_ids'::text) PRIMARY KEY,
user_id integer DEFAULT 0 NOT NULL, user_id integer NOT NULL REFERENCES users (user_id),
del integer DEFAULT 0 NOT NULL, del integer DEFAULT 0 NOT NULL,
cache_key character varying(128) DEFAULT ''::character varying NOT NULL, cache_key character varying(128) DEFAULT ''::character varying NOT NULL,
idx integer DEFAULT 0 NOT NULL, idx integer DEFAULT 0 NOT NULL,
Expand All @@ -171,55 +171,3 @@ CREATE TABLE "messages" (
body text body text
); );




--
-- Add primary keys
--

ALTER TABLE ONLY "cache"
ADD CONSTRAINT cache_pkey PRIMARY KEY (cache_id);


ALTER TABLE ONLY "contacts"
ADD CONSTRAINT contacts_pkey PRIMARY KEY (contact_id);


ALTER TABLE ONLY identities
ADD CONSTRAINT identities_pkey PRIMARY KEY (identity_id);


ALTER TABLE ONLY "session"
ADD CONSTRAINT session_pkey PRIMARY KEY (sess_id);


ALTER TABLE ONLY "users"
ADD CONSTRAINT users_pkey PRIMARY KEY (user_id);


ALTER TABLE ONLY "messages"
ADD CONSTRAINT messages_pkey PRIMARY KEY (message_id);


--
-- Reference keys
--

ALTER TABLE ONLY "cache"
ADD CONSTRAINT "$1" FOREIGN KEY (user_id) REFERENCES users(user_id);

ALTER TABLE ONLY "cache"
ADD CONSTRAINT "$2" FOREIGN KEY (session_id) REFERENCES "session"(sess_id);


ALTER TABLE ONLY "contacts"
ADD CONSTRAINT "$1" FOREIGN KEY (user_id) REFERENCES users(user_id);


ALTER TABLE ONLY "identities"
ADD CONSTRAINT "$1" FOREIGN KEY (user_id) REFERENCES users(user_id);


ALTER TABLE ONLY "messages"
ADD CONSTRAINT "$1" FOREIGN KEY (user_id) REFERENCES users(user_id);

7 changes: 6 additions & 1 deletion UPGRADING
Expand Up @@ -19,6 +19,7 @@ from versions 0.1-alpha and 0.1-20050811
$rcmail_config['smtp_port'] = 25; $rcmail_config['smtp_port'] = 25;
$rcmail_config['default_port'] = 143; $rcmail_config['default_port'] = 143;
$rcmail_config['session_lifetime'] = 20; $rcmail_config['session_lifetime'] = 20;
$rcmail_config['skip_deleted'] = FALSE;
$rcmail_config['message_sort_col'] = 'date'; $rcmail_config['message_sort_col'] = 'date';
$rcmail_config['message_sort_order'] = 'DESC'; $rcmail_config['message_sort_order'] = 'DESC';
$rcmail_config['log_dir'] = 'logs/'; $rcmail_config['log_dir'] = 'logs/';
Expand All @@ -41,6 +42,7 @@ from version 0.1-20050820
$rcmail_config['smtp_port'] = 25; $rcmail_config['smtp_port'] = 25;
$rcmail_config['default_port'] = 143; $rcmail_config['default_port'] = 143;
$rcmail_config['session_lifetime'] = 20; $rcmail_config['session_lifetime'] = 20;
$rcmail_config['skip_deleted'] = FALSE;
$rcmail_config['message_sort_col'] = 'date'; $rcmail_config['message_sort_col'] = 'date';
$rcmail_config['message_sort_order'] = 'DESC'; $rcmail_config['message_sort_order'] = 'DESC';
$rcmail_config['log_dir'] = 'logs/'; $rcmail_config['log_dir'] = 'logs/';
Expand All @@ -61,6 +63,7 @@ from version 0.1-20051007
- add these lines to /config/main.inc.php - add these lines to /config/main.inc.php
$rcmail_config['smtp_auth_type'] = ''; // if you need to specify an auth method for SMTP $rcmail_config['smtp_auth_type'] = ''; // if you need to specify an auth method for SMTP
$rcmail_config['session_lifetime'] = 20; // to specify the session lifetime in minutes $rcmail_config['session_lifetime'] = 20; // to specify the session lifetime in minutes
$rcmail_config['skip_deleted'] = FALSE;
$rcmail_config['message_sort_col'] = 'date'; $rcmail_config['message_sort_col'] = 'date';
$rcmail_config['message_sort_order'] = 'DESC'; $rcmail_config['message_sort_order'] = 'DESC';
$rcmail_config['log_dir'] = 'logs/'; $rcmail_config['log_dir'] = 'logs/';
Expand All @@ -81,6 +84,7 @@ from version 0.1-20051021
- replace all files in folder /skins/default/ - replace all files in folder /skins/default/
- run all commands in SQL/*.update.sql or re-initalize database with *.initial.sql - run all commands in SQL/*.update.sql or re-initalize database with *.initial.sql
- add these lines to /config/main.inc.php - add these lines to /config/main.inc.php
$rcmail_config['skip_deleted'] = FALSE;
$rcmail_config['message_sort_col'] = 'date'; $rcmail_config['message_sort_col'] = 'date';
$rcmail_config['message_sort_order'] = 'DESC'; $rcmail_config['message_sort_order'] = 'DESC';
$rcmail_config['log_dir'] = 'logs/'; $rcmail_config['log_dir'] = 'logs/';
Expand All @@ -91,4 +95,5 @@ from version 0.1-20051021
$rcmail_config['db_sequence_identity_ids'] = 'identity_ids'; $rcmail_config['db_sequence_identity_ids'] = 'identity_ids';
$rcmail_config['db_sequence_contact_ids'] = 'contact_ids'; $rcmail_config['db_sequence_contact_ids'] = 'contact_ids';
$rcmail_config['db_sequence_cache_ids'] = 'cache_ids'; $rcmail_config['db_sequence_cache_ids'] = 'cache_ids';
$rcmail_config['db_sequence_message_ids'] = 'message_ids'; $rcmail_config['db_sequence_message_ids'] = 'message_ids';

3 changes: 3 additions & 0 deletions config/main.inc.php.dist
Expand Up @@ -97,6 +97,9 @@ $rcmail_config['date_long'] = 'd.m.Y H:i';
// add this user-agent to message headers when sending // add this user-agent to message headers when sending
$rcmail_config['useragent'] = 'RoundCube Webmail/0.1b'; $rcmail_config['useragent'] = 'RoundCube Webmail/0.1b';


// use this name to compose page titles
$rcmail_config['product_name'] = 'RoundCube Webmail';

// only list folders within this path // only list folders within this path
$rcmail_config['imap_root'] = ''; $rcmail_config['imap_root'] = '';


Expand Down
14 changes: 13 additions & 1 deletion index.php
Expand Up @@ -3,7 +3,7 @@
/* /*
+-----------------------------------------------------------------------+ +-----------------------------------------------------------------------+
| RoundCube Webmail IMAP Client | | RoundCube Webmail IMAP Client |
| Version 0.1-20051214 | | Version 0.1-20060104 |
| | | |
| Copyright (C) 2005, RoundCube Dev. - Switzerland | | Copyright (C) 2005, RoundCube Dev. - Switzerland |
| Licensed under the GNU GPL | | Licensed under the GNU GPL |
Expand Down Expand Up @@ -41,6 +41,9 @@
*/ */


define('RCMAIL_VERSION', '0.1-20060104');


// define global vars // define global vars
$INSTALL_PATH = dirname($_SERVER['SCRIPT_FILENAME']); $INSTALL_PATH = dirname($_SERVER['SCRIPT_FILENAME']);
$OUTPUT_TYPE = 'html'; $OUTPUT_TYPE = 'html';
Expand Down Expand Up @@ -240,6 +243,15 @@


if ($_action=='addcontact') if ($_action=='addcontact')
include('program/steps/mail/addcontact.inc'); include('program/steps/mail/addcontact.inc');

if ($_action=='expunge')
include('program/steps/mail/folders.inc');

if ($_action=='check-recent')
include('program/steps/mail/check_recent.inc');

if ($_action=='getunread')
include('program/steps/mail/getunread.inc');


if ($_action=='list' && $_GET['_remote']) if ($_action=='list' && $_GET['_remote'])
include('program/steps/mail/list.inc'); include('program/steps/mail/list.inc');
Expand Down

0 comments on commit 15a9d1c

Please sign in to comment.