Update Migration Evolution Thunderbird Icedove

Anthony Callegaro 2024-06-18 12:58:10 +00:00
parent ffb809962a
commit 0ad6593456

@ -1,367 +1,367 @@
How to migrate from Evolution to Thunderbird/Icedove How to migrate from Evolution to Thunderbird/Icedove
==================================================== ====================================================
Here is a step by step procedure with script to migrate from Evolution Here is a step by step procedure with script to migrate from Evolution
to Thunderbird/Icedove. This will keep ALL datas (mail, calendar to Thunderbird/Icedove. This will keep ALL datas (mail, calendar
entries, tasks, contacts) as well as keeping mail status (important, entries, tasks, contacts) as well as keeping mail status (important,
read, replied, etc.) thanks to a script that I developed. This procedure read, replied, etc.) thanks to a script that I developed. This procedure
has been done for Debian Sid but has command for Ubuntu Lucid as well. has been done for Debian Sid but has command for Ubuntu Lucid as well.
It was tested with Thunderbird/Icedove 3.1 and Evolution 2.28 to 2.32. It was tested with Thunderbird/Icedove 3.1 and Evolution 2.28 to 2.32.
1. Backup Evolution and prepare the migration 1. Backup Evolution and prepare the migration
--------------------------------------------- ---------------------------------------------
### 1.1. Backup ### 1.1. Backup
\- Put evolution in offline mode \- Put evolution in offline mode
- Backup from the GUI or use : - Backup from the GUI or use :
/usr/lib/evolution/2.32/evolution-backup --backup ~/USERNAME-evolution.tar.gz /usr/lib/evolution/2.32/evolution-backup --backup ~/USERNAME-evolution.tar.gz
If it hangs you can kill it once you saw the following message : If it hangs you can kill it once you saw the following message :
** Message: rm /home/letic/evolution.dir ** Message: rm /home/letic/evolution.dir
### 1.2. Export data that cant be imported straight away ### 1.2. Export data that cant be imported straight away
Export all contacts from Evolution by right clicking on each addressbook Export all contacts from Evolution by right clicking on each addressbook
->Save to vcard ->Save to vcard
### 1.3. Disable completely Evolution ### 1.3. Disable completely Evolution
- Logoff from the session (avoid issue with the clock applet) - Logoff from the session (avoid issue with the clock applet)
- Log in as the user in a console (Ctrl+Alt+F1) - Log in as the user in a console (Ctrl+Alt+F1)
mkdir backup mkdir backup
mv ~/.gconf/apps/evolution ~/backup/evolution_gconf mv ~/.gconf/apps/evolution ~/backup/evolution_gconf
# For Evolution >= 2.30 # For Evolution >= 2.30
mv ~/.config/evolution/ ~/backup/evolution_config mv ~/.config/evolution/ ~/backup/evolution_config
mv ~/.local/share/evolution ~/backup/evolution_data mv ~/.local/share/evolution ~/backup/evolution_data
# For Lucid (evolution 2.28 # For Lucid (evolution 2.28
mv ~/.evolution ~/backup/evolution_data mv ~/.evolution ~/backup/evolution_data
This will make sure that you have no entries left in the calendar This will make sure that you have no entries left in the calendar
and that you wont retrieve your mail by mistake in Evolution. and that you wont retrieve your mail by mistake in Evolution.
2. Install Thunderbird/Icedove + lightning/iceowl + enigmail 2. Install Thunderbird/Icedove + lightning/iceowl + enigmail
------------------------------------------------------------ ------------------------------------------------------------
### 2.1. On debian ### 2.1. On debian
- Install all required packages - Install all required packages
aptitude install icedove iceowl-extension aptitude install icedove iceowl-extension
- Optional packages : - Optional packages :
- enigmail for PGP support - enigmail for PGP support
- icedove-l10n-XX and iceowl-l10n-XX where XX stands for your - icedove-l10n-XX and iceowl-l10n-XX where XX stands for your
locale locale
### 2.2. On Lucid ### 2.2. On Lucid
It is a bit more annoying as the lightning extension is missing. It is a bit more annoying as the lightning extension is missing.
- Install Thunderbird - Install Thunderbird
aptitude install thunderbird aptitude install thunderbird
- Optional packages : - Optional packages :
- enigmail for PGP support - enigmail for PGP support
- enigmail-locale-XX and thunderbird-locale-XX where XX stands for - enigmail-locale-XX and thunderbird-locale-XX where XX stands for
your locale your locale
- Install the lightning extension (no locales available in Ubuntu) - Install the lightning extension (no locales available in Ubuntu)
- First you require xul-ext-calendar from natty - First you require xul-ext-calendar from natty
wget "http://www.mirrorservice.org/sites/archive.ubuntu.com/ubuntu//pool/universe/l/lightning-extension/xul-ext-calendar-timezones_1.0~b2+build2+nobinonly-0ubuntu2_all.deb" wget "http://www.mirrorservice.org/sites/archive.ubuntu.com/ubuntu//pool/universe/l/lightning-extension/xul-ext-calendar-timezones_1.0~b2+build2+nobinonly-0ubuntu2_all.deb"
dpkg -i xul-ext-calendar-timezones_1.0~b2+build2+nobinonly-0ubuntu2_all.deb dpkg -i xul-ext-calendar-timezones_1.0~b2+build2+nobinonly-0ubuntu2_all.deb
- Then for 32bits - Then for 32bits
wget "http://www.mirrorservice.org/sites/archive.ubuntu.com/ubuntu//pool/universe/l/lightning-extension/xul-ext-lightning_1.0~b2+build2+nobinonly-0ubuntu2_i386.deb" wget "http://www.mirrorservice.org/sites/archive.ubuntu.com/ubuntu//pool/universe/l/lightning-extension/xul-ext-lightning_1.0~b2+build2+nobinonly-0ubuntu2_i386.deb"
dpkg -i xul-ext-lightning_1.0~b2+build2+nobinonly-0ubuntu2_i386.deb dpkg -i xul-ext-lightning_1.0~b2+build2+nobinonly-0ubuntu2_i386.deb
- Or for 64 bits - Or for 64 bits
wget "http://www.mirrorservice.org/sites/archive.ubuntu.com/ubuntu//pool/universe/l/lightning-extension/xul-ext-lightning_1.0~b2+build2+nobinonly-0ubuntu2_amd64.deb" wget "http://www.mirrorservice.org/sites/archive.ubuntu.com/ubuntu//pool/universe/l/lightning-extension/xul-ext-lightning_1.0~b2+build2+nobinonly-0ubuntu2_amd64.deb"
dpkg -i xul-ext-lightning_1.0~b2+build2+nobinonly-0ubuntu2_amd64.deb dpkg -i xul-ext-lightning_1.0~b2+build2+nobinonly-0ubuntu2_amd64.deb
It is always better to use the packaged version instead of the It is always better to use the packaged version instead of the
xpi from the addons website. Especially as there is no 64bits xpi from the addons website. Especially as there is no 64bits
version of lightning available for download on the official version of lightning available for download on the official
website. website.
3. Prepare Thunderbird/Icedove for the migration 3. Prepare Thunderbird/Icedove for the migration
------------------------------------------------ ------------------------------------------------
- Run Thunderbird/Icedove and create a fake imap access manually - Run Thunderbird/Icedove and create a fake imap access manually
- Optional : set incoming/outgoing mail to UTF-8 in Edit -> - Optional : set incoming/outgoing mail to UTF-8 in Edit ->
Preferences ->Display ->Advanced Preferences ->Display ->Advanced
### 3.1. Filtaquilla ### 3.1. Filtaquilla
Filtaquilla is an addon that enhanced filters to be able to handle regex Filtaquilla is an addon that enhanced filters to be able to handle regex
expressions and even javascript filters. These steps have to be done expressions and even javascript filters. These steps have to be done
before importing the mail or the “x-evolution” header wont be in the before importing the mail or the “x-evolution” header wont be in the
DB. DB.
- Go to Edit ->Preferences ->Advanced ->Config editor - Go to Edit ->Preferences ->Advanced ->Config editor
![](Icedove_Advanced_Preferences.png) ![](../raw/attachments/Icedove_Advanced_Preferences.png)
and search for the “mailnews.customDBHeaders” preference and set it and search for the “mailnews.customDBHeaders” preference and set it
to “x-evolution” to “x-evolution”
![](Icedove_about_config.png) ![](../raw/attachments/Icedove_about_config.png)
- Get the Filtaquilla plugin from - Get the Filtaquilla plugin from
[here](https://addons.mozilla.org/en-US/thunderbird/addon/filtaquilla/) [here](https://addons.mozilla.org/en-US/thunderbird/addon/filtaquilla/)
or run or run
wget "https://addons.mozilla.org/thunderbird/downloads/latest/10052/addon-10052-latest.xpi?src=addondetail" -O "filtaquilla-1.1.0-tb+sm.xpi" wget "https://addons.mozilla.org/thunderbird/downloads/latest/10052/addon-10052-latest.xpi?src=addondetail" -O "filtaquilla-1.1.0-tb+sm.xpi"
- In Tools ->Addons ->Filtaquilla ->Preferences check - In Tools ->Addons ->Filtaquilla ->Preferences check
Javascript Javascript
![](Icedove_FiltaQuilla_preferences.png) ![](../raw/attachments/Icedove_FiltaQuilla_preferences.png)
- Close Thunderbird/Icedove - Close Thunderbird/Icedove
4. Migrating your data 4. Migrating your data
---------------------- ----------------------
### 4.1. Mails ### 4.1. Mails
- Copy mbox files - Copy mbox files
cp -ax ~/backup/evolution_data/mail/local/* ~/.icedove/PROFILE/Mail/Local\ Folders/ cp -ax ~/backup/evolution_data/mail/local/* ~/.icedove/PROFILE/Mail/Local\ Folders/
<!-- --> <!-- -->
- Remove all unneeded files - Remove all unneeded files
cd ~/.icedove/PROFILE/Mail/Local\ Folders/ cd ~/.icedove/PROFILE/Mail/Local\ Folders/
find . -name "*ibex*" -delete find . -name "*ibex*" -delete
find . -name "*.cmeta" -delete find . -name "*.cmeta" -delete
rm -r folders.db .#evolution.sbd/ Outbox Templates rm -r folders.db .#evolution.sbd/ Outbox Templates
<!-- --> <!-- -->
- Optional : Convert your mail files to UTF-8 - Optional : Convert your mail files to UTF-8
**Be careful as this could do more harm than good !** **Be careful as this could do more harm than good !**
- First check your mailboxes encoding - First check your mailboxes encoding
find . -type f -exec file {} \; find . -type f -exec file {} \;
- Convert to UTF-8 (for example if ALL you mailboxes are - Convert to UTF-8 (for example if ALL you mailboxes are
ISO-8859-15) ISO-8859-15)
find . -type f -print0 | while read -d $'\0' FILE; do iconv -f ISO-8859-15 -t UTF-8 "$FILE" > "$FILE.utf8"; mv "$FILE" "$FILE.old"; mv "$FILE.utf8" "$FILE"; done find . -type f -print0 | while read -d $'\0' FILE; do iconv -f ISO-8859-15 -t UTF-8 "$FILE" > "$FILE.utf8"; mv "$FILE" "$FILE.old"; mv "$FILE.utf8" "$FILE"; done
### 4.2. Mail status ### 4.2. Mail status
- Go to Tools ->Message Filters - Go to Tools ->Message Filters
- Select “Local Folders” and add a new message filter : - Select “Local Folders” and add a new message filter :
- Type : Javascript - Type : Javascript
- Matches - Matches
- Content - Content
logger = 'MESSAGE : ' + message.getStringProperty('subject') + '\n'; logger = 'MESSAGE : ' + message.getStringProperty('subject') + '\n';
let evohdr = message.getStringProperty('x-evolution'); let evohdr = message.getStringProperty('x-evolution');
logger += 'THUNDERBIRD FLAGS BEFORE : ' + message.flags + '\n'; logger += 'THUNDERBIRD FLAGS BEFORE : ' + message.flags + '\n';
evostatus = evohdr.substring(evohdr.length - 4, evohdr.length); evostatus = evohdr.substring(evohdr.length - 4, evohdr.length);
logger += 'EVOLUTION HEXA : ' + evostatus + '\nSTATUS : \n'; logger += 'EVOLUTION HEXA : ' + evostatus + '\nSTATUS : \n';
var hexevostatus = parseInt(evostatus, 16); var hexevostatus = parseInt(evostatus, 16);
var flags = message.flags; var flags = message.flags;
deleted = false; deleted = false;
if (hexevostatus & 1<<0) { if (hexevostatus & 1<<0) {
logger += ' * is answered\n'; logger += ' * is answered\n';
flags = flags | 1<<1 flags = flags | 1<<1
} }
if (hexevostatus & 1<<1) { if (hexevostatus & 1<<1) {
logger += ' * is deleted\n'; logger += ' * is deleted\n';
deleted = true; deleted = true;
} }
if (hexevostatus & 1<<3) { if (hexevostatus & 1<<3) {
logger += ' * is marked as important\n'; logger += ' * is marked as important\n';
flags = flags | 1<<2 flags = flags | 1<<2
} }
if (hexevostatus & 1<<4) { if (hexevostatus & 1<<4) {
logger += ' * is read\n'; logger += ' * is read\n';
flags = flags | 1<<0 flags = flags | 1<<0
} }
if (hexevostatus & 1<<5) { if (hexevostatus & 1<<5) {
logger += ' * has attachment(s)\n'; logger += ' * has attachment(s)\n';
flags = flags | 1<<28 flags = flags | 1<<28
} }
if (hexevostatus & 1<<7) { if (hexevostatus & 1<<7) {
logger += ' * is junk\n'; logger += ' * is junk\n';
message.setStringProperty('junkscore', 100); message.setStringProperty('junkscore', 100);
message.setStringProperty('junkscoreorigin','user'); message.setStringProperty('junkscoreorigin','user');
} }
if (hexevostatus & 1<<11) { if (hexevostatus & 1<<11) {
logger += ' * has been marked as not junk (no action)\n'; logger += ' * has been marked as not junk (no action)\n';
} }
if (hexevostatus & 1<<12) { if (hexevostatus & 1<<12) {
logger += ' * has been forwarded\n'; logger += ' * has been forwarded\n';
flags = flags | 1<<12 flags = flags | 1<<12
} }
message.flags = flags; message.flags = flags;
logger += 'THUNDERBIRD FLAGS SET TO : ' + flags + '\n'; logger += 'THUNDERBIRD FLAGS SET TO : ' + flags + '\n';
logger +='WILL DELETE ? : ' + deleted; logger +='WILL DELETE ? : ' + deleted;
Cc["@mozilla.org/consoleservice;1"] Cc["@mozilla.org/consoleservice;1"]
.getService(Ci.nsIConsoleService) .getService(Ci.nsIConsoleService)
.logStringMessage(logger); .logStringMessage(logger);
(deleted) (deleted)
- Action : Delete - Action : Delete
- Run the Javascript filter on all your imported folders to recover - Run the Javascript filter on all your imported folders to recover
your mail status. It will perform the following action : your mail status. It will perform the following action :
<table> <table>
<thead> <thead>
<tr class="header"> <tr class="header">
<th>Status in Evolution</th> <th>Status in Evolution</th>
<th>Action in Thunderbird/Icedove</th> <th>Action in Thunderbird/Icedove</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr class="odd"> <tr class="odd">
<td>Unread emails</td> <td>Unread emails</td>
<td>Do nothing</td> <td>Do nothing</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td>Read emails</td> <td>Read emails</td>
<td>Mark as read</td> <td>Mark as read</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td>Answered emails</td> <td>Answered emails</td>
<td>Mark as replied</td> <td>Mark as replied</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td>Forwarded emails</td> <td>Forwarded emails</td>
<td>Mark as transferred</td> <td>Mark as transferred</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td>Mark as important</td> <td>Mark as important</td>
<td>Starred</td> <td>Starred</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td>Has attachments</td> <td>Has attachments</td>
<td>Same</td> <td>Same</td>
</tr> </tr>
<tr class="odd"> <tr class="odd">
<td>Marked as SPAM</td> <td>Marked as SPAM</td>
<td>Manually set the junkscore to 100 and mark for deletion</td> <td>Manually set the junkscore to 100 and mark for deletion</td>
</tr> </tr>
<tr class="even"> <tr class="even">
<td>Deleted</td> <td>Deleted</td>
<td>Mark them for deletion</td> <td>Mark them for deletion</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
- All mails marked for deletion (junk/deleted) will then be deleted as - All mails marked for deletion (junk/deleted) will then be deleted as
part of the filter action. All these status are cumulative in both part of the filter action. All these status are cumulative in both
program even if Thunderbird/Icedove is the only one that actually program even if Thunderbird/Icedove is the only one that actually
display them. It will keep the flags set by Thunderbird/Icedove display them. It will keep the flags set by Thunderbird/Icedove
during the first import (especially “hasRe” status). during the first import (especially “hasRe” status).
- Unfortunately there is no way to un a filter on several folders (or - Unfortunately there is no way to un a filter on several folders (or
all subfolders). This might be possible as an extension but as I had all subfolders). This might be possible as an extension but as I had
limited time to perform it this wasnt done. The quickest way is to limited time to perform it this wasnt done. The quickest way is to
run through your mailbox with the keyboard and type “Alt+T” then R. run through your mailbox with the keyboard and type “Alt+T” then R.
- When restarting the program or clicking on another folder and back - When restarting the program or clicking on another folder and back
the folders read count will get updated EXCEPT if you selected the the folders read count will get updated EXCEPT if you selected the
threaded display. threaded display.
### 4.3. Contacts ### 4.3. Contacts
- Get the [More Functions for - Get the [More Functions for
AddressBook](http://nic-nac-project.de/~kaosmos/morecols-en.html) AddressBook](http://nic-nac-project.de/~kaosmos/morecols-en.html)
plugin plugin
wget http://nic-nac-project.de/~kaosmos/morefunctionsforAB-TB3-0.6.4.1.xpi wget http://nic-nac-project.de/~kaosmos/morefunctionsforAB-TB3-0.6.4.1.xpi
- Install the addon in Thunderbird/Icedove - Install the addon in Thunderbird/Icedove
- Open the addressbook and right click in the blank contact list list - Open the addressbook and right click in the blank contact list list
(right of the screen) ->“Import vcard/vcf” (right of the screen) ->“Import vcard/vcf”
- Once you selected the script it will take some time to import so - Once you selected the script it will take some time to import so
please click continue the script for as long as it takes please click continue the script for as long as it takes
### 4.4. Calendars ### 4.4. Calendars
- Open the calendar and go to “Event and Tasks” ->Import. - Open the calendar and go to “Event and Tasks” ->Import.
- Your former evolution calendar will be in - Your former evolution calendar will be in
<sub>/backup/evolution\_data/calendar/\[local/\]system\ (if\ you\ have\ several\ you\ will\ find\ them\ in</sub>/backup/evolution\_data/calendar/\[local/\]XXXXXXXXXX.XXXX.X@YOURPC) <sub>/backup/evolution\_data/calendar/\[local/\]system\ (if\ you\ have\ several\ you\ will\ find\ them\ in</sub>/backup/evolution\_data/calendar/\[local/\]XXXXXXXXXX.XXXX.X@YOURPC)
### 4.5. Tasks ### 4.5. Tasks
- Same as for the Calendar, open the tasks lists and go to “Event and - Same as for the Calendar, open the tasks lists and go to “Event and
Tasks” ->Import Tasks” ->Import
- The tasks are in - The tasks are in
<sub>/backup/evolution\_data/tasks/system\ and</sub>/backup/evolution\_data/tasks/XXXXXXXXXX.XXXX.X@YOURPC <sub>/backup/evolution\_data/tasks/system\ and</sub>/backup/evolution\_data/tasks/XXXXXXXXXX.XXXX.X@YOURPC
### 4.6. Birthday calendar ### 4.6. Birthday calendar
If you miss the birthday calendar from Evolution install If you miss the birthday calendar from Evolution install
[Thunderbirthday](https://addons.mozilla.org/en-us/thunderbird/addon/thunderbirthday/) [Thunderbirthday](https://addons.mozilla.org/en-us/thunderbird/addon/thunderbirthday/)
### 4.7. Create your mail accounts ### 4.7. Create your mail accounts
Thats it you can now create your mail accounts in Thunderbird and get Thats it you can now create your mail accounts in Thunderbird and get
drown by all the mails you have received since closing Evolution. drown by all the mails you have received since closing Evolution.
### 4.8. Filters ### 4.8. Filters
I redid manually my filters because I wanted to clean them up, but a I redid manually my filters because I wanted to clean them up, but a
simple XSL to use with xsltproc should be easy to do if you really want simple XSL to use with xsltproc should be easy to do if you really want
to keep your filters. If you need some help to start : to keep your filters. If you need some help to start :
- Evolution &gt;= 2.30 filters are in a XML file located in : - Evolution &gt;= 2.30 filters are in a XML file located in :
~/.config/evolution/mail/filters.xml ~/.config/evolution/mail/filters.xml
- Evolution 2.28 filters are in ~/.evolution/mail/filters.xml - Evolution 2.28 filters are in ~/.evolution/mail/filters.xml
- Thunderbird/Icedove filters are stored in - Thunderbird/Icedove filters are stored in
<sub>/.icedove/PROFILE/Mail/Local\ Folders/msgFilterRules.dat,\ other\ POP\ accounts\ are\ in\ :</sub>/.icedove/PROFILE/Mail/POPACCOUNT/msgFilterRules.dat <sub>/.icedove/PROFILE/Mail/Local\ Folders/msgFilterRules.dat,\ other\ POP\ accounts\ are\ in\ :</sub>/.icedove/PROFILE/Mail/POPACCOUNT/msgFilterRules.dat
and IMAP accounts filters are in : and IMAP accounts filters are in :
~/.icedove/PROFILE/ImapMail/IMAPACCOUNT/msgFilterRules.dat ~/.icedove/PROFILE/ImapMail/IMAPACCOUNT/msgFilterRules.dat
- Thunderbird/Icedove filters file has the following structure : - Thunderbird/Icedove filters file has the following structure :
version="9" version="9"
logging= logging=
name= name=
enabled= enabled=
type= type=
action= action=
actionValue= actionValue=
condition= condition=
name= name=
enabled= enabled=
type= type=
action= action=
actionValue= actionValue=
condition= condition=
... ...
5. Integrate better in Gnome 5. Integrate better in Gnome
---------------------------- ----------------------------
### 5.1. Get calendar events in the gnome-clock applet ### 5.1. Get calendar events in the gnome-clock applet
Install the Install the
[evolution-mirror](https://addons.mozilla.org/en-US/thunderbird/addon/evolution-mirror/) [evolution-mirror](https://addons.mozilla.org/en-US/thunderbird/addon/evolution-mirror/)
plugin. plugin.
### 5.2. Integration in Ubuntu ### 5.2. Integration in Ubuntu
Evolution-mirror should already give you a great integration with gnome Evolution-mirror should already give you a great integration with gnome
but if you want a better integration in Ubuntu see this but if you want a better integration in Ubuntu see this
[post](http://www.techgarten.com/ubuntu/replace-evolution-thunderbird-completely-ubuntu/) [post](http://www.techgarten.com/ubuntu/replace-evolution-thunderbird-completely-ubuntu/)
6. References 6. References
------------- -------------
These are just some links/docs that helped me developing the script, if These are just some links/docs that helped me developing the script, if
you wondered where did I found these numbers : you wondered where did I found these numbers :
- [Evolution (Camel) Messages - [Evolution (Camel) Messages
flags](http://developer.gnome.org/camel/stable/CamelFolderSummary.html) flags](http://developer.gnome.org/camel/stable/CamelFolderSummary.html)
- Mozilla doesnt have a online code browser so I had to pull the - Mozilla doesnt have a online code browser so I had to pull the
source to get their flags. In the nsMsgMessageFlags.h file you will source to get their flags. In the nsMsgMessageFlags.h file you will
find the following useful flags definition : find the following useful flags definition :
class NS_NO_VTABLE NS_SCRIPTABLE nsMsgMessageFlags { class NS_NO_VTABLE NS_SCRIPTABLE nsMsgMessageFlags {
public: public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_MSGMESSAGEFLAGS_IID) NS_DECLARE_STATIC_IID_ACCESSOR(NS_MSGMESSAGEFLAGS_IID)
enum { Read = 1U }; enum { Read = 1U };
enum { Replied = 2U }; enum { Replied = 2U };
enum { Marked = 4U }; enum { Marked = 4U };
... ...
enum { Forwarded = 4096U }; enum { Forwarded = 4096U };
... ...
enum { Attachment = 268435456U }; enum { Attachment = 268435456U };