Index: trunk/expressoMail1_2/setup/tables_current.inc.php
===================================================================
--- trunk/expressoMail1_2/setup/tables_current.inc.php	(revision 1035)
+++ trunk/expressoMail1_2/setup/tables_current.inc.php	(revision 5547)
@@ -33,5 +33,51 @@
             'ix' => array(),
             'uc' => array()
+		),
+		
+		'expressomail_label' => array(
+			'fd' => array(
+				'id' => array('type' => 'auto','nullable' => False),
+				'user_id' => array('type' => 'int', 'precision' => '8','nullable' => true),
+				'name' => array('type' => 'varchar','precision' => '255','nullable' => true),
+				'border_color' => array('type' => 'varchar','precision' => '7','nullable' => true),
+				'background_color' => array('type' => 'varchar','precision' => '7','nullable' => true),
+				'font_color' => array('type' => 'varchar','precision' => '7','nullable' => true)
+			),
+			'pk' => array('id'),
+			'fk' => array(),
+			'ix' => array(),
+			'uc' => array()
+		),
+
+		'expressomail_followupflag' => array(
+			'fd' => array(
+				'id' => array('type' => 'auto','nullable' => False),
+				'user_id' => array('type' => 'int', 'precision' => '8','nullable' => true),
+				'name' => array('type' => 'varchar','precision' => '255','nullable' => False)
+			),
+			'pk' => array('id'),
+			'fk' => array(),
+			'ix' => array(),
+			'uc' => array()
+		),
+	
+		'expressomail_message_followupflag' => array(
+			'fd' => array(
+				'id' => array('type' => 'auto','nullable' => False),
+				'followupflag_id' => array('type' => 'int', 'precision' => '8','nullable' => False),					
+				'border_color' => array('type' => 'varchar','precision' => '7','nullable' => true),
+				'background_color' => array('type' => 'varchar','precision' => '7','nullable' => true),
+				'font_color' => array('type' => 'varchar','precision' => '7','nullable' => true),
+				'alarm_deadline' => array('type' => 'timestamp', 'nullable' => true),
+				'done_deadline' => array('type' => 'timestamp', 'nullable' => true),
+				'is_done' => array('type' => 'int', 'precision' => '8','nullable' => true)
+			),
+			'pk' => array('id'),
+			'fk' => array(),
+			'ix' => array(),
+			'uc' => array()
+			)
 		)
+		
 	);
 ?>
Index: trunk/expressoMail1_2/setup/tables_update.inc.php
===================================================================
--- trunk/expressoMail1_2/setup/tables_update.inc.php	(revision 5311)
+++ trunk/expressoMail1_2/setup/tables_update.inc.php	(revision 5547)
@@ -141,3 +141,63 @@
  	    return $setup_info['expressoMail1_2']['currentver']; 
  	}
