Workgroup feature

author: Paul Stevens

date: 22 feb 2007

Update: this proposal is superseded by CONDSTORE and ANNOTATE capabilities.

Per user message flags

What I'm proposing here is a mechanism that will allow divergent views on mailboxes. A typical use-case would be a mailboxes in #Public that store mailinglists that are followed and posted to by several people.

User A and user B open a shared mailbox C. When A reads a message in C, B should still see this message as unread, and vice versa. Same for flags, replied status, etc.

Which flags should be shared and which flags should be split between users should be configurable to suit the business requirements.

One way to accomodate this would be by separating the flags from messages in the tables;

CREATE TABLE dbmail_messages (
        message_idnr bigint(21) NOT NULL auto_increment,
        mailbox_idnr bigint(21) NOT NULL default '0',
        physmessage_id bigint(21) NOT NULL default '0',
        unique_id varchar(70) NOT NULL default '',
        status tinyint(3) unsigned NOT NULL default '0',
        PRIMARY KEY  (message_idnr),
        INDEX physmessage_id_index (physmessage_id),
        INDEX mailbox_idnr_index (mailbox_idnr),
        INDEX unique_id_index (unique_id),
        INDEX status_index (status),
        INDEX mailbox_status (mailbox_idnr, status),
        FOREIGN KEY physmessage_id_fk (physmessage_id)
                REFERENCES dbmail_physmessage (id) 
			ON DELETE CASCADE ON UPDATE CASCADE,
        FOREIGN KEY mailbox_idnr_fk (mailbox_idnr)
                REFERENCES dbmail_mailboxes (mailbox_idnr) 
			ON DELETE CASCADE ON UPDATE CASCADE
);

CREATE TABLE dbmail_messageflags (
	message_idnr bigint(21) NOT NULL,
	user_idnr bigint(21) NOT NULL,
        seen_flag tinyint(1) NOT NULL default '0',
        answered_flag tinyint(1) NOT NULL default '0',
        deleted_flag tinyint(1) NOT NULL default '0',
        flagged_flag tinyint(1) NOT NULL default '0',
        recent_flag tinyint(1) NOT NULL default '0',
        draft_flag tinyint(1) NOT NULL default '0',
	UNIQUE (message_idnr, user_idnr),
        INDEX seen_flag_index (seen_flag),
        FOREIGN KEY message_idnr_fk (message_idnr)
                REFERENCES dbmail_messages (message_idnr) 
			ON DELETE CASCADE ON UPDATE CASCADE

);
 
workgroup_architecture.txt · Last modified: 2012/02/27 21:50 by bas
 
DBMail is developed by Paul J Stevens together with developers world-wide