+	$test[] = '2.4.0';
+	function expressoMail1_2_upgrade2_4_0() {
+    	$oProc = $GLOBALS['phpgw_setup']->oProc;            
+            $oProc->CreateTable('expressomail_label',array(
+				'fd' => array(
+					'id' => array('type' => 'auto','nullable' => False),
+					'user_id' => array('type' => 'int', 'precision' => '8','nullable' => true),
+					'name' => array('type' => 'varchar','precision' => '255','nullable' => true),
+					'border_color' => array('type' => 'varchar','precision' => '7','nullable' => true),
+					'background_color' => array('type' => 'varchar','precision' => '7','nullable' => true),
+					'font_color' => array('type' => 'varchar','precision' => '7','nullable' => true)
+				),
+				'pk' => array('id'),
+				'fk' => array(),
+				'ix' => array(),
+				'uc' => array()
+				)
+			);
+			$oProc->CreateTable('expressomail_followupflag',array(
+				'fd' => array(
+					'id' => array('type' => 'auto','nullable' => False),
+					'user_id' => array('type' => 'int', 'precision' => '8','nullable' => true),
+					'name' => array('type' => 'varchar','precision' => '255','nullable' => False)
+				),
+				'pk' => array('id'),
+				'fk' => array(),
+				'ix' => array(),
+				'uc' => array()
+				)
+			);
+			$oProc->CreateTable('expressomail_message_followupflag',array(
+				'fd' => array(
+					'id' => array('type' => 'auto','nullable' => False),
+					'followupflag_id' => array('type' => 'int', 'precision' => '8','nullable' => False),					
+					'border_color' => array('type' => 'varchar','precision' => '7','nullable' => true),
+					'background_color' => array('type' => 'varchar','precision' => '7','nullable' => true),
+					'font_color' => array('type' => 'varchar','precision' => '7','nullable' => true),
+					'alarm_deadline' => array('type' => 'timestamp', 'nullable' => true),
+					'done_deadline' => array('type' => 'timestamp', 'nullable' => true),
+					'is_done' => array('type' => 'int', 'precision' => '8','nullable' => true)
+				),
+				'pk' => array('id'),
+				'fk' => array(),
+				'ix' => array(),
+				'uc' => array()
+				)
+			);			
+			$oProc->query("ALTER TABLE expressomail_message_followupflag ADD CONSTRAINT expressomail_message_followupflag_followupflag_id_fkey FOREIGN KEY (followupflag_id) REFERENCES expressomail_followupflag (id);");
+			$oProc->query("INSERT INTO expressomail_followupflag(name) VALUES ('Follow up'), ('Read'), ('Forward'), ('Answer'), ('Don''t forward'), ('Don''t answer');");
+			
+			//Insert reservados para as labels padrões referentes ao thunderbir
+			$oProc->query("INSERT INTO expressomail_label(name, font_color, border_color, background_color) VALUES ('Important', '#ff0000', '#ff0000', '#ffffff');"); 
+			$oProc->query("INSERT INTO expressomail_label(name, font_color, border_color, background_color) VALUES ('Work', '#ff9900', '#ff9900', '#ffffff');"); 
+			$oProc->query("INSERT INTO expressomail_label(name, font_color, border_color, background_color) VALUES ('personal', '#009900', '#009900', '#ffffff');"); 
+			$oProc->query("INSERT INTO expressomail_label(name, font_color, border_color, background_color) VALUES ('todo', '#3333ff', '#3333ff', '#ffffff');"); 
+			$oProc->query("INSERT INTO expressomail_label(name, font_color, border_color, background_color) VALUES ('later', '#993399', '#993399', '#ffffff');");
+						
+		$GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '2.4.1';
+        return $GLOBALS['setup_info']['expressoMail1_2']['currentver'];
+	}	
 ?>
Index: trunk/expressoMail1_2/setup/setup.inc.php
===================================================================
--- trunk/expressoMail1_2/setup/setup.inc.php	(revision 5298)
+++ trunk/expressoMail1_2/setup/setup.inc.php	(revision 5547)
@@ -12,8 +12,13 @@
 	$setup_info['expressoMail1_2']['name']      	= 'expressoMail1_2';
 	$setup_info['expressoMail1_2']['title']     	= 'Expresso Mail';
-	$setup_info['expressoMail1_2']['version']   	= '2.4.0';
+	$setup_info['expressoMail1_2']['version']   	= '2.4.1';
 	$setup_info['expressoMail1_2']['app_order'] 	= 2;
 	$setup_info['expressoMail1_2']['tables'][]		= 'phpgw_expressomail_contacts';
     $setup_info['expressoMail1_2']['tables'][]		= 'phpgw_certificados';
+	
+	$setup_info['expressoMail1_2']['tables'][]		= 'expressomail_label';
+	$setup_info['expressoMail1_2']['tables'][]		= 'expressomail_followupflag';
+	$setup_info['expressoMail1_2']['tables'][]		= 'expressomail_message_followupflag';
+	
 	$setup_info['expressoMail1_2']['enable']    	= 1;
 
